Archived

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

Problems with glacier2router

Hello!!

I have to integrate Glacier2 with IceGrid, and first I am developing a simple example by using Glacier. If I do the test in my host, there are no problems, but when I try to change the Glacier2.Client.Endpoints (in router.cfg and in client.cfg) to the external IP of my firewall I obtain de following exception:

david@TheSecondWorldHeaven:~/tmp/pruebas$ glacier2router --Ice.Config=router.cfg
glacier2router: error: service caught unhandled Ice exception:
Network.cpp:475: Ice::SocketException:
socket exception: Cannot assign requested address

This is my glacier2router config file (router.cfg):

Glacier2.Client.Endpoints=tcp -h ladorada.dyndns.org -p 8000
Glacier2.Server.Endpoints=
Glacier2.SessionManager=Glacier2/manager:default -p 10000
Glacier2.SessionTimeout=60
Glacier2.CryptPasswords=passwords

I use Ice 3.1.0 and Debian Sid.

Thank you very much!!

Comments

  • bernard
    bernard Jupiter, FL
    Hi David,

    You should use the PublishedEndpoints property. Endpoints is for the actual interface on your host.

    Cheers,
    Bernard
  • Thank you for helping me! That was the problem.

    Now I am integrating Glacier2 with IceGrid, but when I launch glacier2router with this config file (router.cfg):

    Glacier2.Client.Endpoints=tcp -h 192.168.1.5 -p 8000
    Glacier2.Client.PublishedEndpoints=tcp -h ladorada.dyndns.org -p 8000
    Glacier2.Server.Endpoints=
    Glacier2.SessionManager=Glacier2/manager:tcp -h 192.168.1.5 -p 10000
    Glacier2.SessionTimeout=60
    Glacier2.CryptPasswords=passwords

    Ice.Default.Locator=IceGrid/Locator:tcp -h 192.168.1.5 -p 9090

    I obtain the following error:

    david@TheSecondWorldHeaven:~/tmp/pruebas$ glacier2router --Ice.Config=router.cfg
    glacier2router: error: service caught unhandled Ice exception:
    Network.cpp:669: Ice::ConnectionRefusedException:
    connection refused: Connection refused

    I have read the Ice Manual and it specifies that it is only necessary to add the last line I have specified. The config file for IceGrid (for the node) is the following:

    IceGrid.Registry.Client.Endpoints=tcp -h 192.168.1.5 -p 9090
    IceGrid.Registry.Server.Endpoints=tcp
    IceGrid.Registry.Admin.Endpoints=tcp
    IceGrid.Registry.Internal.Endpoints=tcp
    IceGrid.Registry.Data=db/registry

    IceGrid.Node.Name=localhost
    IceGrid.Node.Endpoints=tcp
    IceGrid.Node.Data=db/node
    IceGrid.Node.CollocateRegistry=1

    Ice.Default.Locator=IceGrid/Locator:tcp -h 192.168.1.5 -p 9090

    Thank you very much again,
    David.
  • marc
    marc Florida
    Please run glacier2router with logging enabled, to find out what the cause of the ConnectionRefusedException is. Please see this FAQ for details:

    http://www.zeroc.com/faq/connectionRefusedException.html
  • Hello again and sorry for being so annoying, but I don't know how to specify the proxy for the session manager when I use IceGrid. This is my simple application:

    <icegrid>
    <application name="Demo">
    <node name="localhost">

    <server id="Printer"
    exe="./Server.py"
    activation="on-demand">
    <adapter name="SimplePrinterAdapter"
    endpoints="tcp -h 127.0.0.1"
    register-process="true">
    <object identity="Glacier2/manager" type="::Demo:Printer"/>
    </adapter>
    </server>

    </node>
    </application>
    </icegrid>

    Currently, I specify the proxy for the session manager in the config file of glacier2router:

    Glacier2.Client.Endpoints=tcp -h 192.168.1.5 -p 8000
    Glacier2.Client.PublishedEndpoints=tcp -h ladorada.dyndns.org -p 8000
    Glacier2.Server.Endpoints=
    Glacier2.SessionManager=Glacier2/manager:tcp -h 192.168.1.5 -p 10000
    Glacier2.SessionTimeout=60
    Glacier2.CryptPasswords=passwords

    Ice.Trace.Network=2
    Ice.Default.Locator=IceGrid/Locator:tcp -h 127.0.0.1 -p 9090

    I have follow the trace and the problem appears when glacier2router tries to obtain a proxy for the session manager, because there is not an object listening in such address:

    david@TheSecondWorldHeaven:~/tmp/pruebas$ glacier2router --Ice.Config=router.cfg
    [ glacier2router: Network: attempting to bind to tcp socket 192.168.1.5:8000 ]
    [ glacier2router: Network: accepting tcp connections at 192.168.1.5:8000 ]
    [ glacier2router: Network: attempting to bind to tcp socket 127.0.0.1:0 ]
    [ glacier2router: Network: accepting tcp connections at 127.0.0.1:55579 ]
    [ glacier2router: Network: trying to establish tcp connection to 192.168.1.5:10000 ]
    [ glacier2router: Network: trying to establish tcp connection to 192.168.1.5:10000 ]
    glacier2router: error: service caught unhandled Ice exception:
    Network.cpp:669: Ice::ConnectionRefusedException:
    connection refused: Connection refused
    [ glacier2router: Network: accepted tcp connection
    local address = 192.168.1.5:8000
    remote address = 192.168.1.5:37740 ]
    [ glacier2router: Network: closing tcp connection
    local address = 192.168.1.5:8000
    remote address = 192.168.1.5:37740 ]
    [ glacier2router: Network: stopping to accept tcp connections at 192.168.1.5:8000 ]
    [ glacier2router: Network: accepted tcp connection
    local address = 127.0.0.1:55579
    remote address = 127.0.0.1:44036 ]
    [ glacier2router: Network: closing tcp connection
    local address = 127.0.0.1:55579
    remote address = 127.0.0.1:44036 ]
    [ glacier2router: Network: stopping to accept tcp connections at 127.0.0.1:55579 ]

    I suppose the solution should be transparent and without specifying the port...

    How could I solution this problem?

    Thank you very much again!!
  • Hello!

    I have found the problem and all works perfectly. It was a mistake when I specified the proxy! :o