Archived

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

Unable to publish messge on IceStorm

I think its about my config, but could not figure out what.

On Subscriber I have
ObjectAdapter adapter = getCommunicator().createObjectAdapter("Subscriber");

Config:
Subscriber.Endpoints=default

On Icestorm Trace I get:

[ icebox-IceStorm: Topic: Subscribe: a:ca:25:5d:-2d424b91:10553b2c088:-8000 ]
[ icebox-IceStorm: Subscriber: a:ca:25:5d:-2d424b91:10553b2c088:-8000: publish failed: .\Reference.cpp:1103: Ice::NoEndp
ointException:
no suitable endpoint available for proxy `"a:ca:25:5d:-2d424b91:10553b2c088:-8000" -o' ]

Thanks so much

Comments

  • mes
    mes California
    Hi,

    Are you sure that your subscriber is seeing the configuration you've defined? One way to verify that your configuration file is being loaded is to add the property Ice.PrintAdapterReady=1. When you run the subscriber, the Ice run time should print a line indicating the Subscriber adapter is ready (upon adapter activation). If you don't see this line being printed, that is an indication that your configuration file is not being loaded.

    Another alternative is to use createObjectAdapterWithEndpoints:

    ObjectAdapter adapter =
    getCommunicator().createObjectAdapterWithEndpoints("Subscriber", "default");

    Take care,
    - Mark
  • yep my bad. Two set of config files.
    Do we have to put in xxx.Endpoints=default for all the adaptors we create ?
    I could have a bunch of servers using same Adaptor name is that ok. Or I should have different adaptor names

    Thanks
  • mes
    mes California
    Do we have to put in xxx.Endpoints=default for all the adaptors we create ?
    Yes. It is legal to create an object adapter without endpoints, therefore you must specify an endpoint if you want it to have one.
    I could have a bunch of servers using same Adaptor name is that ok. Or I should have different adaptor names
    Yes, servers can share the same adapter name. You would only need to worry about conflicts among adapters when using IcePack, in which case you would have to ensure that each adapter is registered with a unique id.

    Take care,
    - Mark
  • bernard
    bernard Jupiter, FL
    jaggu wrote:
    Do we have to put in xxx.Endpoints=default for all the adaptors we create ?

    Also keep in mind what xxx.Endpoints=default means!

    Unless you set Ice.Default.Protocol, it's equivalent to
    xxx.Endpoints=tcp

    i.e. this creates a TCP endpoint: the port is allocated by the OS, and the interface is the one that corresponds to Ice.Default.Host (the local hostname if it's not defined).

    Cheers,
    Bernard