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

http-access-log 出错 #80

Open
ap6108 opened this issue Mar 17, 2021 · 1 comment
Open

http-access-log 出错 #80

ap6108 opened this issue Mar 17, 2021 · 1 comment

Comments

@ap6108
Copy link

ap6108 commented Mar 17, 2021

ERROR 03/17-03:19:56.618 http-access-log method=GET ip=127.0.0.1 path=/discovery/polls ts=30.00105143 traceid= err=-304 user=no_user params=appid=infra.discovery&env=dev&hostname=cloud1&latest_timestamp=1615864005461352591 stack=-304 ret=-304 msg=-304 timeout_quota=39.999991718
INFO 03/17-03:19:56.618 /home/avit/code/discovery/registry/registry.go:235 Polls from(cloud1) reuse connection(6)
INFO 03/17-03:19:56.625 /home/avit/code/discovery/registry/registry.go:382 DelConns from(cloud1) count decr(6)
ERROR 03/17-03:19:56.625 http-access-log params=appid=infra.discovery&env=dev&hostname=cloud1&latest_timestamp=1615864005461352591 traceid= ip=127.0.0.1 err=-304 ts=30.001147202 ret=-304 stack=-304 path=/discovery/polls user=no_user msg=-304 timeout_quota=39.999992338 method=GET
INFO 03/17-03:19:56.626 /home/avit/code/discovery/registry/registry.go:235 Polls from(cloud1) reuse connection(6)
INFO 03/17-03:19:56.648 /home/avit/code/discovery/registry/registry.go:382 DelConns from(cloud1) count decr(6)
INFO 03/17-03:19:56.648 /home/avit/code/discovery/registry/registry.go:385 DelConns from(cloud1) delete(1)
ERROR 03/17-03:19:56.648 http-access-log stack=-304 traceid= method=GET ret=-304 msg=-304 ts=30.001125872 ip=127.0.0.1 path=/discovery/polls err=-304 params=appid=infra.discovery&appid=goim.comet&env=dev&hostname=cloud1&latest_timestamp=1615864005461352591&latest_timestamp=1615865003212927403 user=no_user timeout_quota=39.999992267

请问这个出错是怎么发生的,然后应该怎么解决?

@yeqown
Copy link

yeqown commented Apr 7, 2021

-304 表示的是 ecode.NotModified , 是在长轮询请求超时后,返回给客户端的错误码:https://github.com/bilibili/discovery/blob/master/http/discovery.go#L102-L112

至于这条错误日志,则是由 kratos/pkg/net/http/blademaster/logger.go 记录而来,因为论询请求返回了错误ecode.NotModified,但这并不代表服务出错了

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

2 participants