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>

SM59 error can also be:
pic2.jpg

In this case, work process trace file (dev_w<x>) will show:

 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>

SystemLog entry (transaction SM21) that can be seen:
    12:34:56 DIA <nr>                                         R4  9 Communication error, CPIC return code 001, SAP return code 667

   #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) that can be seen:
    12:34:56 RD                                         S3  3 fork failed, error 002


Read more...

Environment

SAP NetWeaver

Product

SAP NetWeaver all versions

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.