Home Help Center

Ice grid / starting server by program.

LaurentLaurent Member Laurent CarcagnoOrganization: ISIS-MPPProject: Distributed simulator
Hi,
I'm trying to admin an IceGrid registry programmatically.

So, inspired by IceGridNode, I'm developing a node that automatically
register itself and its available server.
One of the node uses collocation to handle the registry.
The servers are in charge to register their adapters.

When the node try to activate the server by itself using startServer,
I don't know why but a _stop Command is fired during the load step.

The same thing seems to happen when I try to activate the server through the IceGridGUI.
-- 04/12/10 20:33:52.308 O3SNode: Activator: activating server `RTS2Server'
   path = C:\Projects\Techniware\O3SRT\O3S\O3SServer.exe
   pwd = C:\Projects\Techniware\O3SRT\O3S
   args = C:\Projects\Techniware\O3SRT\O3S\O3SServer.exe --Ice.Config=C:\\Projects\\Techniware\\O3SRT\\O3S/nodedata/serv
ers/RTS2Server/config/config
-- 04/12/10 20:33:52.772 O3SNode: Locator: registered server `RTS2Server' process proxy: `2e6e62a4-b0ef-4d0f-bc63-0aae63
d11a90/admin -f Process -t:tcp -h 127.0.0.1 -p 60401'
-- 04/12/10 20:33:52.853 O3SNode: Session: admin session `RTS2Admin' created
-- 04/12/10 20:33:52.921 O3SNode: Adapter: added adapter `RTS2Adapter'
-- 04/12/10 20:33:52.926 O3SNode: Object: added allocatable object `RTS2VariablesProvider'
-- 04/12/10 20:33:52.932 O3SNode: Object: added allocatable object `RTS2MessagesProvider'
[12-04-2010  18:34:02.935] 3:Error PORTABLE o3s.extension.remote.variables : ObjectAdapterI.cpp:1327: Ice::NotRegistered
Exception:
 no object adapter with id `RTS2Adapter' is registered

This error is strange to me because the node says :
RTS2Adapter has been added
and when calling activate on the adapter, the server got the error no object adapter with id `RTS2Adapter' is registered .

But when I activate the server from the command line, it works.
Except that only the adapters appears to be active on the GUI
(not the server).



Thanks,
Laurent

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    It's really not clear to me what you're trying to do. It sounds like your server creates an administrative session with the registry to add programmatically its object adapter and allocatable objects?

    If that's the case, this won't work because updating the server deployment information in such a way requires the server to be re-started. Why don't you register the object adapter prior to the server startup?

    Please also specify with platform and Ice version you are using.

    Cheers,
    Benoit.
  • LaurentLaurent Member Laurent CarcagnoOrganization: ISIS-MPPProject: Distributed simulator
    Hi Benoit,

    You're right, it wasn't really clear, sorry ;-)

    Effectively, the server creates an administrative session to register programmatically its object adapter and allocatable objects (because
    only it knows about them at runtime).

    So if I understand well your answer, if a server is started by a node, the adapter and allocatable objects of this server must be known before to
    start the server.

    I'm using Windows 7, Mac OSX and Linux platform with Ice 3.4.
    (Programming language are C++ & Python)

    Thanks for your answer,
    Best Regards
    Laurent.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Correct. If you try to modify the server deployment while the server is running, IceGrid will require a restart of the server. So you can't modify this information from the server itself. You need some other process to setup correctly the server deployment before the server is started.

    Cheers,
    Benoit.
  • LaurentLaurent Member Laurent CarcagnoOrganization: ISIS-MPPProject: Distributed simulator
    Hi Benoit,
    Thanks for your help.
    Laurent
Sign In or Register to comment.