SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
trouble running java executable from command line

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
trouble running java executable from command line
Author Message
owensjim



Joined: 08 Aug 2011
Posts: 49

Post trouble running java executable from command line Reply with quote
We are trying to run the following from the command line and are receiving a exit code one.

We are trying to run this on a server that has the 4.4 agent installed and working properly.

/usr/bin/java -Xms256M -Xmx1024M -cp classpath.jar: ipayx_parsers.ccf_load_demalc_files_1_1.CCF_LOAD_Demalc_Files --context=Default $* --context_param SYSProcFilename=/home/talend/ftp/ccf/ccf/20029/upload/DEM_ALC.120314.csv




From the scheduler log
19-Mar-2012 08:33:44 AM 2 5ou5AYjUgNmragQXMn/7WhhcR5A= 875 CTS_LI AT CCF_DEM_ALC jim Remote job started.
19-Mar-2012 08:33:44 AM 2 5ou5AYjUgNmragQXMn/7WhhcR5A= 875 CTS_LI AT CCF_DEM_ALC jim Start message sent.
19-Mar-2012 08:33:45 AM 2 5ou5AYjUgNmragQXMn/7WhhcR5A= 875 CTS_LI AT CCF_DEM_ALC jim Agent "CTS-LI AT" contacted.
19-Mar-2012 08:33:47 AM 3 5ou5AYjUgNmragQXMn/7WhhcR5A= 875 CTS_LI AT CCF_DEM_ALC jim Remote job failed. Job completed with exit code 1. This exit code does not satisfy job exit code condition. Job failed.
19-Mar-2012 08:33:48 AM 2 5ou5AYjUgNmragQXMn/7WhhcR5A= 875 CTS_LI AT CCF_DEM_ALC jim Error message sent.

from the debug log
2012-03-19 08:33:44,006 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.log.SysLogAdaptor - Syslog: invoked
2012-03-19 08:33:44,613 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - mail.smtp.auth=true
2012-03-19 08:33:44,615 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): Date: Mon, 19 Mar 2012 08:33:44 -0400 (EDT)
2012-03-19 08:33:44,615 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): From: job.scheduler@------------.com
2012-03-19 08:33:44,615 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): To: operations@------------.com, jim.owens@------------.com
2012-03-19 08:33:44,615 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): Subject: Message from 24x7 Scheduler - job "CTS_LI AT CCF_DEM_ALC jim" event
2012-03-19 08:33:44,615 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): X-Mailer: 24x7 Scheduler
2012-03-19 08:33:44,616 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): account & password information is specified
2012-03-19 08:33:44,773 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl - mail sent
2012-03-19 08:33:44,774 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.log.SysLogAdaptor - Syslog: invoked
2012-03-19 08:33:45,361 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.log.SysLogAdaptor - Syslog: invoked
2012-03-19 08:33:45,758 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:33:47,302 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.runner.RemoteJobRunner - runJob
com.softtreetech.jscheduler.common.SchedException: Job completed with exit code 1. This exit code does not satisfy job exit code condition. Job failed.
at com.softtreetech.jscheduler.business.agent.remote.RemoteAgentImpl.executeJob(Unknown Source)
at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at com.softtreetech.jscheduler.business.agent.remote.RemoteAgentImpl_Stub.executeJob(Unknown Source)
at com.softtreetech.jscheduler.business.runner.RemoteJobRunner.runJob(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.runJobIgnoringErrorsIfNeeded(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.startExecution(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.JobExecutorImpl.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.JobExecutorImpl$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
2012-03-19 08:33:47,304 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.log.SysLogAdaptor - Syslog: invoked
2012-03-19 08:33:47,381 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:33:47,896 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - mail.smtp.auth=true
2012-03-19 08:33:47,898 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): Date: Mon, 19 Mar 2012 08:33:47 -0400 (EDT)
2012-03-19 08:33:47,899 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): From: job.scheduler@------------.com
2012-03-19 08:33:47,899 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): To: operations@------------.com, jim.owens@------------.com
2012-03-19 08:33:47,899 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): Subject: Message from 24x7 Scheduler - job "CTS_LI AT CCF_DEM_ALC jim" event
2012-03-19 08:33:47,899 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): X-Mailer: 24x7 Scheduler
2012-03-19 08:33:47,899 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl(): account & password information is specified
2012-03-19 08:33:48,134 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.Mailer - sendEmailImpl - mail sent
2012-03-19 08:33:48,135 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.log.SysLogAdaptor - Syslog: invoked
2012-03-19 08:33:48,719 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] DEBUG com.softtreetech.jscheduler.business.queue.JobQueue - QUEUE_UNLOCKED
2012-03-19 08:33:49,006 [Job #875 - CTS_LI AT CCF_DEM_ALC jim] ERROR com.softtreetech.jscheduler.business.runner.JobExecutorImpl - Job errors: Remote job failed. Job completed with exit code 1. This exit code does not satisfy job exit code condition. Job failed.
2012-03-19 08:33:49,460 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:33:57,425 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:34:07,299 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:34:17,652 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:34:18,411 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.ui.dialogs.jobwizard.JobWizard - show() : start
2012-03-19 08:34:18,676 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.ui.dialogs.jobwizard.JobWizard - show() : end
2012-03-19 08:34:27,298 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:34:37,304 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:34:47,414 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:34:57,388 [AWT-EventQueue-0] DEBUG com.softtreetech.jscheduler.business.event.JobSchedulerImpl - Number of pending jobs: 207
2012-03-19 08:35:00,011 [Timer-4662400] DEBUG com.softtreetech.jscheduler.business.queue.JobQueue - QUEUE_UNLOCKED
Mon Mar 19, 2012 9:03 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
According to the job definition, exit code 1 is not accepted as a successful exit code. That's why the job triggers error handling on the scheduler side. My guess is the agent cannot run that job, but the details are known to the agent only. Please take a look at the debug.log and schedule.log files on the server running the agent. You might find in these log files what happens to the job and the reason for exit code 1.
Mon Mar 19, 2012 10:33 am View user's profile Send private message
owensjim



Joined: 08 Aug 2011
Posts: 49

Post Reply with quote
I copied this for the server where the agent is processing but I do not see anything:

Debug log:
2012-03-19 11:47:23,027 [RMI TCP Connection(3264)-192.168.168.133] DEBUG com.softtreetech.jscheduler.business.agent.remote.RemoteAgentImpl - Starting job=CTS_LI AT CCF_DEM_ALC, runtime id=6429
2012-03-19 11:47:23,029 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - runJob(): start
2012-03-19 11:47:23,030 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.security.SecurityService - authNativeUser: /usr/share/jscheduler/auth.pl
2012-03-19 11:47:23,103 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - execProcess(): command line [/usr/bin/java -Xms256M -Xmx1024M -cp classpath.jar: ipayx_parsers.ccf_load_demalc_files_1_1.CCF_LOAD_Demalc_Files --context=Default $* --context_param SYSProcFilename='/home/talend/ftp/ccf/ccf/20029/upload/DEM_ALC.120314.csv'] in work directory [.]
2012-03-19 11:47:23,104 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - runAs() username=earchive command=/usr/bin/java,-Xms256M,-Xmx1024M,-cp,classpath.jar:,ipayx_parsers.ccf_load_demalc_files_1_1.CCF_LOAD_Demalc_Files,--context=Default,$*,--context_param,SYSProcFilename='/home/talend/ftp/ccf/ccf/20029/upload/DEM_ALC.120314.csv' workDir=/usr/share/jscheduler/.
2012-03-19 11:47:23,104 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - exec : ./runas.pl,earchive,/usr/bin/java -Xms256M -Xmx1024M -cp classpath.jar: ipayx_parsers.ccf_load_demalc_files_1_1.CCF_LOAD_Demalc_Files --context=Default $* --context_param SYSProcFilename='/home/talend/ftp/ccf/ccf/20029/upload/DEM_ALC.120314.csv',/usr/share/jscheduler/.
2012-03-19 11:47:23,114 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - waitForProcess(): start
2012-03-19 11:47:23,115 [Thread-1879] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner$TimeoutVerifier - run(): start
2012-03-19 11:47:23,115 [Thread-1879] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner$TimeoutVerifier - run(): timeout check not required
2012-03-19 11:47:23,417 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - waitForProcess(): end
2012-03-19 11:47:23,418 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - isFailed(...) : exit code 1
2012-03-19 11:47:23,418 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - isFailed(...) : Enumeration found [0]
2012-03-19 11:47:23,419 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - isFailed(...) : Enumeration found [ 77]
2012-03-19 11:47:23,420 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - killProcess start
2012-03-19 11:47:23,515 [Job #874 - CTS_LI AT CCF_DEM_ALC] ERROR com.softtreetech.jscheduler.business.runner.JobExecutorImpl - Job errors: Job completed with exit code 1. This exit code does not satisfy job exit code condition. Job failed.
2012-03-19 11:47:23,516 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.agent.remote.RemoteAgentImpl - Error occurred while running job=CTS_LI AT CCF_DEM_ALC, runtime id=6429
2012-03-19 11:47:23,516 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.agent.remote.RemoteAgentImpl - job=CTS_LI AT CCF_DEM_ALC, runtime id=6429, last error=Job completed with exit code 1. This exit code does not satisfy job exit code condition. Job failed.


job scheduler log
19-Mar-2012 11:47:23 AM 2 null 874 CTS_LI AT CCF_DEM_ALC Remote job started.
19-Mar-2012 11:47:23 AM 2 null 874 CTS_LI AT CCF_DEM_ALC Job started.
19-Mar-2012 11:47:23 AM 3 null 874 CTS_LI AT CCF_DEM_ALC Job completed with exit code 1. This exit code does not satisfy job exit code condition. Job failed.
Mon Mar 19, 2012 11:58 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Just in case... Here is some except from the posted log, I 'm using bold font to highlight important areas

2012-03-19 11:47:23,104 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - runAs()
username=earchive
command=/usr/bin/java,-Xms256M,-Xmx1024M,-cp,classpath.jar:,ipayx_parsers.ccf_load_demalc_files_1_1.CCF_LOAD_Demalc_Files,--context=Default,$*,--context_param,SYSProcFilename='/home/talend/ftp/ccf/ccf/20029/upload/DEM_ALC.120314.csv'
workDir=/usr/share/jscheduler/

....
2012-03-19 11:47:23,417 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - waitForProcess(): end
2012-03-19 11:47:23,418 [Job #874 - CTS_LI AT CCF_DEM_ALC] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - isFailed(...) : exit code 1

Here we can see that the command returned exit code 1, and that exit code is not set as a successful exit code and that's why the job was marked as failed.
Hope this helps.
Mon Mar 19, 2012 11:24 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.