Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-15-2007
Wilko Wilko is offline
Registered User
 
Name: Wilko Kempa
Organization: sd&m AG
Project: System Management and Monitoring Plattform
 
Join Date: Jun 2007
Posts: 5
Does icegrid app remove, stop the servers of the app?

Hi,

for reregistration of our icegrid applications we start icegridadmin command line with -e option from the rpm postinstall and preremove-scripts.

postinstall
Code:
icegridadmin -u yy -p xx --Ice.Config=conf/iceadmin-config.properties -e "application add apps/sysnodeagent/grid-config.xml"
preremove
Code:
icegridadmin -u yy -p xx --Ice.Config=conf/iceadmin-config.properties -e "application remove app_sysnodeagent"
During preremove step the applications are usually running and need to be stopped. Does icegrid stop the servers of an application during remove or do we have to stop the server before the remove step?

Unregister currently takes a long time for running processes but the application is successfuly unregistered after ~4min (the application processes remain running - this might be an error in the applications that requires a kill -9).

Best Regards,
Wilko

-------------------------------
Wilko Kempa
sd&m AG
Common Service Plattform
Reply With Quote
  #2 (permalink)  
Old 06-15-2007
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,545
Hi Wilko,

The "application remove" command always stops the server before removing them. It sounds like your servers don't shutdown in a timely manner and this is causing application remove to block for some time.

The IceGrid node does the following to shutdown a server:
  • if a process object is registered for your server, the IceGrid node invokes the shutdown method in the server process object (see "32.17.6 Process Registration" here for more information on process objects).
  • if no process object is registered for the sever, the IceGrid node sends the SIGTERM signal to the process (on Windows, it sends a Ctrl-Break event).

Then, the node waits for the process to exit or for the server deactivation timeout to expire. If the server deactivation timeout expires, the node kills the server. You should be able to see this by activating IceGrid node activation tracing with the IceGrid.Node.Trace.Activator=2 property set in the node configuration file.

To avoid the delays when removing the application you have the following options:
  • Ensure your servers always stop in a timely manner.
  • Reduce the deactivation timeout for servers which are never expected to shutdown in a timely manner (you can configure this with the deactivation-timeout attribute in the server descriptor, see the IceGrid XML descriptor reference for more information)
  • Explicitly kill the servers before issuing the "application remove" command. You can kill a server with the "server signal <serverid> SIGKILL" command.

Let us know if this doesn't help solving your problem!

Cheers,
Benoit.
Reply With Quote
  #3 (permalink)  
Old 06-15-2007
Wilko Wilko is offline
Registered User
 
Name: Wilko Kempa
Organization: sd&m AG
Project: System Management and Monitoring Plattform
 
Join Date: Jun 2007
Posts: 5
Process configuration and activation

Hi Benoit,

after your advice to use Process to stop our applications i checked our configs. It seems we were missing the application site config of the process configuration (Ice.ServerId, ManagedNodeAdapter.RegisterProcess=1).

Now if i start the application manuall from my development environment the server state remains inactive(enabled). I guess this is because icegrid requires the pid/handle to the application so it requires to start the application itself via exe? Is this correct or is there something wrong with my configuration?

On the registration side we specify
Code:
<icegrid>
    <application name="app_xxx">
        <node name="mediaserver">
            <server id="srv_xxx"
                    exe="apps/xxx/run.sh"
                    user="xxx"
                    activation="manual">
                <adapter name="ManagedNodeAdapter"
                         id="ManagedNodeAdapterAtxxx"
                         register-process="true"
                         endpoints="tcp"/>
            </server>
        </node>
    </application>
</icegrid>
This already tells the registry to expect a process for the server via the given adapter.

At the application configuration we need to configure Ice.ServerId and also ManagedNodeAdapter.RegisterProcess=1
Code:
Ice.Default.Locator=IceGrid/Locator:tcp -h localhost -p 12000

# Object Adapter Config
ManagedNodeAdapter.AdapterId=ManagedNodeAdapterAtxxx
ManagedNodeAdapter.ReplicaGroupId=
ManagedNodeAdapter.Endpoints=default
ManagedNodeAdapter.ThreadPool.Size=10
# this should match server id attribute from deployment descriptor
Ice.ServerId=srv_xxx

# this indicates the communicator should register shutdown process.
ManagedNodeAdapter.RegisterProcess=1
The strange thing even with IceGrid.Node.Trace.Activator=2
IceGrid.Node.Trace.Server=2 enabled. There seems no contact between the application and the grid. Grid comes up and set all servers to inactive (manual start for debugging).

Thanks in advance
Wilko
Reply With Quote
  #4 (permalink)  
Old 06-15-2007
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,545
Hi Wilko,

You're correct -- the node only cares about servers it starts so the behavior you're seeing is expected. If you start manually a server managed the IceGrid node, the node won't monitor the process.

There will be some interactions between the node and the server however, you should be able to see it if you enable adapter tracing on the node with IceGrid.Node.Trace.Adapter=2. You should see that the server still registers its object adapter endpoints with the node to make it possible for clients to resolve indirect proxies from the server object adapters even if it's started manually.

Let me know if you need more information on this!

Cheers,
Benoit.
Reply With Quote
  #5 (permalink)  
Old 06-15-2007
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 818
Hi Wilko,

When you deploy a server with IceGrid (typically a server hosting indirect object adapters), IceGrid generates the Ice configuration for this server from your server descriptor. And then when IceGrid starts such a server, it passes --Ice.Config=<path to generated config file> as a command-line argument to the server (exe) your registered. You should not write your own regular Ice config file for such server.

You can enter this "server descriptor" either in an XML file processed by icegridadmin or with the IceGrid Admin GUI. You can even create such server descriptor programmatically, by writing a program/script that calls the IceGrid::Admin interface.

We do not recommend to edit the Ice configuration files generated by IceGrid for your servers; if you want to set an additional property in a server, you should edit the source XML file or use the IceGrid Admin GUI.

IceGrid, through its IceGrid nodes, monitors only the servers it starts. If you start a server on the command line (./myServer --Ice.Config=.../myServer.conf), IceGrid won't detect that the server is running even if you set everything right in myServer.conf (ServerId etc.).

Note that the activation mode "manual" means "the server is started through an explicit IceGrid admin command" -- it does mean "the server will be started on the command-line".
That's in contrast to the "on-demand" activation mode, where IceGrid starts automatically a server when a client looks for an object adapter in that server (while resolving an indirect proxy).

I hope this is clearer now!

Best regards,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
  #6 (permalink)  
Old 06-16-2007
Wilko Wilko is offline
Registered User
 
Name: Wilko Kempa
Organization: sd&m AG
Project: System Management and Monitoring Plattform
 
Join Date: Jun 2007
Posts: 5
Hi Bernoit and Bernard,

thanks for the information. So I think we will switch to xml-config only. Is there a DTD or Schema that we can use? I've seen the description at chapter 38.15. but tool based validation and editor support - always helps.

Best Regards
Wilko
Reply With Quote
  #7 (permalink)  
Old 06-16-2007
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 818
Hi Wilko,

We don't have a schema or DTD for the IceGrid XML; it's parsed and validated by icegridadmin.

There is however a convenient tool to create syntactically correct IceGrid XML files: the IceGrid Admin GUI.

If you did not try it yet, you can launch it on Windows by double-clicking on IceGridGUI.jar (in the bin directory). On Linux with a RPM installation, you can launch it with:
$ java -jar /usr/lib/Ice-3.2.0/IceGridGUI.jar

Make sure to use Sun JDK/JRE >= 1.4.2 and not the the GCJ JVM.

Best regards,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting servers with IceGrid::Admin borax00 Help Center 2 03-19-2007 12:00 AM
getifaddrs() does not supported by glibc, IceE fails to make app in /IceE/test syseeker Help Center 2 07-02-2006 10:27 PM
Remove() or RemoveAt() ??? DeepDiver Bug Reports 1 01-31-2006 04:30 PM
IceBox/ C# and App.config stephan Help Center 0 01-12-2006 05:56 AM
stop the daemon nsns Help Center 6 09-15-2004 03:21 PM


All times are GMT -4. The time now is 02:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.