Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Odd error logged to OPCOM from SCP.

 
SOLVED
Go to solution

Odd error logged to OPCOM from SCP.

I'm spawning (lib$spawn) an SCP command and getting an odd error logged.

In Basic:

scp_cmd = 'scp "-Q" TEST.F "brady:test.f"'
sts = lib$spawn( &
scp_cmd !command! &
, !input-file! &
, !output-file! &
, !flags! &
, !process-name! &
, !process-id! &
,loc( exit_sts ) !completion-status-address! &
, !byte-integer-event-flag-num! &
, !AST-address! &
, !varying-AST-argument! &
)

Neither sts nor exit_sts have errors after the call.
The file is successfully copied.

I'm getting the following logged:

%%%%%%%%%%% OPCOM 4-FEB-2010 18:54:38.78 %%%%%%%%%%%
Message from user JON on JOONYA
OpenVMS$initialize_unix_env error, status: : error 00000002
,Cannot chdir to SYS◆


(The 0000000002 may be C/Unix EACCES?)

The text string "initialize_unix_env" appears in a bunch of TCPIP SSH .exe files.

The error is only reported if the spawning program is run/detached.
When the program that executes the spawn is run interactively or in a batch
no error is logged.

$ run sys$system:loginout -
/process_name='process_name' -
/detached -
/input='input' -
/output='logfile' -
/nodebug -
/error='errfile'

(quota switches omitted)

The input file is the same for a submit or run/detached:

$ run run:SCP_HP_TEST

The problem occurs on both an Alpha and an Itanium.

$ scp "-V"
tcpip$ssh_scp2.exe: SSH Secure Shell OpenVMS (V5.5) 3.2.0 on AlphaServer ES45
Model 3B - VMS V8.3

$ scp "-V"
tcpip$ssh_scp2.exe: SSH Secure Shell OpenVMS (V5.5) 3.2.0 on HP rx2620
(1.60GHz/3.0MB) - VMS V8.3

Any ideas?


Jonathan


9 REPLIES 9
John Gillings
Honored Contributor

Re: Odd error logged to OPCOM from SCP.

Jonathan,

Detached processes are very different from interactive or batch. My guess is the most likely cause is lack of some or other quota. Your RUN command doesn't specify any quotas, and will therefore get the SYSGEN PQL_D* values, possibly boosted to PQL_M* values. Typically these are just sufficient to get a process running, but rarely enough to do anything useful.

My general rule is, any detached process started without a fully populated PQL is an EXQUOTA looking for a place to happen.

Look for a RUN/DETACHED command anywhere in SYS$STARTUP, copy the qualifier list and populate it with reasonable values. You can use RUN/AUTHORIZE as a shortcut to use the quotas from your UAF record, but be aware that it may override other qualifiers (like /PROCESS_NAME)

If quotas don't help, I'd be looking for some other environmental change, possibly something defined in LOGIN or SYLOGIN (which aren't run for detached processes). Try adding:

$ @SYS$MANAGER:SYLOGIN
$ @SYS$LOGIN:LOGIN

to your input procedure?
A crucible of informative mistakes
John Gillings
Honored Contributor

Re: Odd error logged to OPCOM from SCP.

Jonathan,

Sorry, I just noticed you said quota qualifiers were omitted. Nevertheless, please make sure they're all present and all adequate.

What does the rest of the fragment "Cannot chdir to SYS" say?

Try replacing your SPAWN command with SHOW LOGICAL and SHOW SYMBOL in interactive and detached modes. See if there are any significant differences.
A crucible of informative mistakes
Joseph Huber_1
Honored Contributor

Re: Odd error logged to OPCOM from SCP.

For a detached process, if it does not run LOGINOUT, there is no login.com executed, and things like sys$login, sys$disk etc. are not defined.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor
Solution

Re: Odd error logged to OPCOM from SCP.

hit submit too fast:

even if running loginout, if the /AUTHORIZE is missing from run/detach, then the following logicals are not defined:

$ show logical sys$login
%SHOW-S-NOTRAN, no translation for logical name SYS$LOGIN
$ show logical sys$login_device
%SHOW-S-NOTRAN, no translation for logical name SYS$LOGIN_DEVICE
$ show logical sys$scratch
%SHOW-S-NOTRAN, no translation for logical name SYS$SCRATCH
http://www.mpp.mpg.de/~huber
Richard Whalen
Honored Contributor

Re: Odd error logged to OPCOM from SCP.

A program that is RUN/DETACHED does not have DCL around and LIB$SPAWN depends upon DCL to copy symbols and logicals between the processes.

Re: Odd error logged to OPCOM from SCP.

Joseph Huber takes the prize: adding /authorize indeed fixes the problem. (I inadvertently truncated theOPCOM error, it should have ended: "Cannot chdir to SYS$LOGIN", so extra kudos for figuring it out without all the facts.) To everyone who suggested inadequate quotas, I will say that changing quotas was the fix for the first problem I encountered spawning SCP, so it's a good suggestion.

I notice that the command file on production that runs the detached job was written in 1987 for a VAX 8650, and the quotas switches that gave the job extra resources back then, now cut it way back from the account defaults :). Of course the customer hasn't upgraded to the next version which has only been out since 1993...:(.

Anyway thanks to all, and particularly Joseph

Jonathan

Re: Odd error logged to OPCOM from SCP.

Add /authorize to run/detached command so that sys$login is defined.
Jan van den Ende
Honored Contributor

Re: Odd error logged to OPCOM from SCP.

Jonathan,

>>>
Joseph Huber takes the prize
<<<

... but he did not get it yet!!

Only YOU ( "Question Author" ) can do that:

reopen the thread
in each answer's title bar pull down the Points Menu
vauate each answer

and finally hit "Submit Points".

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.

Re: Odd error logged to OPCOM from SCP.

My view of the web page shows he did get 10 points. On the
other hand my partial points given to others did not show up. I tried reopening and setting them again got the same result.

Jonathan