I ended up wrapping it in a script so that there are no parameters.
armonitor seems to start and stop the java plugin daemon without a
hitch like this.  This script is a slight variant to the script
included with the plugin server.

[EMAIL PROTECTED] /home/remedy]$ cat
/etc/arsystem/sundev71/armonitor.conf |grep pluginsvr
#/usr/java/bin/java -Xmx512m -classpath
/usr/ar/sundev71/pluginsvr:/usr/ar/sundev71/pluginsvr/arpluginsvr71.jar
com.bmc.arsys.pluginsvr.ARPluginServerMain -x sundev71 -i
/usr/ar/sundev71 -m
/usr/ar/sundev71/pluginsvr/pluginsvrstartup.sh

[EMAIL PROTECTED] /home/remedy]$ cat
/usr/ar/sundev71/pluginsvr/pluginsvrstartup.sh
#!/bin/sh

UMEM_DEBUG=default
UMEM_LOGGING=transaction
LD_PRELOAD=libumem.so.1
export UMEM_DEBUG UMEM_LOGGING LD_PRELOAD

LD_LIBRARY_PATH=.:../bin
SHLIB_PATH=.:../bin
LIBPATH=.:../bin

CLASSPATH=.:arapi71.jar:arrpc71.jar:arcmn71.jar:arpluginsvr71.jar:oncrpc.jar:portmap.jar:log4j-1.2.14.jar:spring.jar:commons-logging-1.1.jar:commons-configuration-1.3.jar:commons-lang-2.2.jar:commons-collections-3.2.jar:commons-digester-1.7.jar:commons-beanutils.jar:commons-codec-1.3.jar

export LD_LIBRARY_PATH SHLIB_PATH LIBPATH CLASSPATH

exec $JAVA_HOME/bin/java -Xmx512m
com.bmc.arsys.pluginsvr.ARPluginServerMain -x localhost -i ./..

[EMAIL PROTECTED] /home/remedy]$ ptree 846
846   ./armonitor -s sundev71 -c /etc/arsystem/sundev71/armonitor.conf
  847   ./arserverd -s sundev71 -i /usr/ar/sundev71 -l /etc/arsystem/sundev71
    870   ./arforkd -s sundev71 -l /usr/ar/sundev71/db/arfork.log
  868   ./arsvcdsp -s sundev71 -d /usr/ar/sundev71
  869   ./arplugin -s sundev71 -i /usr/ar/sundev71
  871   /bin/java -Xmx512m com.bmc.arsys.pluginsvr.ARPluginServerMain
-x localhost -i .
  872   /usr/java/bin/java
-Djava.library.path=/usr/ar/sundev71/apps/aremail -cp /usr/a

The exec preceding the call to java hands off pid ownership to the
spawning process, which allows armonitor to properly stop the process.

Here is the output of the startup process:
[EMAIL PROTECTED] /home/remedy]$ /usr/ar/sundev71/bin/arsystem start
Action Request System initializing.
Starting AR System Server

 (ARNOTE 0)
   AR Monitor version 7.1.00 Build 200708221849 started.

 (ARNOTE 0)
   AR Monitor started.

 (ARNOTE 0)
   ARMonitor child process (pid:1429) started.
./arserverd
server: locale=[[ en_US.UTF-8 ]],
 LANG=[[ en_US.UTF-8 ]] NLS_LANG=[[ american_america.AL32UTF8 ]]

Action Request System(R)  Server   Version 7.1.00 Build 200708221849
(c) Copyright 1991-2007 BMC Software, Inc.

390600 : This version of the Action Request System(R) is ready for use
or evaluation without purchasing or activating an authorization key.
For unlimited capabilities, contact your sales representative. (ARNOTE 27)
Action Request System initialization is complete.
Starting JBoss...
[EMAIL PROTECTED] /home/remedy]$ Sending output to nohup.out

 (ARNOTE 0)
   Server indicates that it's up.


 (ARNOTE 0)
   ARMonitor child process (pid:1450) started.
./arsvcdsp

 (ARNOTE 0)
   ARMonitor child process (pid:1451) started.
./arplugin

Action Request System  AR System Application Command Dispatcher
Version 7.1.00 Build 200708221849
(c) Copyright 1998-2007 BMC Software, Inc.

Action Request System(R)  Fork Daemon   Version 7.1.00 Build 200708221849
(c) Copyright 2000-2007 BMC Software, Inc.

Action Request System(R)  Plug-In Server   Version 7.1.00 Build 200708221849
(c) Copyright 2001-2007 BMC Software, Inc.

 (ARNOTE 0)
   ARMonitor child process (pid:1452) started.
./pluginsvrstartup.sh

 (ARNOTE 0)
   ARMonitor child process (pid:1453) started.
./emaild.sh
AR System Plugin Server Version 7.1.00 Build 200708221849

BMC Remedy Email Engine has started

and the process tree

[EMAIL PROTECTED] /home/remedy]$ ptree 1428
1428  ./armonitor -s sundev71 -c /etc/arsystem/sundev71/armonitor.conf
  1429  ./arserverd -s sundev71 -i /usr/ar/sundev71 -l /etc/arsystem/sundev71
    1449  ./arforkd -s sundev71 -l /var/log/remedy/arfork.log
  1450  ./arsvcdsp -s sundev71 -d /usr/ar/sundev71
  1451  ./arplugin -s sundev71 -i /usr/ar/sundev71
  1452  /bin/java -Xmx512m com.bmc.arsys.pluginsvr.ARPluginServerMain
-x localhost -i .
  1453  /usr/java/bin/java
-Djava.library.path=/usr/ar/sundev71/apps/aremail -cp /usr/a

and after an arsystem stop
[EMAIL PROTECTED] /home/remedy]$ /usr/ar/sundev71/bin/arsystem stop
Stopping JBoss...
Shutdown message has been posted to the server.
Server shutdown may take a while - check logfiles for completion
Action Request System shutdown in progress.

AR System server terminated normally (ARERR 32)
   ARMonitor

 (ARNOTE 0)
   Attempting to terminate ARMonitor child process (pid:1429).
./arserverd

 (ARNOTE 0)
   Attempting to terminate ARMonitor child process (pid:1450).
./arsvcdsp

 (ARNOTE 0)
   Attempting to terminate ARMonitor child process (pid:1451).
./arplugin

 (ARNOTE 0)
   Attempting to terminate ARMonitor child process (pid:1452).
./pluginsvrstartup.sh

 (ARNOTE 0)
   Attempting to terminate ARMonitor child process (pid:1453).
./emaild.sh

0 : AR System server terminated when a signal/exception was received
by the server (ARNOTE 20)
   15

Action Request System shutdown process complete.

[EMAIL PROTECTED] /home/remedy]$ ps -ef |grep remedy
  remedy  1294  1291   0 12:53:17 ?           0:00 /usr/lib/ssh/sshd
  remedy  1553  1296   0 12:57:49 pts/1       0:00 grep remedy
  remedy  1296  1294   0 12:53:17 pts/1       0:00 -bash
  remedy  1552  1296   0 12:57:49 pts/1       0:00 ps -ef

and the armonitor.log entries for the stop followed by the start:

Wed Sep 12 12:56:15 2007   (ARNOTE 0)
Wed Sep 12 12:56:15 2007     AR Monitor version 7.1.00 Build
200708221849 started.
Wed Sep 12 12:56:15 2007   (ARNOTE 0)
Wed Sep 12 12:56:15 2007     AR Monitor started.
Wed Sep 12 12:56:15 2007   (ARNOTE 0)
Wed Sep 12 12:56:15 2007     ARMonitor child process (pid:1429) started.
./arserverd
Wed Sep 12 12:56:33 2007   (ARNOTE 0)
Wed Sep 12 12:56:33 2007     Server indicates that it's up.

Wed Sep 12 12:56:33 2007   (ARNOTE 0)
Wed Sep 12 12:56:33 2007     ARMonitor child process (pid:1450) started.
./arsvcdsp
Wed Sep 12 12:56:33 2007   (ARNOTE 0)
Wed Sep 12 12:56:33 2007     ARMonitor child process (pid:1451) started.
./arplugin
Wed Sep 12 12:56:34 2007   (ARNOTE 0)
Wed Sep 12 12:56:34 2007     ARMonitor child process (pid:1452) started.
./pluginsvrstartup.sh
Wed Sep 12 12:56:34 2007   (ARNOTE 0)
Wed Sep 12 12:56:34 2007     ARMonitor child process (pid:1453) started.
./emaild.sh
Wed Sep 12 12:57:41 2007  AR System server terminated normally (ARERR 32)
Wed Sep 12 12:57:41 2007     ARMonitor
Wed Sep 12 12:57:41 2007   (ARNOTE 0)
Wed Sep 12 12:57:41 2007     Attempting to terminate ARMonitor child
process (pid:1429).
./arserverd
Wed Sep 12 12:57:41 2007   (ARNOTE 0)
Wed Sep 12 12:57:41 2007     Attempting to terminate ARMonitor child
process (pid:1450).
./arsvcdsp
Wed Sep 12 12:57:41 2007   (ARNOTE 0)
Wed Sep 12 12:57:41 2007     Attempting to terminate ARMonitor child
process (pid:1451).
./arplugin
Wed Sep 12 12:57:41 2007   (ARNOTE 0)
Wed Sep 12 12:57:41 2007     Attempting to terminate ARMonitor child
process (pid:1452).
./pluginsvrstartup.sh
Wed Sep 12 12:57:41 2007   (ARNOTE 0)
Wed Sep 12 12:57:41 2007     Attempting to terminate ARMonitor child
process (pid:1453).
./emaild.sh


Axton Grams

On 9/12/07, Papolu, Appajee <[EMAIL PROTECTED]> wrote:
> Axton,
>
> We think this is a defect in armonitor with command lines that have
> exactly (or multiples) of 10 arguments. We fill fix the defect.
>
> But in the mean time, if you're seeing this problem, you can workaround
> the issue by removing the option -m at the end of the monitor entry.
> [This option is not used by the Java plug-in server itself, and is
> retained just for backward compatibility for C plug-ins that may use it
> for whatever reason].
>
> java -Xmx512m -classpath
> /usr/ar/sundev71/pluginsvr:/usr/ar/sundev71/pluginsvr/arpluginsvr71.jar
> com.bmc.arsys.plugin
> vr.ARPluginServerMain -x sundev71 -i /usr/ar/sundev71
>
> Or, may be you can add an extra argument to ensure your command line
> does not 10 items, for example as in:
>
> java -DNoTenArgsNow="HaHaHa" -Xmx512m -classpath
> /usr/ar/sundev71/pluginsvr:/usr/ar/sundev71/pluginsvr/arpluginsvr71.jar
> com.bmc.arsys.plugin
> vr.ARPluginServerMain -x sundev71 -i /usr/ar/sundev71 -m
> AR System Plugin Server Version 7.1.00 Build 200708221849
>
> Regards
> Appajee
>
>
> -----Original Message-----
> From: Action Request System discussion list(ARSList)
> [mailto:[EMAIL PROTECTED] On Behalf Of Axton
> Sent: Sunday, September 09, 2007 3:53 PM
> To: [email protected]
> Subject: New Java Plugin Server Problems
>
> Having trouble getting the new java based plugin server started under
> armonitor.  armonitor.log shows the following:
>
> Sun Sep  9 18:21:46 2007  Failure occurred during execl() (ARERR 33)
> Sun Sep  9 18:21:46 2007     Bad address : ./java
> Sun Sep  9 18:21:46 2007   (ARNOTE 0)
> Sun Sep  9 18:21:46 2007     ARMonitor child process (pid:25366)
> started.
> ./java
> Sun Sep  9 18:21:46 2007   (ARNOTE 0)
> Sun Sep  9 18:21:46 2007     ARMonitor child process (pid:25366) died
> with 0.
> ./java
>
> ...
>
> Sun Sep  9 18:21:46 2007  Failure occurred during execl() (ARERR 33)
> Sun Sep  9 18:21:46 2007     Bad address : ./java
> Sun Sep  9 18:21:46 2007   (ARNOTE 0)
> Sun Sep  9 18:21:46 2007
> Tried 4 restarts in 30 seconds. I give up at Sun Sep  9 18:21:46 2007
>
>
> If I manually start the process with the command listed in armonitor,
> all seems well; the process starts and continues running.
>
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$  java -Xmx512m -classpath
> /usr/ar/sundev71/pluginsvr:/usr/ar/sundev71/pluginsvr/arpluginsvr71.jar
> com.bmc.arsys.plugin
> vr.ARPluginServerMain -x sundev71 -i /usr/ar/sundev71 -m
> AR System Plugin Server Version 7.1.00 Build 200708221849
>
> This is on Solaris 10 sparc64x2 with a remote Oracle 10g instance
> running on linux x86-32x2.
>
> This only seems to be an issue when using libumem as the memory
> management library (enabled by setting the following at the top of the
> arsystem script):
>
> UMEM_DEBUG=default
> UMEM_LOGGING=transaction
> LD_PRELOAD=libumem.so.1
> export UMEM_DEBUG UMEM_LOGGING LD_PRELOAD
>
> Without this, it starts just fine.
>
> Some system information:
>
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ which java
> /usr/bin/java
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ java -version
> java version "1.5.0_12"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
> Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)
>
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ /usr/java/bin/java -version
> java version "1.5.0_12"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
> Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)
>
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ uname -a
> SunOS sundev01 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-280R
>
> # psrinfo -v
> Status of virtual processor 0 as of: 09/09/2007 18:40:17
>   on-line since 09/03/2007 03:06:09.
>   The sparcv9 processor operates at 900 MHz,
>         and has a sparcv9 floating point processor.
> Status of virtual processor 1 as of: 09/09/2007 18:40:17
>   on-line since 09/03/2007 03:06:11.
>   The sparcv9 processor operates at 900 MHz,
>         and has a sparcv9 floating point processor.
>
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ cat
> /etc/arsystem/sundev71/armonitor.conf
> Monitor-directory: /usr/ar/sundev71
> SNMP-agent-enabled: F
> #/usr/ar/sundev71/bin/arsnmpd --server sundev71 -f -c
> /usr/ar/sundev71/conf/arsnmpd.conf udp:161
> /usr/ar/sundev71/bin/arserverd -s sundev71 -i /usr/ar/sundev71 -l
> /etc/arsystem/sundev71
> /usr/ar/sundev71/bin/arsvcdsp -s sundev71 -d /usr/ar/sundev71
> #/usr/ar/sundev71/bin/arservdsd -s sundev71 -i /usr/ar/sundev71
> /usr/ar/sundev71/bin/arplugin -s sundev71 -i /usr/ar/sundev71
> java -Xmx512m -classpath
> /usr/ar/sundev71/pluginsvr:/usr/ar/sundev71/pluginsvr/arpluginsvr71.jar
> com.bmc.arsys.pluginsvr.ARPluginServerMain -x sundev71 -i /um
> /usr/ar/sundev71/apps/aremail/emaild.sh start
>
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ file
> /usr/ar/sundev71/bin/armonitor
> /usr/ar/sundev71/bin/armonitor: ELF 32-bit MSB executable SPARC
> Version 1, dynamically linked, stripped
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ file /usr/ar/sundev71/pluginsvr
> /usr/ar/sundev71/pluginsvr:     directory
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ file
> /usr/ar/sundev71/pluginsvr/libarpluginjni71.so
> /usr/ar/sundev71/pluginsvr/libarpluginjni71.so: ELF 32-bit MSB dynamic
> lib SPARC Version 1, dynamically linked, not stripped
> [EMAIL PROTECTED] /usr/ar/sundev71/bin]$ file
> /usr/ar/sundev71/pluginsvr/libarjni71.so
> /usr/ar/sundev71/pluginsvr/libarjni71.so:       ELF 32-bit MSB dynamic
> lib SPARC Version 1, dynamically linked, not stripped
>
>
> The question I have, is how do I start all the processes under
> armonitor with libumem, with the exception of the java based plugin
> server, until these issues are resolved?
>
> Axton Grams
>
> ________________________________________________________________________
> _______
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where
> the Answers Are"
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
> Answers Are"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to