on 09-30-2008 4:06 PM
Hi All,
Got a small problem... Running a heterogeneous environment where the CI is AIX-64 and the application server is Linux RH5-32,
Basically I'm trying to run a job that calls external commands to drop a file in Linux... external command ZCD which is the "cd" command to call a directory is failing in Linux, I have configured the command in SM69 for both AIX and Linux, for AIX works fine but for Linux fails... saying...
UNIX command 'ZCD /usr/sap/sid/out/' failed - RC
funny enough i could not see any errors on dev_cp or dev_xpg
Also checked transaction FILE and looks fine...
directory been called by external command is mounted and i can call it from OS without issues.
Any advice welcome.
Regards
Juan
Anything in the syslog (SM21)?
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also get
Communication error, CPIC return code 020, SAP return code 456
in SM21
where 456 is 456,,Timeout during conn. setup
but this work fine in my AIX DI and in the CI
I'm starting to think that is something to do with the syntax group in FILE or with the sapxbg program in the kernel.. or maybe the Z program itself but i just tried to debug and is taking Linux and the OPSYSTEM so that should be ok...
Cracking my head.
regards
Juan
This is the error on the trace...
M Wed Oct 1 10:04:16 2008
M ***LOG R49=> ThReceive, CPIC-Error (020456) [thxxhead.c 6904]
M ***LOG R5A=> ThReceive, CPIC-Error (62760924) [thxxhead.c 6909]
M ***LOG R64=> ThReceive, CPIC-Error ( CMSEND(SAP)) [thxxhead.c 6914]
A RFC 3222 CONVID 62760924
A * CMRC=20 DATA=1 STATUS=1 SAPRC=456 ThSAPCMRCV
A RFC> ABAP Programm: SAPLSXPT (Transaction: SE38)
A RFC> User: REYESJP (Client: 800)
A RFC> Destination: %_TCPIP_%2 (handle: 4, , {48E3317D-2F95-2A5F-E100-00000A000
3A0})
A RFC> Called function module: SAPXPG_START_XPG
A *** ERROR => RFC ======> CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456
Timeout during connection setup (check that partner exists)
[abrfcio.c 7849]
A *** ERROR => RFC Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 3224
CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456
Timeout during connection setup (check that partner exists)
[abrfcio.c 7849]
A *** ERROR => RFC Error RFCIO_ERROR_MESSAGE in abrfcio.c : 1644
[abrfcio.c 7849]
I tested and i can touch a file on that directory... as per above message it seems like a connection problem... i just updated sapxpg with the latest release and it doesn't make any difference.
Juan
After going through a lot of notes... i managed to isolate the problem...
basically sapxpg is not executing 1 particular external command which is "cd" so basically i downloaded all the sapxpg versions i could and test them but i get the following error at SM49
Command executed: cd : :
Target host: <linux_host>
Can't exec external program (No such file or directory)
External program terminated with exit code 1
All the problems posted before are gone...
I can call other external commands in the same linux box without any problems and i can call the "cd" command from AIX,
Any thoughts?
regards
Juan
Checking again dev_cp... and find this at initialization...
Trace file of control program (trace level 3)
< Function: BtcTrcInit> Function: main SAPXPG 640
2008-10-01--09-23-38 : Before BtcXpgDetach
> Function: BtcXpgDetach Can't detach from process group (already leader)
< Function: BtcXpgDetach Accept RFC connection from R/3 system
2008-10-01--09-23-38 : Before RfcAccept
2008-10-01--09-23-38 : RfcAccept returned OK
security check switched OFF
Install RFC call SAPXPG_START_XPG
Install RFC call SAPXPG_START_XPG_LONG
Install RFC call SAPXPG_END_XPG
Wait for RFC call SAPXPG_START_XPG or SAPXPG_START_XPG_LONG
2008-10-01--09-23-38 : Before first call of RFCDispatch
2008-10-01--09-23-38 : After first call of RFCDispatch
2008-10-01--09-23-38 : Before call of RfcClose (sequencing error)
2008-10-01--09-23-38 : After call of RfcClose (sequencing error)
Its weird... but wonder why the other commands work and "cd" doesn't
This is the most weird thing ever....!!
i found the problem... now i need to find a way to resolve this.
Basically in theres no "cd" command in /bin or /sbin or /usr/bin in Linux while the "cd" command is on the /bin in AIX.
Thats why all other external programs run in Linux becuase they are in the /bin directory (which is the logic thing).
Anyone knows where the "cd" command is located in LINUX RH5?
Regards
Juan
PS: if its built in bash, how can we call the command from the external command in Linux?
Hello,
maybe you can use a workaround:
Do not call external command cd first, and external command othercmd afterwards, but create an external command, e.g. in a Unix shell script, that will do both in one call.
Reminds me of a common problem in Unix scripting: When you try to create a shell script that will do a cd only, it will work; but the effect will be gone as soon as the script has ended...
regards
Hello,
I suppose you don't just want to cd ; most probably you want to do something in the new directory. (Why else would you cd ?) So let's assume you want to execute othercmd there.
Create a Unix file, for a start with these two lines only:
cd <newdir>
othercmd
Make sure it does what you need, by calling it from Unix.
Then, in SAP, create an external command for it, in SM69.
Or after reading your initial question again, if othercmd just means delete a file , you may even do without cd ; just call rm with absolute pathname.
hope this helps
Hello Juan,
I am still trying to understand what you are trying to do. What exactly do you need cd command for? And what makes you think it is working for AIX? Is it just because there is no error message? Or what are you doing after having executed cd ?
I have neither AIX nor Linux RH at hand, but I tried with HPUX and SuSE Linux. I got errors with SuSE, no errors with HPUX.
Then, in HPUX, I executed, in SM48, zcd first, and zpwd afterwards.
pwd command still gave the old directory, /usr/sap/<SID>/DVEBMGS<nr>/work. And I am by no means surprised.
What is surprising, imho, is that you wrote it works, at least for AIX.
So could you please explain a bit more?
And I cannot imagine that an empty file named cd will make cd command work...
Or what am I missing here?
regards
Basically when I called ZCD from AIX it return without errors and if i called ZCD from Linux it gave me following error;
Command executed: cd : :
Target host: testsap1
Can't exec external program (No such file or directory)
External program terminated with exit code 1
After lots of checking (including reviewing SAPXPG upside down) found that in AIX "cd" command existed as a physical file in /bin, while in Linux was missing. so after trying lots of different things I touched "cd" into /bin in Linux to create an empty file and the error disappeared.
Conclusion: SAP when using externall commands verify that a "cd" physical file exist (even if its empty) in /bin (or somewhere inside $PATH) before proceding. Why??? I have no clue.
Regards
Juan
Hello,
basically, in SuSE Linux I got the same error message as you did in RH.
But what I still don't understand: Is zcd command working from SM48?
It seems you managed to get rid of error messages. But does this mean a changing of working directory did happen?
What is the effect of an external command zcd ??
My hypothesis:
No effect that could be recognized afterwards. You might as well leave cd command away.
Correct me if I am wrong!
regards
Is zcd command working from SM48?
Yes, now its working...
But does this mean a changing of working directory did happen?
and the change directory happened... i even tested it with an extract job that use the external command.
What is the effect of an external command zcd ??
It's used to call a specific directory before uploading/downloading files to the OS by background jobs.
My hypothesis:
No effect that could be recognized afterwards. You might as well leave cd command away.
Correct me if I am wrong!
This solve the issue... so, wrong...
regards
Juan
Hello Juan,
thanks for confirming;
I will have to do more tests, when I have got the time, or the need.
So far I only tried zcd and zpwd in a dialogue session, with the results I mentioned above. From what you wrote I gather that it will be possible for background jobs, even in Linux. Good to know.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.