简体   繁体   中英

Netty connection timeout on other pc

I wrote server and client on Java using Netty.When i run client on my PC it works just fine. When i am trying to run client on other PC it throws me:

java.net.ConnectException: connection timed out
   at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:391)
   at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:289)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
17-Sep-2012 10:58:55 AM org.jboss.netty.channel.SimpleChannelHandler

What is the reason of this?

Check the connection parameters.

  • Is the server visible from another client? (try pinging the server from the client).
  • Are there any firewalls between? Try switching them off.
  • Check the connection string. Make sure you aren't connecting to localhost.
  • Check the server configuration. Does it listen on the proper network interface.

If you check everything and it seems OK. Post the network connection code here.

Happy coding :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM