You can clone with
HTTPS or Subversion.
I use Finagle framework to build my server and client, and use zookeeper for Finagle ServerSet. When I setup my dev environment on Linux/Mac, they works great. But When I setup my dev environment on Windows, namely I run the Finagle server on Windows, the finagle client always result in the following errors:
Exception in thread "main" com.twitter.finagle.ChannelWriteException: org.jboss.netty.channel.ConnectTimeoutException: connection timed out: [MyDomain]/192.168.1.130:5233
at com.twitter.finagle.NoStacktrace(Unknown Source)
Caused by: org.jboss.netty.channel.ConnectTimeoutException: connection timed out: [MyDomain]/192.168.1.130:5233
When I run Finagle Server on Linux/Mac, and run Finagle Client on Windows, it works great, I am doubting that whether there exists some bugs when using finagle on Windows.
Looks like Windows' firewall is probably blocking the port.
I have close all windows firewall. Here is my configuration.
I don't know much about debugging on Windows. Do you know if the server is binding to the right interface?
Yes, the interface is correct(Local Area Network: [MyDomain]/192.168.1.130:5233) . I never used Finagle in Windows before, just recently I setup the ENV to Windows, and the situation happens.
That's the interface the client is trying to connect to, but what is the server binding to? On linux you can use the lsof utility to see what's bound to what. Is there something like that for Windows?
The server log suggests that it binds to the interface which is the same with the one client connects. Now I found that when I use loopbackaddress(127.0.0.1), client works fine. And when the server bind the LAN Address(192.168..), the client did not work.
We'd be happy to accept a pull request--I think the right solution might be to use InetAddress.getLoopBackAddress(), but it's java 7 only, and we still need to support java 6.
It's easy to get lookbackaddress whether you are using Java7 or Java6 (brute force to find it). But my concern is whether Finagle is able to startup in LAN on Windows Platform.
@mosesn the server still needs to be able to bind to the external address.
I'm not sure why Windows would block that. Are there tools for inspecting the network stack on Windows?
You can use tcpview (http://technet.microsoft.com/en-us/sysinternals/bb897437) to check if the server is correctly binding the port. It's also possible that you may need certain privileges to bind a port on a non local address, you should try to run the server "run as administrator".
I vaguely guess this might be related with weak/strong host models in Windows:
Could you run the netsh command in the StackOverflow answer to enable weak host model to see if this is the cause?
@wenfengzhuo are you still running into this problem? Since this is so old, I'm going to close this for now, but feel free to reopen if this is still causing you trouble.