Archived

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

Random ports with Topic Manager

Greetings,

Our restraints on our project are rather strict. I’ve found that Ice meets all of our criteria aside from a few port issues I’m having. In order to use Ice (specifically IceStorm), I need a list of ports that Ice will use. I’ve managed to make each port to be used known - aside from two.

When publishing with IceStorm, the following:

topicManager = IceStorm::TopicManagerPrx::checkedCast(proxyObject);

establishes a connection to the icebox server, but uses a random local port. This also happens when calling the RPC.

Is it possible to configure these to use a known port (ex. 13000)?

Thanks for your help!

OS: Win, Linux, Solaris, OSX
Ice version: 3.1.0

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Yes, you can configure a fixed port for the the topic manager and publish endpoints of the IceStorm service. See the documentation of the following properties in the Ice manual:
    IceStorm.TopicManager.Endpoints
    IceStorm.Publisher.Endpoints

    Note that these property names assume that the service name of your IceStorm service is "IceStorm". If it's not, you should replace "IceStorm" with the name of your service (e.g.: MyService.TopicManager.Endpoints). I also recommend to take a look at the section 42.9 in the Ice manual where it explains how to configure IceStorm.

    Cheers,
    Benoit.
  • Benoit,

    From my understanding, those config items are to be used for the icebox server. What I was referring to was configuring the subscriber/publisher’s topic manager local port.

    Using the IceStorm examples:
    #config.pub
    IceStorm.TopicManager.Proxy=DemoIceStorm/TopicManager:default -h 10.x.x.xx2 -p 9000
    Ice.Trace.Network=1
    $ ./publisher
    [ ./publisher: Network: tcp connection established
    local address = 10.x.x.xx7:42550
    remote address = 10.x.x.xx2:9000 ]
    publishing 10 tick events
    [ ./publisher: Network: tcp connection established
    local address = 10.x.x.xx7:42551
    remote address = 10.x.x.xx2:9500 ]
    [ ./publisher: Network: closing tcp connection
    remote address = 10.x.x.xx2:9000 ]
    [ ./publisher: Network: closing tcp connection
    local address = 10.x.x.xx7:42551
    remote address = 10.x.x.xx2:9500 ]
    How can I prevent my local address from connecting using a random port (in this case 42550 and 42551)?

    Also, thanks for the extremely fast response!
  • marc
    marc Florida
    Ice does only allow you to choose the ports for incoming connections (i.e., the ports that servers listen to), but it does not allow you to choose the ports for outgoing connections (i.e., the ports that clients use to establish a connection).

    If you have a commercial interest in such a feature, please contact us at info@zeroc.com.