Communication via topics does not work after transitioning from Ice 3.5 to 3.7
Hi everyone,
After upgrading to Ubuntu18.04 and Ice 3.7, creating a topic publisher fails with src/Ice/Reference.cpp:1643: ::Ice::NoEndpointException: no suitable endpoint available for proxy IceStorm/TopicManager -t -e 1.0 Aborted (core dumped)
Communication via proxy works fine though!
I am thinking that this might have to do with some configuration issue due to upgrading from 3.5 to 3.7.
My configuration is as follows:
config.registry
IceGrid.InstanceName=IceGrid Ice.Default.Locator = IceGrid/Locator:tcp -p 4061 Ice.Trace.Network = 1 IceGrid.Registry.Client.Endpoints = tcp -p 4061 IceGrid.Registry.Server.Endpoints=tcp IceGrid.Registry.Internal.Endpoints=tcp IceGrid.Registry.LMDB.Path=db IceGrid.Registry.PermissionsVerifier=IceGrid/NullPermissionsVerifier IceGrid.Registry.AdminPermissionsVerifier=IceGrid/NullPermissionsVerifier IceGrid.Registry.DynamicRegistration=1 IceGrid.Registry.SessionTimeout=300 Ice.MessageSizeMax=10000000 IceGrid.Node.CollocateRegistry=1 IceGridAdmin.Username=foo IceGridAdmin.Password=bar
config.node
Ice.Default.Locator = IceGrid/Locator:tcp -p 4061 IceGrid.Node.Name=Node1 IceGrid.Node.Endpoints=tcp IceGrid.Node.Data=data Ice.Trace.Network=1
application.xml
<icegrid> <application name="Demo"> <server-template id="IceStorm"> <parameter name="instance-name" default="IceStorm"/> <parameter name="topic-manager-endpoints" default="tcp -h localhost"/> <parameter name="publish-endpoints" default="tcp"/> <icebox id="${instance-name}" exe="icebox" activation="always"> <service name="${instance-name}" entry="IceStormService,35:createIceStorm"> <dbenv name="${service}"/> <adapter name="${service}.TopicManager" id="${instance-name}.TopicManager" endpoints="${topic-manager-endpoints}"> <object identity="${instance-name}/TopicManager" type="::IceStorm::TopicManager"/> </adapter> <adapter name="${service}.Publish" id="${instance-name}.Publish" endpoints="${publish-endpoints}"/> <properties> <property name="${service}.InstanceName" value="${instance-name}"/> <property name="${service}.Trace.TopicManager" value="2"/> <property name="${service}.Trace.Topic" value="2"/> <property name="${service}.Trace.Subscriber" value="2"/> </properties> </service> </icebox> </server-template> <node name="Node1"> <server-instance template="IceStorm"/> </node> </application> </icegrid>
and the commands I am executing are:
icegridregistry --Ice.Config=config.registry &
icegridnode --Ice.Config=config.node &
icegridadmin --Ice.Config=config.registry,config.node -e "application add 'application.xml'" &
Any idea what might be going wrong?
Tagged:
0
Comments
You should update the IceStorm entry point to 3.7
IceStormService,37:createIceStorm
instead ofIceStormService,35:createIceStorm
in your server template.If you want to run icegridregistry and icegridnode in background is preferable to use
--daemon
command line argument instead of&
.I don't see why you want to run
icegridamin
in background, this command shouldn't take too long to finish.Cheers,
José
Hi José,
Thanks for that! Unfortunately, it doesn't seem to fix the issue
Also, if this was the problem, wouldn't proxies not work too? The weird thing for me is that communication via proxy works fine.
Best,
Pavlos
What is the process that crash? can you provide a stack trace of the crash?
Sure!
This is what I am getting on the subscriber side:
and the IceGrid session outputs:
Can you enable
IceGrid.Node.Trace.Activator=3
andIceGrid.Node.Trace.Adapter=3
in icegridnode, it is not clear where the-e 1.0
is coming fromOk, now that I enabled these, I see the error
icedb.lock
seems to not exist...Just some more info about that... When we switched to Ice 3.7, we changed
IceGrid.Registry.Data=registry
toIceGrid.Registry.LMDB.Path=registry
. Should we have done something more?Your IceStorm service template is missing LMDB configuration
<property name="${service}.LMDB.Path" value="${service.data}"/>
See https://github.com/zeroc-ice/ice/blob/3.7/cpp/config/templates.xml#L42
Thanks for that!
When I added this property, the aforementioned error disappeared, but unfortunately I get a socket_exception now:
Seems an attempt to bind is failing, can you enable network tracing in the service properties
Sure!
Here is the output:
Can you paste or upload the configuration files used in you last attempt so that we can try with the same configuration.
Of course!
I am attaching the application xml, the config files and the bash script I am using (I have added a .txt extension because I couldn't upload them otherwise).
I tested your configuration files and worked fine in my box, I think it might be failing to bind to one of your interfaces.
probably the
Ice.Admin
adapter created by IceBox, can you try addingThanks José!! It worked like a charm!
Could you briefly explain what this fix means?
The default endpoint for
Ice.Admin
adapter istcp -h localhost
, if your system is properly configured for ipv6 localhost usually expands to127.0.0.1, ::1
meaning /etc/hosts have something like:In this case your
lo
interface should have both ipv4 and ipv6 addressesI assume that your Ubuntu machine has a missconfigured ipv6 for
localhost
and as result the bind oftcp -h localhost
was failing, it will be good to fix the ipv6 configuration and use the default endpoint.We have a issue open in github to improve the SocketException to help debugging this issues, see https://github.com/zeroc-ice/ice/issues/389
Then regarding your configuration a few things that you can cleanup:
IceGrid.Registry.DynamicRegistration=1
This doesn't seems useful in your case as your servers are not using dynamic registration, you are defining them in the xml descriptor.Ice.MessageSizeMax=10000000
You shouldn't need that for the registry configuration as it doesn't send large requestsIceGrid.Node.CollocateRegistry
This is mean to run the registry in the same process than the node, as you are running them as separate process doesn't make sense to set this.<dbenv name="${service}"/>
This is not required for IceStorm, it doesn't use Freeze anymore.Cheers,
José