Archived

This forum has been archived. Please start a new discussion on GitHub.

Running HelloWorld Client on remote computer

Hi!
I'm trying to run helloworld demo with client in my friend's house and server in my work. But I didn't receive the client message, and client receive this error:


Ice.ConnectFailedException
error = 0
at IceInternal.ConnectRequestHandler.getConnection(ConnectRequestHandler.java:240)
at IceInternal.ConnectRequestHandler.sendRequest(ConnectRequestHandler.java:138)
at IceInternal.Outgoing.invoke(Outgoing.java:66)
at Ice._ObjectDelM.ice_isA(_ObjectDelM.java:30)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:111)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:77)
at Demo.PrinterPrxHelper.checkedCast(PrinterPrxHelper.java:248)
at ClientTwo.main(ClientTwo.java:11)
Caused by: java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at IceInternal.Network.doFinishConnect(Network.java:325)
at IceInternal.TcpTransceiver.initialize(TcpTransceiver.java:33)
at Ice.ConnectionI.initialize(ConnectionI.java:1831)
at Ice.ConnectionI.message(ConnectionI.java:1038)
at IceInternal.ThreadPool.run(ThreadPool.java:302)
at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
at java.lang.Thread.run(Unknown Source)


Both machines ping fine. Firewall is off. What can I do?


Server side :


C:\Documents and Settings\M*****\Desktop\ZeroC test\bin>java -classpath .;./Ic
e.jar Server --Ice.Trace.Network=2
-- 28/09/11 11:20:48:758 Network: attempting to bind to tcp socket 0.0.0.0:10000

-- 28/09/11 11:20:48:758 Network: accepting tcp connections at 0.0.0.0:10000
local interfaces: 150.162.64.153, 127.0.0.1
-- 28/09/11 11:20:48:758 Network: published endpoints for object adapter `Simple
PrinterAdapter':
tcp -h 150.162.64.153 -p 10000

Comments

  • bernard
    bernard Jupiter, FL
    Hi Tatiana,

    This looks like a firewall problem.

    It seems very unlikely that your computer at work would be connected directly to the Internet (with IP address 150.162.64.153) with no firewall at all. It could be a software firewall on the computer itself, or an external device, or both. You just need to make sure port 10,000 is open.

    Once your Ice server is running, you can use telnet from your friend's computer to "test" the connection:
      telnet 150.162.64.153 10000
    

    You should also double-check the proxy used by your client; it should include "tcp -h 150.162.64.153 -p 10000".

    Best regards,
    Bernard
  • Hi!
    Thx for help. I'll try use glacier to solve this problem. Soon I'm back with new questions :)
    Hugs!
  • bernard
    bernard Jupiter, FL
    With Glacier2, you will still need to open one port on your server-side firewall ... Glacier2 does not magically circumvent this firewall.

    One advantage of using Glacier2 is when you have multiple servers behind your firewall: with Glacier2, you can open just one port, and all traffic between clients (outside the firewall) and servers (inside) will traverse the firewall through this one opened port. Glacier2 also provides a number of authentication and filtering options to make this traversal "safe", as you probably don't want to completely open your server-side network to any client.

    If you have multiple servers behind your firewall and don't use Glacier2, you would typically have to open one port for each server (really: object adapter), which is not very convenient.

    Best regards,
    Bernard