SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Incorrect Function

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Incorrect Function
Author Message
Hank Hill



Joined: 14 Feb 2002
Posts: 47

Post Incorrect Function Reply with quote

My scheduled job keeps returning, Job finished with process exit code 1 - Incorrect Function. What does this mean? I can run the job manually or through the debugger just fine. It's only on the all day task that it bombs.

Wed Oct 02, 2002 8:43 am View user's profile Send private message
Hank Hill



Joined: 14 Feb 2002
Posts: 47

Post Re: Incorrect Function Reply with quote

: My scheduled job keeps returning, Job finished with process exit code 1 -
: Incorrect Function. What does this mean? I can run the job manually or
: through the debugger just fine. It's only on the all day task that it
: bombs.

Should add that it's only when 24x7 is running as a service that it bombs as well. An almost identical job runs perfectly when running as a service. Only difference between the two jobs is some file locations.

Wed Oct 02, 2002 8:44 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Incorrect Function Reply with quote

The process you run returns exit code 1 which in Windows "by default" means "incorrect function."

Normally if a process terminates successfully it returns 0 exit code to the calling process.

The exit code is program specific and the meaning of the same code can differ in different programs that's why 24x7 logs just a warning. To find out why the process returns a non-zero exit code please contact program vendor or check program documentation.

: Should add that it's only when 24x7 is running as a service that it bombs as
: well. An almost identical job runs perfectly when running as a service.
: Only difference between the two jobs is some file locations.

Wed Oct 02, 2002 11:19 am View user's profile Send private message
Hank Hill



Joined: 14 Feb 2002
Posts: 47

Post Re: Incorrect Function Reply with quote

: The process you run returns exit code 1 which in Windows "by
: default" means "incorrect function."

: Normally if a process terminates successfully it returns 0 exit code to the
: calling process.

: The exit code is program specific and the meaning of the same code can differ
: in different programs that's why 24x7 logs just a warning. To find out why
: the process returns a non-zero exit code please contact program vendor or
: check program documentation.

How do I figure out which step of my process is returning the exit code of 1? I'm running several things. Also, why would the exact same code return an exit code in this job and not in another?

Wed Oct 02, 2002 11:26 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Incorrect Function Reply with quote

You can use ProcessGetExitCode statement to obtain the exit code value.

For example:
Dim exit_code, number
Dim message, string

RunAndWait "my first process", ...
ProcessGetExitCode exit_code
Concat "my first process exit code: ", exit_code, message
LogAddMessageEx "INFO", @V"job_id", "@V"job_name"", message

RunAndWait "my second process", ...
ProcessGetExitCode exit_code
Concat "my second process exit code: ", exit_code, message
LogAddMessageEx "INFO", @V"job_id", "@V"job_name"", message

... and so on ...

: How do I figure out which step of my process is returning the exit code of 1?
: I'm running several things. Also, why would the exact same code return an
: exit code in this job and not in another?

Wed Oct 02, 2002 12:14 pm View user's profile Send private message
Hank Hill



Joined: 14 Feb 2002
Posts: 47

Post Re: Incorrect Function Reply with quote

The function actually works fine as long as 24x7 is running as a program instead of as a service. This makes no sense to us because the service runs as the saeme user that is logged in to run as a program. What exactly could be causing this? It's obvious to us that the various programs will interact together correctly or we'd still have problems when running 24x7 as a program.

: You can use ProcessGetExitCode statement to obtain the exit code value.

: For example: Dim exit_code, number
: Dim message, string

: RunAndWait "my first process", ...
: ProcessGetExitCode exit_code
: Concat "my first process exit code: ", exit_code, message
: LogAddMessageEx "INFO", @V"job_id",
: "@V"job_name"", message

: RunAndWait "my second process", ...
: ProcessGetExitCode exit_code
: Concat "my second process exit code: ", exit_code, message
: LogAddMessageEx "INFO", @V"job_id",
: "@V"job_name"", message

: ... and so on ...

Tue Oct 08, 2002 3:30 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Incorrect Function Reply with quote

Have you tried to redirect program output to a file for the purpose of being able to see possible error messages if any reported and to find oput why it returns 1 as the exit code?

: The function actually works fine as long as 24x7 is running as a program
: instead of as a service. This makes no sense to us because the service
: runs as the saeme user that is logged in to run as a program. What exactly
: could be causing this? It's obvious to us that the various programs will
: interact together correctly or we'd still have problems when running 24x7
: as a program.

Tue Oct 08, 2002 4:26 pm View user's profile Send private message
Hank Hill



Joined: 14 Feb 2002
Posts: 47

Post Re: Incorrect Function Reply with quote

: Have you tried to redirect program output to a file for the purpose of being
: able to see possible error messages if any reported and to find oput why
: it returns 1 as the exit code?

I've redirected the output and it shows nothing out of the ordinary. We're using an NT Batch job to run a Unix script using MKS Toolkit. We're using the batch job because 24x7 wouldn't run the script file directly.

Thu Oct 10, 2002 8:02 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Incorrect Function Reply with quote

A quick search using Google produced pages that indicate MKS is extensively using
Windows LAN manager. Because services run with very limited network permissions this can cause MKS utillities to fall when they are executed under a service.

I suggest that you contact the MKS software and ask them why their utility does no run under the service. Here is the link
http://www.mkssoftware.com/support/support.asp

By the way in MKS documentation you should be able to find yourself when exit code 1 is returned by a particular utility.

: I've redirected the output and it shows nothing out of the ordinary. We're
: using an NT Batch job to run a Unix script using MKS Toolkit. We're using
: the batch job because 24x7 wouldn't run the script file directly.

Thu Oct 10, 2002 8:31 am View user's profile Send private message
Intravenous



Joined: 05 Aug 2005
Posts: 1

Post Re: Incorrect Function Reply with quote

: My scheduled job keeps returning, Job finished with process exit code 1 -
: Incorrect Function. What does this mean? I can run the job manually or
: through the debugger just fine. It's only on the all day task that it
: bombs.

Fri Aug 05, 2005 4:52 am 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.