You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/20 07:01:32 UTC

[GitHub] [dubbo] MrLiuFang opened a new issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

MrLiuFang opened a new issue #8859:
URL: https://github.com/apache/dubbo/issues/8859


   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   - [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.0.2.1
   * Operating System version: centos8
   * Java version: 1.8
   
   pom.xml
   
   ```
   <?xml version="1.0" encoding="UTF-8"?>
   <project xmlns="http://maven.apache.org/POM/4.0.0"
   		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   	<groupId>com.lion</groupId>
   	<modelVersion>4.0.0</modelVersion>
   	<artifactId>test</artifactId>
   	<packaging>jar</packaging>
   	<version>1.0.0</version>
   
   	<dependencyManagement>
   		<dependencies>
   			<dependency>
   				<groupId>org.springframework.boot</groupId>
   				<artifactId>spring-boot-dependencies</artifactId>
   				<version>2.5.4</version>
   				<type>pom</type>
   				<scope>import</scope>
   			</dependency>
   <!--			<dependency>-->
   <!--				<groupId>org.springframework.cloud</groupId>-->
   <!--				<artifactId>spring-cloud-dependencies</artifactId>-->
   <!--				<version>2020.0.3</version>-->
   <!--				<type>pom</type>-->
   <!--				<scope>import</scope>-->
   <!--			</dependency>-->
   <!--			<dependency>-->
   <!--				<groupId>com.alibaba.cloud</groupId>-->
   <!--				<artifactId>spring-cloud-alibaba-dependencies</artifactId>-->
   <!--				<version>2021.1</version>-->
   <!--				<type>pom</type>-->
   <!--				<scope>import</scope>-->
   <!--			</dependency>-->
   		</dependencies>
   	</dependencyManagement>
   	<dependencies>
   		<dependency>
   			<groupId>org.apache.dubbo</groupId>
   			<artifactId>dubbo-registry-nacos</artifactId>
   			<version>3.0.2.1</version>
   		</dependency>
   		<dependency>
   			<groupId>org.apache.dubbo</groupId>
   			<artifactId>dubbo-spring-boot-starter</artifactId>
   			<version>3.0.2.1</version>
   		</dependency>
   		<dependency>
   			<groupId>org.springframework.boot</groupId>
   			<artifactId>spring-boot-starter-web</artifactId>
   		</dependency>
   		<dependency>
   			<groupId>com.alibaba.nacos</groupId>
   			<artifactId>nacos-client</artifactId>
   			<version>2.0.3</version>
   		</dependency>
   		<dependency>
   			<groupId>org.apache.commons</groupId>
   			<artifactId>commons-lang3</artifactId>
   			<version>3.12.0</version>
   		</dependency>
   	</dependencies>
   
   	<build>
   		<plugins>
   			<plugin>
   				<groupId>com.mysema.maven</groupId>
   				<artifactId>apt-maven-plugin</artifactId>
   				<version>1.1.3</version>
   			</plugin>
   			<plugin>
   				<groupId>org.springframework.boot</groupId>
   				<artifactId>spring-boot-maven-plugin</artifactId>
   				<configuration>
   
   				</configuration>
   			</plugin>
   			<plugin>
   				<groupId>org.apache.maven.plugins</groupId>
   				<artifactId>maven-compiler-plugin</artifactId>
   				<configuration>
   					<source>8</source>
   					<target>8</target>
   				</configuration>
   			</plugin>
   		</plugins>
   	</build>
   </project>
   
   ```
   
   application.yml
   ```
   spring:
     application:
       name: test
   server:
     port: 0
   dubbo:
     application:
       name: test
       id: test
     protocol:
       name: dubbo
       port: -1
     registry:
       address: nacos://172.16.30.130:8848
     consumer:
       check: false
   ```
   
   ```
   org.apache.dubbo.rpc.RpcException: Fail to start server(url: dubbo://192.168.1.102:20880/org.apache.dubbo.metadata.MetadataService?anyhost=true&application=test&bind.ip=192.168.1.102&bind.port=20880&channel.readonly.sent=true&codec=dubbo&delay=0&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&getAndListenInstanceMetadata.1.callback=true&getAndListenInstanceMetadata.return=true&getAndListenInstanceMetadata.sent=true&group=test&heartbeat=60000&interface=org.apache.dubbo.metadata.MetadataService&metadata-type=remote&methods=getExportedURLs,getAndListenInstanceMetadata,toURLs,serviceName,isMetadataServiceURL,getSubscribedURLs,version,getExportedServiceURLs,exportInstanceMetadata,getMetadataInfo,toSortedStrings,getMetadataInfos,getServiceDefinition,getInstanceMetadataChangedListenerMap&pid=24260&qos.enable=false&release=3.0.2.1&revision=3.0.2.1&side=provider&timestamp=1632120798177&version=1.0.0) Failed to bind NettyServer on /192.168.1.102:20880, cause: 地址已在使用
   	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:351) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:321) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:304) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:66) ~[dubbo-rpc-api-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:62) ~[dubbo-cluster-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:66) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.export(ProtocolSerializationWrapper.java:46) ~[dubbo-rpc-api-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-common-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExportUrl(ServiceConfig.java:612) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.exportRemote(ServiceConfig.java:599) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.exportUrl(ServiceConfig.java:546) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:379) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:366) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:342) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:233) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.export(ConfigurableMetadataServiceExporter.java:84) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.export(ConfigurableMetadataServiceExporter.java:55) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportMetadataService(DubboBootstrap.java:1375) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.doStart(DubboBootstrap.java:1148) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:1119) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:109) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:101) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationEvent(DubboBootstrapApplicationListener.java:78) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[spring-context-5.3.9.jar:5.3.9]
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[spring-context-5.3.9.jar:5.3.9]
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[spring-context-5.3.9.jar:5.3.9]
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) ~[spring-context-5.3.9.jar:5.3.9]
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) ~[spring-context-5.3.9.jar:5.3.9]
   	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938) ~[spring-context-5.3.9.jar:5.3.9]
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.9.jar:5.3.9]
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.5.4.jar:2.5.4]
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-2.5.4.jar:2.5.4]
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) [spring-boot-2.5.4.jar:2.5.4]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) [spring-boot-2.5.4.jar:2.5.4]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) [spring-boot-2.5.4.jar:2.5.4]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332) [spring-boot-2.5.4.jar:2.5.4]
   	at com.Application.main(Application.java:22) [classes/:na]
   Caused by: org.apache.dubbo.remoting.RemotingException: Failed to bind NettyServer on /192.168.1.102:20880, cause: 地址已在使用
   	at org.apache.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:73) ~[dubbo-remoting-api-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.transport.netty4.NettyServer.<init>(NettyServer.java:80) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.transport.netty4.NettyTransporter.bind(NettyTransporter.java:35) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.Transporter$Adaptive.bind(Transporter$Adaptive.java) ~[dubbo-common-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.Transporters.bind(Transporters.java:56) ~[dubbo-remoting-api-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:44) ~[dubbo-remoting-api-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:70) ~[dubbo-remoting-api-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:349) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	... 36 common frames omitted
   Caused by: java.net.BindException: 地址已在使用
   	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_231]
   	at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_231]
   	at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_231]
   	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_231]
   	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-all-4.1.67.Final.jar:4.1.67.Final]
   	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_231]
   
   2021-09-20 14:53:23.561  WARN 24260 --- [      Thread-10] c.a.nacos.common.notify.NotifyCenter     : [NotifyCenter] Start destroying Publisher
   2021-09-20 14:53:23.561  WARN 24260 --- [       Thread-7] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Start destroying common HttpClient
   2021-09-20 14:53:23.562  WARN 24260 --- [      Thread-10] c.a.nacos.common.notify.NotifyCenter     : [NotifyCenter] Destruction of the end
   2021-09-20 14:53:23.562  WARN 24260 --- [       Thread-7] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Destruction of the end
   Disconnected from the target VM, address: '127.0.0.1:53711', transport: 'socket'
   
   Process finished with exit code 1
   ```
   已经确认 20880 端口未被使用
   ```
   [mr.liu@localhost ~]$ telnet 127.0.0.1 20880
   Trying 127.0.0.1...
   telnet: connect to address 127.0.0.1: Connection refused
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chenhuaming commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
chenhuaming commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-1034046431


   > @changfubai @CrazyHZM @yangzan0816 问题已经找到,因为我centos环境物理机装了虚拟机 有多个虚拟网卡.在provider 自己写的服务时候得到的ip是虚拟ip172.16.30.1.进行一次org.apache.dubbo.remoting.transport.netty4.NettyServer.doOpen() 操作 后续provider dubbo官方自带的org.apache.dubbo.metadata.MetadataService 得到的ip是192.168.1.102 又进行一次org.apache.dubbo.remoting.transport.netty4.NettyServer.doOpen() 操作,所以就导致了端口冲突. 需要在配置中指定ip来解决 dubbo.protocol.host=192.168.1.102
   > 
   > ![11](https://user-images.githubusercontent.com/25580414/134443836-2a424c09-dd9b-4473-b63a-1b9596d0c446.png) ![22](https://user-images.githubusercontent.com/25580414/134443851-49012250-4d5c-4e77-816f-3239ae76d142.png) ![33](https://user-images.githubusercontent.com/25580414/134443860-cd2e66b3-7f93-4ff8-9f1f-c7160ff1007a.png)
   
   ===============================
   首先配置 dubbo.protocol.port=-1
   
   1.  我也遇到了一个差不多相同的问题。
   2.  我的情况是我的centos本身是一台虚拟机,然后我在虚拟机里面起了一个docker
        不配置host的话是可以注册上去的docker容器的ip地址,这样是调用的时候是不通的。
        所以我配置了虚拟机的到dubbo.protocol.host上,这样是启动不成功的。
        然后我把docker的host改成了虚拟机的外网域名,这样就会报错,地址被重复占用。
   =============================== 
   然后我配置了一个 dubbo.protocol.port=20957
   这样可以启动成功,但是MetadataService是发布在20880端口
   
   
       
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] yangzan0816 commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
yangzan0816 commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922857556


   > @yangzan0816 @changfubai
   > 
   > **代码已上传到github https://github.com/MrLiuFang/test nacos 使用的是2.0.3**
   > 
   > Application.java
   > 
   > ```
   > package com;
   > 
   > import org.apache.dubbo.config.annotation.DubboReference;
   > import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
   > import org.springframework.boot.SpringApplication;
   > import org.springframework.boot.autoconfigure.SpringBootApplication;
   > 
   > /**
   >  * @description:
   >  * @author: Mr.Liu
   >  * @time: 2021/9/20 上午9:49
   >  */
   > 
   > @SpringBootApplication(scanBasePackages = "com")
   > @EnableDubbo(scanBasePackages = "com")
   > public class Application {
   > 
   >     @DubboReference
   >     private Test test;
   > 
   >     public static void main(String[] args) {
   >         SpringApplication.run(Application.class, args);
   >     }
   > }
   > ```
   > 
   > Test.java
   > 
   > ```
   > package com;
   > 
   > /**
   >  * @description:
   >  * @author: Mr.Liu
   >  * @time: 2021/9/20 上午9:44
   >  */
   > public interface Test {
   > 
   >     void test();
   > }
   > ```
   > 
   > TestImpl.java
   > 
   > ```
   > package com;
   > 
   > import org.apache.dubbo.config.annotation.DubboService;
   > import org.springframework.boot.ApplicationArguments;
   > import org.springframework.boot.ApplicationRunner;
   > 
   > /**
   >  * @description:
   >  * @author: Mr.Liu
   >  * @time: 2021/9/20 上午9:44
   >  */
   > @DubboService( )
   > public class TestImpl implements Test {
   >     @Override
   >     public void test() {
   > 
   >     }
   > 
   > }
   > ```
   > 
   > **代码已上传到github https://github.com/MrLiuFang/test nacos 使用的是2.0.3**
   > 
   > 实在找不出问题所在 麻烦帮忙瞧瞧!3Q
   
   你要不再检查下打出来的包如何,先清掉idea的ide缓存,clear下重新本地跑下试试?我down下来之后是成功的,未发现端口冲突
   ![image](https://user-images.githubusercontent.com/23078733/133997462-d712885a-d6ea-4aab-b752-fc2138554c17.png)
   ![image](https://user-images.githubusercontent.com/23078733/133997642-2a38d8f3-fbc1-4b5c-88a8-f9a47c4440e0.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] changfubai commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
changfubai commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922700255


   没有复现+1
   贴一下provider的代码?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] jeftom commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
jeftom commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-957933471


   谢谢,我也是遇到了同样的问题。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] yangzan0816 commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
yangzan0816 commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922695499


   > @yangzan0816 是的,无论换什么端口都会出现端口被使用
   
   本地也一样会冲突吗,是不是你做了什么操作,一次启动了两个相同的实例导致的呢,因为我用相同的配置在本地跑时没有出现你的那种情况的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] jeftom commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
jeftom commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-957933471


   谢谢,我也是遇到了同样的问题。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] yangzan0816 commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
yangzan0816 commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922681705


   请问如果切换了dubbo的默认端口号是否还会有相同的情况发生呢?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] MrLiuFang commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
MrLiuFang commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922991312


   @yangzan0816 @changfubai 
   我录制了一个一两分钟的视频  分别是在centos8 和 windwos 下的运行情况.希望对于这个诡异的问题有所帮助
   [http://47.113.202.95/1.webm](http://47.113.202.95/1.webm)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] MrLiuFang commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
MrLiuFang commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922682829


   @yangzan0816 是的,无论换什么端口都会出现端口被使用


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] MrLiuFang commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
MrLiuFang commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-925452262


   @changfubai @CrazyHZM @yangzan0816 
   问题已经找到,因为我centos环境物理机装了虚拟机 有多个虚拟网卡.在provider 自己写的服务时候得到的ip是虚拟ip172.16.30.1.进行一次org.apache.dubbo.remoting.transport.netty4.NettyServer.doOpen() 操作
   后续provider dubbo官方自带的org.apache.dubbo.metadata.MetadataService 得到的ip是192.168.1.102 又进行一次org.apache.dubbo.remoting.transport.netty4.NettyServer.doOpen() 操作,所以就导致了端口冲突.
   需要在配置中指定ip来解决 dubbo.protocol.host=192.168.1.102
   
   ![11](https://user-images.githubusercontent.com/25580414/134443836-2a424c09-dd9b-4473-b63a-1b9596d0c446.png)
   ![22](https://user-images.githubusercontent.com/25580414/134443851-49012250-4d5c-4e77-816f-3239ae76d142.png)
   ![33](https://user-images.githubusercontent.com/25580414/134443860-cd2e66b3-7f93-4ff8-9f1f-c7160ff1007a.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] MrLiuFang closed issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
MrLiuFang closed issue #8859:
URL: https://github.com/apache/dubbo/issues/8859


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] MrLiuFang commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
MrLiuFang commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922805168


   @yangzan0816 @changfubai 
   
   **代码已上传到github   [https://github.com/MrLiuFang/test](https://github.com/MrLiuFang/test)  
    nacos 使用的是2.0.3**
   
   Application.java
   ```
   package com;
   
   import org.apache.dubbo.config.annotation.DubboReference;
   import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
   import org.springframework.boot.SpringApplication;
   import org.springframework.boot.autoconfigure.SpringBootApplication;
   
   /**
    * @description:
    * @author: Mr.Liu
    * @time: 2021/9/20 上午9:49
    */
   
   @SpringBootApplication(scanBasePackages = "com")
   @EnableDubbo(scanBasePackages = "com")
   public class Application {
   
       @DubboReference
       private Test test;
   
       public static void main(String[] args) {
           SpringApplication.run(Application.class, args);
       }
   }
   
   ```
   
   Test.java
   ```
   package com;
   
   /**
    * @description:
    * @author: Mr.Liu
    * @time: 2021/9/20 上午9:44
    */
   public interface Test {
   
       void test();
   }
   
   ```
   
   TestImpl.java
   
   ```
   package com;
   
   import org.apache.dubbo.config.annotation.DubboService;
   import org.springframework.boot.ApplicationArguments;
   import org.springframework.boot.ApplicationRunner;
   
   /**
    * @description:
    * @author: Mr.Liu
    * @time: 2021/9/20 上午9:44
    */
   @DubboService( )
   public class TestImpl implements Test {
       @Override
       public void test() {
   
       }
   
   }
   
   ```
   
   **代码已上传到github   [https://github.com/MrLiuFang/test](https://github.com/MrLiuFang/test)
   nacos 使用的是2.0.3**
   
   实在找不出问题所在 麻烦帮忙瞧瞧!3Q


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] MrLiuFang commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
MrLiuFang commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-922962200


   @yangzan0816 我的环境是centos8 的物理机.在centos环境下无论是在idea模式下直接运行还是打包成jar包运行, 都会有上述问题.但是将打包好的jar复制到window环境下 通过 java -jar 运行一切正常.多么诡异的灵异事件.蒙蔽了.
   
   如果将dubbo版本换成2.7.8 在centos8环境完全没有问题
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] jeftom commented on issue #8859: dubbo3 会出现端口被占用情况--反复确认 20880 端口没有被使用

Posted by GitBox <gi...@apache.org>.
jeftom commented on issue #8859:
URL: https://github.com/apache/dubbo/issues/8859#issuecomment-957933471


   谢谢,我也是遇到了同样的问题。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org