Results 1 to 3 of 3

Thread: about DisableOnFailure

  1. #1
    gridnt is offline Registered User
    Name: zhang minghao
    Organization: www.gridnt.com
    Project: smart substation
    Join Date
    Sep 2011
    Location
    jinan,shandong,china
    Posts
    4

    about DisableOnFailure

    Hi guys
    Any body can help us? Thanks in advance.
    We encountered two problems when we use the IceGrid to
    manage(start,monitor,stop) our programs.
    1 When our program crashed because of NULL pointer, IceGrid didnot start the
    program again as we expected and the status of server became "disabled".
    But we has setted the server's boot mode to "always" and
    IceGrid.Node.DisableOnFailure=0.
    We expect IceGrid can detecte our program crashed and start our program
    again,and it status should always be "active".
    Moreover,We tried to set IceGrid.Node.DisableOnFailure to a non-zero value,
    it didn't take any effect.

    2 Sometimes icegridnode cannot generate config file when it was started.
    Sometime it did the work.

    Our test bed: Cetnos5 64bits and ICE3.4.2

    Belowing is our test code and configuration. This program will be terminated
    unexpectedly with signal SIGSEGV.


    hello.cpp:

    #include <iostream>
    using namespace std;

    int main()
    {
    cout<<"hello"<<endl;
    char* a;
    a[3] = 'a';
    cout<<"hello2"<<endl;

    return 0;
    }

    hello.xml:
    <icegrid>
    <application name="hello">
    <node name="helloNode">
    <server id="helloServer" exe="./hello" activation="always">
    <adapter name="helloAdapter" id="helloAdapter"
    endpoints="tcp"/>
    <property name="Ice.Default.Locator" value="tcp -p 10000"/>
    </server>
    </node>
    </application>
    </icegrid>

    hello.node:
    Ice.Default.Locator=testGrid/Locator: default -p 4061 -t 5000
    #Ice.Default.EndpointSelection=Ordered
    IceGrid.Node.Name=helloNode
    IceGrid.Node.Endpoints=default -t 5000
    IceGrid.Node.Data=db
    IceGrid.Node.DisableOnFailure=0

  2. #2
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Yes, regardless of the value of the DisableOnFailure property, IceGrid will deactivate servers that fail to activate if they have the "always" activation mode.

    If your server did activate successfully it would work as you expect. A server is considered to activate successfully by IceGrid if it registers the endpoints of the object adapters declared in its XML descriptor. With your test case, you should first make sure activation succeeds by creating the communicator, object adapter and activating the object adapter. I recommend using the IceGrid simple demo to try this out, you can for instance add the code that raises the SEGFAULT after the adapter activate call to see if it behaves correctly.

    Cheers,
    Benoit.

  3. #3
    gridnt is offline Registered User
    Name: zhang minghao
    Organization: www.gridnt.com
    Project: smart substation
    Join Date
    Sep 2011
    Location
    jinan,shandong,china
    Posts
    4
    Sometimes icegridnode cannot generate config file when it was started.
    Sometime it did the work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •