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

nacos ipv6 register #9269

Closed
wxjin opened this issue Oct 8, 2022 · 10 comments · Fixed by #9312
Closed

nacos ipv6 register #9269

wxjin opened this issue Oct 8, 2022 · 10 comments · Fixed by #9312
Labels
area/Client Related to Nacos Client SDK kind/bug Category issues or prs related to bug.
Milestone

Comments

@wxjin
Copy link

wxjin commented Oct 8, 2022

Inacos ipv6 register failed

  1. nacos register with ipv4 is normal
  2. However, nacos register with ipv6 connect failed.
  3. and the remote log such as:

2022-10-08 15:57:03.305 INFO [main :c.a.n.c.r.client] [48e91b39-50fc-4fab-925d-4267f75b7cb7] Try to connect to server on start up, server: {serverIp = '[fe80', server main port = 8848}
2022-10-08 15:57:03.306 ERROR [main :c.a.n.c.r.c.g.GrpcClient] [48e91b39-50fc-4fab-925d-4267f75b7cb7]Fail to connect to server!,error={}
java.lang.IllegalArgumentException: Invalid host or port: [fe80 9848
at com.alibaba.nacos.shaded.io.grpc.internal.GrpcUtil.authorityFromHostAndPort(GrpcUtil.java:488) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.(NettyChannelBuilder.java:133) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.forAddress(NettyChannelBuilder.java:119) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:37) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:23) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.shaded.io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:39) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.common.remote.client.grpc.GrpcClient.createNewChannelStub(GrpcClient.java:143) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.common.remote.client.grpc.GrpcClient.connectToServer(GrpcClient.java:299) ~[nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.common.remote.client.RpcClient.start(RpcClient.java:389) [nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.start(NamingGrpcClientProxy.java:95) [nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.(NamingGrpcClientProxy.java:88) [nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.(NamingClientProxyDelegate.java:76) [nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.client.naming.NacosNamingService.init(NacosNamingService.java:95) [nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.client.naming.NacosNamingService.(NacosNamingService.java:81) [nacos-client-2.1.0.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.8.0_171]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [na:1.8.0_171]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [na:1.8.0_171]
at java.lang.reflect.Constructor.newInstance(Unknown Source) [na:1.8.0_171]
at com.alibaba.nacos.api.naming.NamingFactory.createNamingService(NamingFactory.java:59) [nacos-client-2.1.0.jar:na]
at com.alibaba.nacos.api.NacosFactory.createNamingService(NacosFactory.java:77) [nacos-client-2.1.0.jar:na]
at com.alibaba.cloud.nacos.NacosServiceManager.createNewNamingService(NacosServiceManager.java:99) [spring-cloud-starter-alibaba-nacos-discovery-2.2.9.RELEASE.jar:2.2.9.RELEASE]
at com.alibaba.cloud.nacos.NacosServiceManager.buildNamingService(NacosServiceManager.java:90) [spring-cloud-starter-alibaba-nacos-discovery-2.2.9.RELEASE.jar:2.2.9.RELEASE]
at com.alibaba.cloud.nacos.NacosServiceManager.getNamingService(NacosServiceManager.java:46) [spring-cloud-starter-alibaba-nacos-discovery-2.2.9.RELEASE.jar:2.2.9.RELEASE]
at com.alibaba.cloud.nacos.discovery.NacosWatch.start(NacosWatch.java:131) [spring-cloud-starter-alibaba-nacos-discovery-2.2.9.RELEASE.jar:2.2.9.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) [spring-context-5.3.15.jar:5.3.15]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) [spring-context-5.3.15.jar:5.3.15]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) [spring-context-5.3.15.jar:5.3.15]
at java.lang.Iterable.forEach(Unknown Source) ~[na:1.8.0_171]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) [spring-context-5.3.15.jar:5.3.15]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) [spring-context-5.3.15.jar:5.3.15]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.15.jar:5.3.15]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.15.jar:5.3.15]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:414) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.6.3.jar:2.6.3]
at com.cmcc.emdp.EmdpFtpApplication.main(EmdpFtpApplication.java:24) ~[classes/:na]
Caused by: java.net.URISyntaxException: Expected closing bracket for IPv6 address at index 12: //[fe80:9848
at java.net.URI$Parser.fail(Unknown Source) ~[na:1.8.0_171]
at java.net.URI$Parser.failExpecting(Unknown Source) ~[na:1.8.0_171]
at java.net.URI$Parser.parseServer(Unknown Source) ~[na:1.8.0_171]
at java.net.URI$Parser.parseAuthority(Unknown Source) ~[na:1.8.0_171]
at java.net.URI$Parser.parseHierarchical(Unknown Source) ~[na:1.8.0_171]
at java.net.URI$Parser.parse(Unknown Source) ~[na:1.8.0_171]
at java.net.URI.(Unknown Source) ~[na:1.8.0_171]
at com.alibaba.nacos.shaded.io.grpc.internal.GrpcUtil.authorityFromHostAndPort(GrpcUtil.java:486) ~[nacos-client-2.1.0.jar:na]
... 38 common frames omitted

@KomachiSion
Copy link
Collaborator

whether leak ]?

@wxjin
Copy link
Author

wxjin commented Oct 10, 2022

No, I think it is splitted by the first ":" and get the ip address

@KomachiSion
Copy link
Collaborator

Can you help community to find out the reason? Why the address be split? If gRPC split the address, maybe gRPC's bug, we should upgrade the version.

@KomachiSion
Copy link
Collaborator

I found the problem, will be fixed in 2.1.2 version.

@KomachiSion KomachiSion added kind/bug Category issues or prs related to bug. area/Client Related to Nacos Client SDK and removed status/need feedback labels Oct 12, 2022
@KomachiSion KomachiSion added this to the 2.1.2 milestone Oct 12, 2022
@wxjin
Copy link
Author

wxjin commented Oct 12, 2022

Can you tell me the plan when the 2.1.2 release

@KomachiSion
Copy link
Collaborator

Probably this month

@wxjin
Copy link
Author

wxjin commented Oct 12, 2022

if release, please tell me and we need to do it. thanks

@KomachiSion
Copy link
Collaborator

KomachiSion commented Oct 12, 2022

You can watch the release event in github.

image

@wxjin
Copy link
Author

wxjin commented Oct 18, 2022

2.1.2 releases, however, why it is not found in mvnrepository?

@zky959
Copy link

zky959 commented Aug 2, 2023

如果使用ipv6搭建集群的话。1.修改application.properties配置文件,放开nacos.inetutils.ip-address配置项注释,指定本节点nacos节点ip为ipv6地址。2.修改 cluster.conf配置文件使用ipv6地址
以上ipv6地址都需要以‘[]’括住。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Client Related to Nacos Client SDK kind/bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants