-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(protal-web): sshConnect会因为sftp消息过长报500错误 #957
Conversation
🦋 Changeset detectedLatest commit: baaf068 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #957 +/- ##
==========================================
- Coverage 68.89% 68.81% -0.08%
==========================================
Files 132 132
Lines 3926 3932 +6
Branches 523 525 +2
==========================================
+ Hits 2705 2706 +1
- Misses 1123 1128 +5
Partials 98 98
☔ View full report in Codecov by Sentry. |
@@ -113,6 +113,15 @@ export const FileManager: React.FC<Props> = ({ cluster, path, urlPrefix }) => { | |||
const reload = async (signal?: AbortSignal) => { | |||
setLoading(true); | |||
await api.listFile({ query: { cluster: cluster.id, path } }, signal) | |||
.httpError(409, (e) => { | |||
// 如果终端登录欢迎语过长会报错:Packet length xxxx exceeds max length of 262144 | |||
if (e.message.endsWith("exceeds max length of 262144")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果有的错误信息不是262144呢?判断标准可以改成exceeds max length这种更通用一点的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
发现不仅仅是获取用户家目录时会报这个错,只要涉及sshConnect都会有这个问题,重新处理了一下
dev/vagrant/config/mis.yaml
Outdated
@@ -1,8 +1,8 @@ | |||
# 管理系统数据库的信息。可以不修改 | |||
db: | |||
host: 192.168.88.100 | |||
host: 172.16.20.124 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是测试用的内部地址吗?vagrant用的应该是88.100吧,不要测试用的别改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
检查代码删除console时,不小心 git add . 了
前提:在.bashrc文件中输入较长的欢迎语
之前:文件管理和交互式应用(只要涉及ssh连接的地方都有这个问题)因为使用sftp获取家目录,如果欢迎语过多,会导致sftp消息过长报500错误。
现在:捕获了这个错误,并提示用户缩减欢迎语。