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

UnknownHostException: org.apache.dubbo.samples.basic.api.demoservice #30

Open
jdfrozen opened this issue Aug 11, 2022 · 1 comment
Open

Comments

@jdfrozen
Copy link

这问题,偶尔会出现,有时候卸载重新部署又没有出现,怎么排查这个原因?

1、部署
./demo/metaprotocol-dubbo/uninstall.sh
kubectl create ns meta-dubbo
kubectl label namespace meta-dubbo istio-injection=enabled --overwrite
kubectl apply -f demo/k8s/aeraki-bootstrap-config.yaml -n meta-dubbo
kubectl apply -f demo/k8s/nacos -n meta-dubbo
kubectl apply -f demo/traffic-rules/destinationrule.yaml -n meta-dubbo
2、等待pod启动
[root@master dubbo2istio]# kubectl get pod -n meta-dubbo
NAME READY STATUS RESTARTS AGE
dubbo-sample-consumer-5cf9f6f878-xxp8j 2/2 Running 0 22m
dubbo-sample-provider-v1-566fbbb9fb-zd5hj 2/2 Running 0 22m
dubbo-sample-provider-v2-68468d8bc9-2lnv4 2/2 Running 0 22m
dubbo2istio-686d5554cc-5mnsg 1/1 Running 0 22m
nacos-5cfbc49d9d-6kmd6 1/1 Running 0 22m
3、查看日志
Caused by: org.apache.dubbo.remoting.RemotingException: client(url: dubbo://org.apache.dubbo.samples.basic.api.demoservice:20880/org.apache.dubbo.samples.basic.api.DemoService?application=dubbo-sample-consumer&check=true&codec=dubbo&heartbeat=60000&init=false&interface=org.apache.dubbo.samples.basic.api.DemoService&pid=7&register.ip=10.244.0.97&remote.application=&revision=1.0-SNAPSHOT&side=consumer&sticky=false&timeout=3000) failed to connect to server org.apache.dubbo.samples.basic.api.demoservice:20880, error message is:org.apache.dubbo.samples.basic.api.demoservice
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:169)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:198)
at org.apache.dubbo.remoting.transport.AbstractClient.(AbstractClient.java:73)
at org.apache.dubbo.remoting.transport.netty4.NettyClient.(NettyClient.java:82)
at org.apache.dubbo.remoting.transport.netty4.NettyTransporter.connect(NettyTransporter.java:40)
at org.apache.dubbo.remoting.Transporter$Adaptive.connect(Transporter$Adaptive.java)
at org.apache.dubbo.remoting.Transporters.connect(Transporters.java:75)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchanger.connect(HeaderExchanger.java:39)
at org.apache.dubbo.remoting.exchange.Exchangers.connect(Exchangers.java:109)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.initClient(DubboProtocol.java:610)
... 22 more
Caused by: java.net.UnknownHostException: org.apache.dubbo.samples.basic.api.demoservice
at java.net.InetAddress.getAllByName0(InetAddress.java:1287)
at java.net.InetAddress.getAllByName(InetAddress.java:1199)
at java.net.InetAddress.getAllByName(InetAddress.java:1127)
at java.net.InetAddress.getByName(InetAddress.java:1077)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:156)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:153)
at io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:41)
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:61)

@zhaohuabing
Copy link
Member

出现问题的时候你看一下 service entry 生成了没有

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