|
|
|
|||||
|
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" Code:
icegridadmin -u yy -p xx --Ice.Config=conf/iceadmin-config.properties -e "application remove app_sysnodeagent" 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 |
|
||||||
|
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:
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:
Let us know if this doesn't help solving your problem! Cheers, Benoit. |
|
|||||
|
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>
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 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 |
|
||||||
|
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 |
|
|||||
|
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 |
|
||||||
|
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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |