AnsweredAssumed Answered

Java probe works from command line but cannot start from probe

Question asked by seanacais on Nov 22, 2013
Latest reply on Nov 27, 2013 by seanacais

I've created a package for a java probe that installs to the robot correctly with no issues.

 

When I activate the probe I get the following in the controller.log

 

Nov 21 12:44:42:845 [139667932169984] Controller: probeGenerateMagicKey for TagAlert Nov 21 12:44:42:845 [139667932169984] Controller: probeFindCRCs for TagAlert Nov 21 12:44:42:847 [139667932169984] Controller: probeFindCRCs - 0 Nov 21 12:44:42:847 [139667932169984] Controller: probeGenerateMagicKey - RZp8Nosza21fhI+iMuvjMO18Ec/aL/TBUmOUFcnvxwg= Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) - 48004 in use by hub, try next Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) - 48005 in use by hdb, try next Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) - 48006 in use by UpdateField, try next Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) - 48007 in use by Tunnel-001-name[172.31.254.151], try next Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) - 48008 in use by Tunnel-002-name[192.168.1.151], try next Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) - 48009 in use by Tunnel-003-name[192.168.1.140], try next Nov 21 12:44:42:847 [139667932169984] Controller: find_port (TagAlert) - add 48010 last Nov 21 12:44:42:847 [139667932169984] Controller: _ProcStart - Startup command for TagAlert: ../../../$NIM_JRE_HOME/bin/java Nov 21 12:44:42:847 [139667932169984] Controller: MyStringExpand (../../../$NIM_JRE_HOME/bin/java)... Nov 21 12:44:42:847 [139667932169984] Controller: MyStringExpand - expanded to ../../../jre/jre6/bin/java Nov 21 12:44:42:848 [139667932169984] Controller: Probe 'TagAlert' started (pid=1958) (restart 3) Nov 21 12:44:42:848 [139667932169984] Controller: MyStringExpand (-cp "jar/*" com.nimsoft.field.probe.TagAlert -u TagAlert -p AlertTag)... Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[0] = nimbus(TagAlert) Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[1] = -cp Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[2] = "jar/*" Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[3] = com.nimsoft.field.probe.TagAlert Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[4] = -u Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[5] = TagAlert Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[6] = -p Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[7] = XXXX Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - arg[8] = NULL Nov 21 12:44:42:848 [139667932169984] Controller: _ProcStart - Executing /opt/nimsoft/probes/infrastructure/tagalert/../../../jre/jre6/bin/java Nov 21 12:44:43:850 [139667932169984] Controller: Process stopped (probe=TagAlert, pid=1958) RET = 1

 All of which looks great until the end where RET=1

 

There is no log file created in the directory

 

When I run the probe manually as follows:

 

# cd /opt/nimsoft/probes/infrastructure/tagalert # ../../../jre/jre6/bin/java -cp "jar/*" com.nimsoft.field.probe.TagAlert -u TagAlert -p XXXX &

 

The probe creates a log file, connects to it's queues and works without an issue.

 

In the IM, I can see the PID gets filled in but not the port (which always seems to be in the 57000 range). 

 

When I kill the job, the IM never updates to reflect that the PID is no longer active, although if I restart the probe from the command line, the PID is update in IM.

 

In order to get control over activating and deactivating the probe again (after running and killing from the command line) I need to restart the robot. This is probably the correct behavior but I'm mentioning it in case it helps diagnose the issue.

 

I've duplicated this behavior on both linux and windows

 

I'm out of ideas for where to look next for the cause of the issue.  Any ideas or suggestions are welcome!

 

Thanks,

 

Kevin

Outcomes