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

【主机绑定】使用公网IP启动报错 #3064

Open
shopernext opened this issue Nov 21, 2024 · 0 comments
Open

【主机绑定】使用公网IP启动报错 #3064

shopernext opened this issue Nov 21, 2024 · 0 comments

Comments

@shopernext
Copy link

shopernext commented Nov 21, 2024

报错信息如下,PS:xxx 为公网 IP

java.lang.RuntimeException: java.lang.RuntimeException: org.apache.dubbo.remoting.RemotingException: Failed to bind NettyPortUnificationServer on xxx:20880, cause: Cannot assign requested address
	at org.apache.dubbo.registry.integration.ExporterFactory.lambda$createExporter$0(ExporterFactory.java:33) ~[dubbo-3.2.10.jar:3.2.10]
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]
	at org.apache.dubbo.registry.integration.ExporterFactory.createExporter(ExporterFactory.java:29) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:356) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:291) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:66) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:79) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.export(ProtocolSecurityWrapper.java:84) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:58) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.export(ProtocolSerializationWrapper.java:50) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.export(InvokerCountWrapper.java:42) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.ServiceConfig.doExportUrl(ServiceConfig.java:944) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.ServiceConfig.exportRemote(ServiceConfig.java:914) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.ServiceConfig.exportUrl(ServiceConfig.java:854) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:598) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:579) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:540) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:340) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServiceInternal(DefaultModuleDeployer.java:477) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServices(DefaultModuleDeployer.java:424) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:174) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:156) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:157) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:143) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:52) ~[dubbo-3.2.10.jar:3.2.10]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:174) ~[spring-context-6.0.14.jar:6.0.14]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) ~[spring-context-6.0.14.jar:6.0.14]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145) ~[spring-context-6.0.14.jar:6.0.14]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:445) ~[spring-context-6.0.14.jar:6.0.14]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) ~[spring-context-6.0.14.jar:6.0.14]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:969) ~[spring-context-6.0.14.jar:6.0.14]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:619) ~[spring-context-6.0.14.jar:6.0.14]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.13.jar:3.0.13]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733) ~[spring-boot-3.0.13.jar:3.0.13]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435) ~[spring-boot-3.0.13.jar:3.0.13]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) ~[spring-boot-3.0.13.jar:3.0.13]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-3.0.13.jar:3.0.13]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) ~[spring-boot-3.0.13.jar:3.0.13]
	at com.prefer.cloud.app.id.IdApplication.main(IdApplication.java:24) ~[app-id-0.0.1.jar:na]
Caused by: java.lang.RuntimeException: org.apache.dubbo.remoting.RemotingException: Failed to bind NettyPortUnificationServer on xxx:20880, cause: Cannot assign requested address
	at org.apache.dubbo.remoting.exchange.PortUnificationExchanger.lambda$bind$0(PortUnificationExchanger.java:48) ~[dubbo-3.2.10.jar:3.2.10]
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]
	at org.apache.dubbo.common.utils.ConcurrentHashMapUtils.computeIfAbsent(ConcurrentHashMapUtils.java:56) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.remoting.exchange.PortUnificationExchanger.bind(PortUnificationExchanger.java:43) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.tri.TripleProtocol.export(TripleProtocol.java:157) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:78) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:79) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.export(ProtocolSecurityWrapper.java:84) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:61) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.export(ProtocolSerializationWrapper.java:50) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.export(InvokerCountWrapper.java:42) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.registry.integration.RegistryProtocol.lambda$doLocalExport$5(RegistryProtocol.java:356) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.registry.integration.ExporterFactory.lambda$createExporter$0(ExporterFactory.java:31) ~[dubbo-3.2.10.jar:3.2.10]
	... 39 common frames omitted
Caused by: org.apache.dubbo.remoting.RemotingException: Failed to bind NettyPortUnificationServer on xxx:20880, cause: Cannot assign requested address
	at org.apache.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:79) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.remoting.api.pu.AbstractPortUnificationServer.<init>(AbstractPortUnificationServer.java:46) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.remoting.transport.netty4.NettyPortUnificationServer.<init>(NettyPortUnificationServer.java:80) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.remoting.transport.netty4.NettyPortUnificationTransporter.bind(NettyPortUnificationTransporter.java:34) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.remoting.api.pu.PortUnificationTransporter$Adaptive.bind(PortUnificationTransporter$Adaptive.java) ~[dubbo-3.2.10.jar:3.2.10]
	at org.apache.dubbo.remoting.exchange.PortUnificationExchanger.lambda$bind$0(PortUnificationExchanger.java:46) ~[dubbo-3.2.10.jar:3.2.10]
	... 52 common frames omitted
Caused by: java.net.BindException: Cannot assign requested address
	at java.base/sun.nio.ch.Net.bind0(Native Method) ~[na:na]
	at java.base/sun.nio.ch.Net.bind(Net.java:555) ~[na:na]
	at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337) ~[na:na]
	at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294) ~[na:na]
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:380) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[netty-common-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[netty-common-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[netty-transport-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.101.Final.jar:4.1.101.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.101.Final.jar:4.1.101.Final]
	at java.base/java.lang.Thread.run(Thread.java:842) ~[na:na]
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

1 participant