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

kubernetes中运行出错 #1

Open
insoz opened this issue May 27, 2017 · 6 comments
Open

kubernetes中运行出错 #1

insoz opened this issue May 27, 2017 · 6 comments

Comments

@insoz
Copy link

insoz commented May 27, 2017

我生成docker镜像后放在kubernetes 集群中, 用kubernetes的DNS服务发现, 三个容器之间可以通信, 但是启动的时候会连接不成功, 能不能帮忙看看?

2017-05-27 06:52:30.545  INFO 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_APOLLO-CONFIGSERVICE/apollo-configservice-794372642-tft28:apollo-configservice:8080: registering service...
2017-05-27 06:52:30.546 ERROR 1 --- [DiscoveryClient-InstanceInfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error

com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused (Connection refused)
	at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
	at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
	at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
	at com.sun.jersey.api.client.Client.handle(Client.java:652)
	at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
	at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
	at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570)
2017-05-27 06:52:30.546  WARN 1 --- [DiscoveryClient-InstanceInfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient    : Request execution failure
2017-05-27 06:52:30.546  WARN 1 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_APOLLO-CONFIGSERVICE/apollo-configservice-794372642-tft28:apollo-configservice:8080 - registration failed Cannot execute request on any known server
@kulovecc
Copy link
Owner

configservice、adminservice、portal 是容器内互联还是根据映射出的端口注册的?
如果是后者可能是容器内端口和映射端口不一致导致的。

@insoz
Copy link
Author

insoz commented May 27, 2017 via email

@kulovecc
Copy link
Owner

看下 eureka 注册的 apollo-configservice:8080 可不可以正常访问?
我这边试了下容器互联没有出现连接失败的情况。

@zhaocy
Copy link

zhaocy commented Jun 18, 2017

我也出现了类似的问题。先将configservice根据Dockerfile生成镜像,我注释了application.yml中的

# eureka:
# instance:
# preferIpAddress: true
# ip-address: ${ip}

我想让客户端(adminservice /portal )以link的方式连接到configservice
configservice docker run 正常,可以通过8080访问。
adminservice的application.yml也注释了如上的代码,并且修改了bootstrap.yml,修改如下:

serviceUrl:
# defaultZone: http://${eureka.instance.hostname}:8080/eureka/
defaultZone: http://meta:8080/eureka/

adminservice在docker run的时候,添加了参数--link apollo-configservice:meta
最终 adminservice 启动失败,异常如下:
DiscoveryClient_APOLLO-ADMINSERVICE/0a1887c39fed:apollo-adminservice:8090 - registration failed Cannot execute request on any known server

请kulovecc帮忙看下,谢谢

@KeaneQian
Copy link

DiscoveryClient_APOLLO-CONFIGSERVICE/apollo-configservice-794372642-tft28:apollo-configservice:8080 - registration failed Cannot execute request on any known server
我刚遇到这个错,配置文件一顿改最终一个接着一个找不到,运行之前一定要把数据库的eureka.service.url 的地址改为configservice所在的服务器,不然你永远也无法注册admin,配置文件里面默认的不生效,其他配置不用改,不需要link参数

@yy306525121
Copy link

我这边在本地运行都OK的, 但是容易push到服务器上再运行就报错
/apollo-configservice/scripts/startup.sh: ./apollo-configservice.jar: /bin/bash: bad interpreter: Text file busy
Sun Jun 24 19:21:04 CST 2018 Failed to start apollo-configservice.jar, return code: 126

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

5 participants