Archived

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

Glacier problem

Hi,

I have a big trouble when I attempt to develop the distributed application with Glacier. The physical firewall dedicates a port 9004 for the server. So the server got a public address with one port 9004. The other ports are mapped to others machines. There are multiple clients need to request the server and receive callbacks from the server. I try to run the demo, StarterC and StarterS, but failed. The config of GlacierStarter is followed:

Glacier.Starter.CryptPasswords=hellopasswords
Glacier.Starter.Endpoints=tcp -p 9004 -t 30000
Glacier.Starter.PropertiesOverride=Ice.ServerIdleTime=10
Glacier.Router.Endpoints=tcp -h 211.92.163.36 -p 9004
Glacier.Router.Client.Endpoints=tcp -h 192.168.0.1
Glacier.Router.Server.Endpoints=tcp -h 211.92.163.36

The output of client is followed:
creating and activating callback receiver adapter... ok
creating and adding callback receiver object... ok
testing stringToProxy for glacier starter... ok
testing checked cast for glacier starter... ok
starting up glacier router... client: Glacier::CannotStartRouterException:
timeout while starting `C:\Program Files\demo\glaci
errouter.exe'

The output of GlacierStarter is followed:
[ glacierstarter: Network: attempting to bind to tcp socket 192.168.0.1:9004 ]
[ glacierstarter: Network: accepting tcp connections at 192.168.0.1:9004 ]
[ glacierstarter: Network: accepted tcp connection
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: sent 14 of 14 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: received 14 of 14 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: received 56 of 56 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: sent 26 of 26 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: received 14 of 14 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: received 54 of 54 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: attempting to bind to tcp socket 192.168.0.1:0 ]
[ glacierstarter: Network: accepting tcp connections at 192.168.0.1:3423 ]
[ glacierstarter: Network: attempting to bind to tcp socket 211.92.163.36:0 ]
C:\Program Files\demo\glacierrouter.exe: D:\jiexin_
project\Ice-1.5.1\src\Ice\Network.cpp:377: Ice::SocketException:
socket exception: WSAEADDRNOTAVAIL
[ glacierstarter: Network: stopping to accept tcp connections at 192.168.0.1:342
3 ]
glacierstarter: error: Glacier::CannotStartRouterException
[ glacierstarter: Network: sent 162 of 162 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: received 14 of 14 bytes via tcp
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]
[ glacierstarter: Network: closing tcp connection
local address = 192.168.0.1:9004
remote address = 61.144.193.12:65169 ]

How should I configure it?

Regards,

Comments

  • Hi,

    I want to run GlacierRouter on server. The config is below:
    Glacier.Router.Endpoints=tcp -h 211.92.163.36 -p 9004
    Glacier.Router.Client.Endpoints=tcp -h 211.92.163.36
    Glacier.Router.Server.Endpoints=tcp -h 192.168.0.1

    The firewall maps the public address 211.92.163.36 and the port 9004 to the server.

    When I run the GlacierRouter, it fails. The error is below:
    [ glacierrouter: Network: attempting to bind to tcp socket 211.92.163.36:0 ]
    glacierrouter: D:\Ice-1.5.1\src\Ice\Network.cpp:377: Ice::SocketException:
    socket exception: WSAEADDRNOTAVAIL

    If I modify the config to:

    Glacier.Router.Endpoints=tcp -p 9004
    Glacier.Router.Client.Endpoints=tcp
    Glacier.Router.Server.Endpoints=tcp -h 192.168.0.1

    The GlacierRouter could run but the client caught the exception:
    [ client: Network: tcp connection established
    local address = 192.168.0.102:4467
    remote address = 211.92.163.36:9004 ]
    [ client: Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ client: Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 57
    request id = 1
    identity = Glacier/router
    facet =
    operation = getClientProxy
    idempotent = true
    context = ]
    [ client: Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 65
    request id = 1
    reply status = 0 (ok) ]
    client: E:\DevTool\ICE\Ice-1.5.1\src\Ice\Network.cpp:509: Ice::ConnectionRefused
    Exception:
    connection refused: WSAECONNREFUSED
    [ client: Protocol: sending close connection
    message type = 4 (close connection)
    compression status = 1 (not compressed; compress response, if any)
    message size = 14 ]
    [ client: Network: closing tcp connection
    local address = 192.168.0.102:4467
    remote address = 211.92.163.36:9004 ]

    E:\DevTool\ICE\Ice-1.5.1\demo\Ice\callback>client
    [ client: Network: tcp connection established
    local address = 192.168.0.102:4472
    remote address = 211.92.163.36:9004 ]
    [ client: Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ client: Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 57
    request id = 1
    identity = Glacier/router
    facet =
    operation = getClientProxy
    idempotent = true
    context = ]
    [ client: Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 65
    request id = 1
    reply status = 0 (ok) ]
    client: E:\DevTool\ICE\Ice-1.5.1\src\Ice\Network.cpp:509: Ice::ConnectionRefused
    Exception:
    connection refused: WSAECONNREFUSED
    [ client: Protocol: sending close connection
    message type = 4 (close connection)
    compression status = 1 (not compressed; compress response, if any)
    message size = 14 ]
    [ client: Network: closing tcp connection
    local address = 192.168.0.102:4472
    remote address = 211.92.163.36:9004 ]

    E:\DevTool\ICE\Ice-1.5.1\demo\Ice\callback>client
    [ client: Network: tcp connection established
    local address = 192.168.0.102:4477
    remote address = 211.92.163.36:9004 ]
    [ client: Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ client: Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 57
    request id = 1
    identity = Glacier/router
    facet =
    operation = getClientProxy
    idempotent = true
    context = ]
    [ client: Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 65
    request id = 1
    reply status = 0 (ok) ]
    client: E:\DevTool\ICE\Ice-1.5.1\src\Ice\Network.cpp:509: Ice::ConnectionRefused
    Exception:
    connection refused: WSAECONNREFUSED
    [ client: Protocol: sending close connection
    message type = 4 (close connection)
    compression status = 1 (not compressed; compress response, if any)
    message size = 14 ]
    [ client: Network: closing tcp connection
    local address = 192.168.0.102:4477
    remote address = 211.92.163.36:9004 ]
  • marc
    marc Florida
    You cannot run Glacier behind a firewall. Glacier *is* the firewall, meaning that Glacier itself must run on a host that has a connection to both the public internet and the internal network.

    Furthermore, Glacier (if you use both the starter and the router) cannot be limited to use one port only. It will use one random port per client. This will be changed with Glacier 2, i.e, Glacier 2 will only require one open port.

    You should trace with Ice.Trace.Network=2, so that connection attempts are also traced. With Ice.Trace.Network=1, only connection attempts are traced.
  • Thanks for your response. It seems I have to wait for the Glacier2:( . Would you please anounce when the Glacier2 release?

    Wishs,