Skip to content
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

更新节点时出错 #210

Open
MomentQYC opened this issue Apr 5, 2023 · 1 comment
Open

更新节点时出错 #210

MomentQYC opened this issue Apr 5, 2023 · 1 comment

Comments

@MomentQYC
Copy link

MomentQYC commented Apr 5, 2023

更新时显示数据库错误,同时日志得到了这个

[ERRO] report.go:64: update client[节点ID] err: Error 1406: Data too long for column 'firewall' at row 1, UPDATE `clients` SET `location`='',`client_ip`='节点IP',...(省略很多的字段) WHERE `client_id`='节点ID'
Stack:
1.  hfish/internal/server/handler.ReportClientData
    /usr/local/share/internal/server/handler/report.go:64
2.  github.com/gin-gonic/gin.(*Context).Next
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173
3.  hfish/internal/server/handler.ApiTokenAuth
    /usr/local/share/internal/server/handler/auth.go:127
4.  github.com/gin-gonic/gin.(*Context).Next
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173
5.  github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/recovery.go:101
6.  github.com/gin-gonic/gin.(*Context).Next
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173
7.  hfish/internal/server/router.TlsHandler.func1
    /usr/local/share/internal/server/router/router.go:43
8.  github.com/gin-gonic/gin.(*Context).Next
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173
9.  hfish/internal/library/log.GinMiddleware.func1
    /usr/local/share/internal/library/log/log.go:67
10. github.com/gin-gonic/gin.(*Context).Next
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173
11. github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616
12. github.com/gin-gonic/gin.(*Engine).ServeHTTP
    /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572

同时该节点不管在不在线都显示离线,且只有该节点不正常

节点日志无报错,与其他节点正常日志相同

@MomentQYC
Copy link
Author

MomentQYC commented Apr 5, 2023

修改建议(已实践成功):将firewall的类型改为mediumtext
同时ipaddress表的IP的类型改为varchar(64) (fix #176 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant