SAP Knowledge Base Article - Preview

2252269 - GW: RFC destination (Type T) fails when starting an external program

Symptom

An RFC destination (Connection Type T: TCP/IP Connection) fails when starting an external program; RETURN CODE: 667.

There can be two different scenarios:

   #Scenario 1:

pic1.jpg

Same information can be found on the work process trace file (dev_w<x>):
 M  ***LOG R49=> ThCPICSyncWait, CPIC-Error (001667) [thxxcpic.c   3450]
 M  ***LOG R64=> ThCPICSyncWait, CPIC-Error ( CMINIT(SAP)) [thxxcpic.c   3463]
 A  RFC 1234  CONVID
CONVID 12345678
 A   * CMRC=1 DATA=0 STATUS=0 SAPRC=667 ThSAPOCMINIT
 A  RFC> ABAP Programm: xxxxxxxx (Transaction: SM59)
 A  RFC> User: <user name> (Client: <cln>))
 A  RFC> Destination: <RFC_Name> (handle: x…, DtConId:
 A  *** ERROR => RFC ======> CPIC-CALL: 'ThSAPOCMINIT' : cmRc=1 thRc=667
 Program (exec) could not be started

 A  *** ERROR => RFC Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 1732
 CPIC-CALL: 'ThSAPOCMINIT' : cmRc=1 thRc=667
 Program (exec) could not be started
 DEST =<RFC_Name>
 HOST =<target_hostname>
 PROG =<Program ID>

Error can also be:
pic2.jpg

Work process trace file (dev_w<x>):
 M  ***LOG R49=> ThCPICSyncWait, CPIC-Error (001667) [thxxcpic.c   3424]
 M  ***LOG R64=> ThCPICSyncWait, CPIC-Error ( CMINIT(SAP)) [thxxcpic.c   3437]
 A  RFC 1714  CONVID 12345678
 A   * CMRC=1 DATA=0 STATUS=0 SAPRC=667 ThSAPOCMINIT
 A  RFC> ABAP
Programm: xxxxxxxx (Transaction: SM59)
 A  RFC> User:
user name> (Client: <cln>))
 A  RFC>
Destination: <RFC_Name> (handle: x…, DtConId:
 Error when starting a program (exec) [abrfcio.c    9213]

 A  *** ERROR => RFC Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 1730
 CPIC-CALL: 'ThSAPOCMINIT' : cmRc=1 thRc=667
 Error when starting a program (exec)
 DEST =<RFC_Name>
 HOST =<target_hostname>
 PROG =<Program ID>

The reason is shown on the Gateway trace file (dev_rd):

 *** ERROR => GwStartProgram: execvp failed (No such file or directory) [gwuxrd.c     454]
 ***LOG S34=> GwStartProgram, execvp failed ( 002 /usr/bin/rsh) [gwuxrd.c     461]
 *****************************************************************************
 *  LOCATION    SAP-Gateway on host <hostname> /  sapgw<nr>
 *  ERROR       Start of TP /usr/bin/rsh failed
 *  TIME       
 *  RELEASE    
 *  COMPONENT   SAP-Gateway
 *  VERSION     2
 *  RC          667
 *  SYSTEM CALL execvp
 *  ERRNO       2
 *  ERRNO TEXT  No such file or directory
 *****************************************************************************
 *** ERROR => GwStartProgram: exit /usr/bin/rsh [gwuxrd.c     476]

   #Scenario 2:

pic3.jpg

The failing program can be different from rsh:
   Error when opening an RFC connection (CPIC-CALL: 'ThSAPOCMINIT' : cmRc=26 thRc=667)
   ERROR: Start of TP ‘path\<program>.exe’ failed
   LOCATION: SAP-Gateway on
<hostname>/ sapgw<nr>
   CALL: GwStartProgram
   COMPONENT: SAP-Gateway
   RETURN CODE: 667

The reported error on the work process trace file (dev_w<x>):
 M  **************************************************************************
 M  *  LOCATION    SAP-Gateway on host
<hostname> / sapgw<nr>
 M  *  ERROR       Start of TP E path\<program>.exe failed
 M  *  TIME       
 M  *  RELEASE    
 M  *  COMPONENT   SAP-Gateway
 M  *  VERSION     2
 M  *  RC          667
 M  *  SYSTEM CALL GwStartProgram
 M  **************************************************************************
 A   * CMRC=26 DATA=0 STATUS=0 SAPRC=635 ThSAPOCMINIT
 A  RFC> ABAP Programm:
xxxxxxxx (Transaction: SM59)
 A  RFC> User:
<user name> (Client: <cln>))
 A  RFC>
Destination: <RFC_Name> (handle: x…, 

Same information can be found on the RFC trace file (dev_rfc<x>):
 Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 1732
 CPIC-CALL: 'ThSAPOCMINIT' : cmRc=26 thRc=635
 Partner program fork failed
 DEST =<RFC_Name>
 HOST =<target_hostname>
 PROG =
path\<program>.exe
 GWHOST =<hostname>
 GWSERV =sapgw<nr>

SystemLog entry (transaction SM21):
    12:34:56 RD                                         S3  3 fork failed, error 002

 


Read more...

Keywords

667, GW_EXEC_FAILED, 667 exec failed, exec failed, Error when starting a program (exec),
execvp failed, No such file or directory, GwStartProgram, Start of TP failed, FORK_FAILED, CreateProcess failed , KBA , BC-CST-GW , Gateway/CPIC , BC-MID-RFC , RFC , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.