Archived

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

Error Starting Server via icegridadmin

Following step by step as per the manual I was able to start the server
via the icegridadmin v3.1.1. I have the following problems/questions:

a. Even though the server exe is running, the admin program says failure to start the server..Here's the error message:

error: the server didn't start successfully:
The server activation timed out.

But the server is actually started! Why is the admin utility reporting an error
then?

b. The server program needs certain environment variables to be set
such as LD_LIBRARY_PATH etc.. What is the recommended way to set
the environment for the server? Currently my server exe points to a shell script that sets the environment variables before running the binary. Is there
a better way?

Thanks for any help or suggestions.

Kishore

Comments

  • bernard
    bernard Jupiter, FL
    Hi Kishore,
    kishore wrote: »
    Following step by step as per the manual I was able to start the server
    via the icegridadmin v3.1.1.

    I recommend to upgrade to Ice 3.2.0 :) However, this wouldn't solve your problems!

    a. Even though the server exe is running, the admin program says failure to start the server..Here's the error message:

    error: the server didn't start successfully:
    The server activation timed out.

    But the server is actually started! Why is the admin utility reporting an error
    then?

    I recommend to check that you did not describe (in your IceGrid server descriptor) any object adapter that the server does not create.

    Ice 3.2.0 has some improvements in this domain: you can now describe object-adapters has having "server lifetime" or not. IceGrid only waits for "server lifetime" object-adapters to activate when it starts a server.
    b. The server program needs certain environment variables to be set
    such as LD_LIBRARY_PATH etc.. What is the recommended way to set
    the environment for the server? Currently my server exe points to a shell script that sets the environment variables before running the binary. Is there
    a better way?

    The recommended way is to describe these environment variables in your server descriptor:
    - 38.15.27 Environment Variables (http://www.zeroc.com/doc/Ice-3.2.0/manual/IceGrid.39.15.html)
    - or with the IceGrid Admin GUI (http://www.zeroc.com/doc/Ice-3.2.0/IceGridAdmin/index.html?app_plain_server.htm)

    Best regards,
    Bernard
  • server start error

    There was a mismatch in the Adapter name I had used in the server
    and the one I had used in the server descriptor. After resolving them
    to a single name, and using the <env> tags to specify the environment
    variables, I still get the same error. This is with 3.1.1

    I decided to upgrade to 3.2 and unfortunately I am having a different
    problem, and not able to reach as far as to try to launch the server.
    This time, when I launch the icegridnode program I get a

    04/10/07 17:57:49.475 error: service caught unhandled Ice exception:
    SharedDb.cpp:34: Freeze::DatabaseException:
    topics's key type is string, not ::Ice::Identity
  • matthew
    matthew NL, Canada
    Looks to me like you are trying to use a 3.1.1 database with 3.2. You cannot do that directly since the database schema changed. You can either remove the database and repopulate it, or you can migrate it using the config/updateicegrid.py script.
  • problem continues

    thanks. I cleaned up the config registry and node subdirectories and
    relaunched. So I am back to the original problem with Ice 3.2.
    I still get a server activation timeout on the icegridadmin. The server program is launched, but it obviously isn't doing something to the registry ?? The server creates an adapter with tcp endpoints, creates an object, activates the adapter and goes into the waitForShutdown. No exceptions are reported..yet, admin things server didn't activate.. What am I missing?

    Thanks again.

    Kishore
  • matthew
    matthew NL, Canada
    Are you sure the OA name still isn't wrong? The simplest way to solve this problem is to post a small self-contained complete compilable example that can duplicate your issue.
  • stripped down version of my problem case

    I am uploading a zipped up file, icetest.zip

    The Makefile may need some changes
    to work on your system to point to ICE headers and libs..


    I used the following commands to

    icegridnode --Ice.Config=Test.config

    icegridadmin --Ice.Config=Test.config

    Here's a snippet..

    Ice 3.2.0 Copyright 2003-2007 ZeroC, Inc.
    >>> application add Test.xml
    >>> application list
    Test
    >>> server start Server
    Started ICE enabled Server
    error: the server didn't start successfully:
    The server activation timed out.
    >>> quit



    thanks
  • matthew
    matthew NL, Canada
    The problem is that you are creating a second communicator in the Application::run method. Since the creation of the initial communicator (by the Application class itself) consumed the command line arguments the second communicator you are creating is missing its configuration (most importantly the value of Ice.Default.Locator). You should change Server::run to
    int
    Server::run(int argc, char* argv[])
    {
        std::cout << "Started ICE enabled Server" << std::endl;
        int status = 0;
        Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapterWithEndpoints("Adapter", "tcp");
        Ice::ObjectPtr object = new ServerObjectI();
        adapter->add(object, communicator()->stringToIdentity("Server"));
    
        adapter->activate();
        communicator()->waitForShutdown();
    
        std::cout << "Exiting  ICE enabled Server" << std::endl;
        return status;
    }
    
  • solved.

    Many thanks. That solved it.
    Kishore

    matthew wrote: »
    The problem is that you are creating a second communicator in the Application::run method. Since the creation of the initial communicator (by the Application class itself) consumed the command line arguments the second communicator you are creating is missing its configuration (most importantly the value of Ice.Default.Locator). You should change Server::run to
    int
    Server::run(int argc, char* argv[])
    {
        std::cout << "Started ICE enabled Server" << std::endl;
        int status = 0;
        Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapterWithEndpoints("Adapter", "tcp");
        Ice::ObjectPtr object = new ServerObjectI();
        adapter->add(object, communicator()->stringToIdentity("Server"));
    
        adapter->activate();
        communicator()->waitForShutdown();
    
        std::cout << "Exiting  ICE enabled Server" << std::endl;
        return status;
    }