Archived

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

Ice.NoEndpointException

Environment:
RH9 Linux
Ice 3.3.0
Python 2.5

I get the following messages in syslog when starting my IceStorm server program, clues welcome:

Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Adapter: waiting for activation of server `IRS1MonData' adapter `IRS1MonData.IceStorm.IceStorm.TopicManager'
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Server: changed server `IRS1MonData' state to `Activating'
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Activator: activating server `IRS1MonData' path = icebox pwd = / uid/gid = 99/99 args = icebox --Ice.Config=/var/lib/ice/icegrid/irs1mon/servers/IRS1MonData/config/config
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Server: changed server `IRS1MonData' state to `WaitForActivation'
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Activator: detected termination of server `IRS1MonData' exit code = 1
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Server: changed server `IRS1MonData' state to `Deactivating'
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Adapter: server `IRS1MonData' adapter `IRS1MonData.IceStorm.IceStorm.Node' deactivated
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Adapter: server `IRS1MonData' adapter `IRS1MonData.IceStorm.IceStorm.Publish' deactivated
Jun 23 10:48:28 irs1 icegridregistry (IRS1MonIceGrid Master)[6695]: Locator: couldn't resolve adapter `IRS1MonData.IceStorm.IceStorm.TopicManager' endpoints: IceGrid::AdapterNotActiveException
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Adapter: server `IRS1MonData' adapter `IRS1MonData.IceStorm.IceStorm.TopicManager' deactivated
Jun 23 10:48:28 irs1 icegridnode (IceGrid irs1mon)[6892]: Server: changed server `IRS1MonData' state to `Inactive'

Comments

  • bernard
    bernard Jupiter, FL
    Hi Philip,

    This shows that the IceGrid node tried to start your IceBox/IceStorm server but the startup was not successful.

    Could you post the XML configuration for this IceStorm server (or your entire application)?

    You should also consider upgrading to a more recent Linux and Ice versions!

    Cheers,
    Bernard
  • More information: application.xml

    <!--
    **********************************************************************

    Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.

    This copy of Ice is licensed to you under the terms described in the
    ICE_LICENSE file included in this distribution.

    **********************************************************************
    -->
    <icegrid>

    <application name="IRS1MonData">

    <server-template id="IceStorm">
    <parameter name="topic-manager-endpoints" default="default"/>
    <parameter name="publish-endpoints" default="default"/>
    <parameter name="node-endpoints" default="default"/>
    <parameter name="instance-name"/>

    <icebox id="${instance-name}" exe="icebox" activation="on-demand">
    <service name="IceStorm" entry="IceStormService,33:createIceStorm">
    <dbenv name="${service}"/>
    <adapter name="${service}.TopicManager" endpoints="${topic-manager-endpoints}">
    <object identity="${instance-name}/TopicManager" type="::IceStorm::TopicManager"/>
    </adapter>
    <adapter name="${service}.Publish"
    endpoints="${publish-endpoints}"/>
    <adapter name="${service}.Node"
    endpoints="${node-endpoints}"/>
    <properties>
    <property name="${service}.InstanceName" value="${instance-name}"/>
    <property name="${service}.Trace.TopicManager" value="2"/>
    <property name="${service}.Trace.Topic" value="1"/>
    <property name="${service}.Trace.Subscriber" value="1"/>
    <property name="${service}.Trace.Election" value="1"/>
    </properties>
    </service>
    </icebox>
    </server-template>
    <node name="irs1mon">
    <server-instance template="IceStorm" instance-name="IRS1MonData"/>
    </node>

    </application>

    </icegrid>
  • More information: code

    self.props = Ice.createProperties(sys.argv)
    self.props.setProperty("Ice.Default.Locator",
    "IRS1MonIceGrid/Locator:default -p 4061")
    self.props.setProperty("TopicManager.Proxy",
    "IRS1MonData/TopicManager")
    if props:
    self.props.setProperty(props[0], props[1])
    self.iceId = Ice.InitializationData()
    self.iceId.properties = self.props
    self.pubId = pubId
    self.communicator = Ice.initialize(self.iceId)
    manager = IceStorm.TopicManagerPrx.checkedCast(\
    self.communicator.propertyToProxy('TopicManager.Proxy'))
    if not manager:
    print args[0] + ": invalid proxy"
    return 1
    try:
    topic = manager.retrieve(self.pubId)
    except IceStorm.NoSuchTopic, e:
    try:
    topic = manager.create(self.pubId)
    except IceStorm.TopicExists, ex:
    print self.appName() + ": temporary error. try again"
    return 1
    publisher = topic.getPublisher();
    publisher = publisher.ice_oneway();
    self.monitor = IRS1Mon.IRS1MonProgressPrx.uncheckedCast(publisher)
  • More information: versions

    "You should also consider upgrading to a more recent Linux and Ice versions!"

    Believe me, I am anxious to do so, but other dependencies prevent it for now...
  • bernard
    bernard Jupiter, FL
    Hi Philip,

    It's a server-side issue -- the IceGrid node forks the IceStorm server but it doesn't start.

    Perhaps an environment or permission problem.

    With your IceGrid node and registry running, you could try to run manually in a terminal:
    icebox --Ice.Config=/var/lib/ice/icegrid/irs1mon/servers/IRS1MonData/config/config 
    

    preferably with the same user [99/99] and environment as your IceGrid node, and see if it you get more information on why it doesn't start.

    Cheers,
    Bernard
  • Why user "nobody"?

    Hi Bernard,

    User '99' is 'nobody' - why would it be trying to use that?
  • bernard
    bernard Jupiter, FL
    Hi Philip,

    Apparently you are running your IceGrid node as 'root', and as a security-measure, IceGrid node starts child processes by default as 'nobody' and not root: see http://www.zeroc.com/doc/Ice-3.3.1/manual/IceGrid.40.24.html

    I suspect the best approach here would be to run your IceGrid registry, IceGrid node(s) and the servers started by your IceGrid node(s) as a non-root user, e.g. yourself or a special 'ice' user.

    If you just want to get this going quickly, you can use the user attribute in your server descriptor to run IceStorm as root (user="root").

    Cheers,
    Bernard
  • Problem solved!

    Running 'icegridnode' as user 'ice' did the trick - thanks, Bernard!