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

日志一直输出Load config failed,Sync config failed #1392

Closed
reignsr opened this issue Aug 22, 2018 · 21 comments
Closed

日志一直输出Load config failed,Sync config failed #1392

reignsr opened this issue Aug 22, 2018 · 21 comments
Labels
area/client apollo-client kind/report-problem Categorizes issue when someone report the problem he/she meeted

Comments

@reignsr
Copy link

reignsr commented Aug 22, 2018

日志中一直在持续输出Load config failed,Sync config failed,will retry In 1 SECONDS………………,但是不影响使用,配置的获取、更新、加载都正常,只是日志不停地输出上述内容,占用空间增长很快。
1、该日志内容是何缘故?为何会提示失败?
2、如果上述内容无关紧要,该日志是否可以关闭?
_428de31e-5b5b-4316-9a73-5450fef6ba84 1
_af51a901-4dfd-413a-9cb1-93a6e2e8065e

@nobodyiam
Copy link
Member

这个是load config失败了,正常不应该失败的,你打开这个URL看看。

@Brian-West
Copy link

{"timestamp":"2018-08-23T13:55:24.667+0800","status":404,"error":"Not Found","message":"No message available","path":"/services/config"}
我获取apollo配置是也是一直sync config failed,点开http://10.50.115.73:9033/services/config?appId=aaa&ip=10.60.114.51浏览器就会显示上面的字符串,这个网址10.50.115.73.9033也是正确的我能登录上配置中心也能查看到项目的配置,配置也已经发布,可是就是获取不到

@reignsr
Copy link
Author

reignsr commented Aug 23, 2018

暂时定位到,代码里多指定了一个不存在的命名空间。估计是这个问题,还未验证。

@nobodyiam
Copy link
Member

@Brian-West

看上去是meta server配错了,meta server url应该配置config service的地址,不是portal的地址

@DeanJi
Copy link

DeanJi commented Aug 23, 2018

这个问题我也遇到了,客户端是jdk1.8没问题,jdk1.6就有这个问题。楼主的客户端jdk是什么版本?我跟了一下代码,是HttpUtil.java的这行代码response = CharStreams.toString(isr)报超时错误。楼主可以调试一下,看是不是也是这行报错?

@DeanJi
Copy link

DeanJi commented Aug 24, 2018

@nobodyiam,有个疑问,为什么长连接的HttpRequest有手动设置readTimeout为90秒,而5分钟一次的定时拉取没有手动设置readTimeout,而在HttpUtil被系统设置成5秒?从而引起read timed out异常。

@nobodyiam
Copy link
Member

@DeanJi

5秒的readTimeout是Apollo的默认值,不是系统设置的,另外这个timeout也是可以自定义的,详见 ConfigUtil

@DeanJi
Copy link

DeanJi commented Aug 24, 2018

@nobodyiam
知道5秒是apollo默认的。我的问题是为什么长连接不用默认的5秒,而是设置成90秒,而5分钟一次的连接却使用默认的5秒,有什么原因吗?我目前是将默认的5秒改成90秒,就不报错了。

@nobodyiam
Copy link
Member

长连接的特点是长,所以是90秒,因为目前服务端默认是60秒才返回。

5分钟一次的连接是短连接,一般API请求5秒也肯定够了,我们生产环境平均响应时间是1毫秒以内。如果5秒都不够的话,那说明服务端存在性能问题,需要看一下内存、GC、CPU等情况。

@DeanJi
Copy link

DeanJi commented Aug 25, 2018

你们服务端几个cpu,内存多少方便透露一下吗

@nobodyiam
Copy link
Member

参考一下 Apollo性能测试

@Brian-West
Copy link

@nobodyiam 果然是

@nobodyiam
Copy link
Member

case先关闭了,如还有问题,可以提供更多信息,或进群交流。

@Flynn-hhdd
Copy link

还在吗 想问一下注册中心改成自己的eureka,metaserver 还是configservice的地址吗 我也一直报这个错

@nobodyiam
Copy link
Member

@FanLingyin

meta server还是config service的地址

@vhye
Copy link

vhye commented Dec 27, 2019

我也遇到过这种情况,只有定时轮询报readtimeout,后来发现是weblogic默认的httphandler覆盖了sun的,改了源码指定handler就没问题了

@jiayaoO3O
Copy link

我也遇到过这种情况,只有定时轮询报readtimeout,后来发现是weblogic默认的httphandler覆盖了sun的,改了源码指定handler就没问题了
@vhye 可以详细说说吗?我也是weblogic定时轮询报错, 但是功能完全正常, 只是会报这个警告, 不知道为什么, 发现你说weblogic默认的httphandler覆盖了sun的, 那要怎么修改呢?

@dzjfromChina
Copy link

我也遇到了这个问题,如果命名空间没有值,并且在项目中引用了就会出现这个

@Yawngan0912
Copy link

这里并没有这个application的命名空间,但是一直告警Load config failed, will retry in 1 SECONDS. appId: document-test, cluster: default, namespaces: application

@Anilople
Copy link
Contributor

Anilople commented Jan 6, 2021

这里并没有这个application的命名空间,但是一直告警Load config failed, will retry in 1 SECONDS. appId: document-test, cluster: default, namespaces: application

可以试试到document-test这个项目里,发布一下application这个namespace?(不需要添加任何配置,直接点发布即可)

@Anilople Anilople added area/client apollo-client kind/report-problem Categorizes issue when someone report the problem he/she meeted labels Jan 6, 2021
@Light-Towers
Copy link

我的经历是:不要留有空的Namespace,将空的Namespace填上值就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client apollo-client kind/report-problem Categorizes issue when someone report the problem he/she meeted
Projects
None yet
Development

No branches or pull requests