Skip to content
This repository was archived by the owner on May 28, 2026. It is now read-only.
This repository was archived by the owner on May 28, 2026. It is now read-only.

How to solve key=RFC_COMMUNICATION_FAILURE issue?! #364

Description

@IT-HONGREAT

I met key=RFC_COMMUNICATION_FAILURE error, and study documents&git issues.
But i didn't solve this error. I ask for your help.

Environment

  • OS: MacOs m1
  • Running in local(mac), python3.9 (from pycharm - miniconda)
  • PyRFC version : 3.3.1

I installed sapnwrfc pkg. and export envs.

envs

DYLD_LIBRARY_PATH=/usr/local/sap/nwrfcsdk/lib
SAPNWRFC_HOME=/usr/local/sap/nwrfcsdk
SAPNWRFC_INI_FILE=/Users/myname/PycharmProjects/myproject/src/app/sap_rfc/sapnwrfc.ini

This is my sapnwrfc.ini file.

DEST=TEST
ASHOST=some_ip
CLIENT=100
LANG=KO
SYSNR=20
USER=something
PASSWD=something
RFC_TRACE=3

This is my connection code from some examples.

import os

from pyrfc import Connection

print(os.getenv("SAPNWRFC_INI_FILE"))
client = Connection(dest="TEST")
print(client)

result = client.call("STFC_CONNECTION", REQUTEXT="Hello SAP!")
print(result)

And comes this error.

pyrfc._exception.CommunicationError: 1 (rc=1): key=RFC_COMMUNICATION_FAILURE, message=
LOCATION    CPIC (TCP/IP) on local host with Unicode
ERROR       partner 'some_ip:some_port' not reached
TIME        Fri Mar 15 15:33:27 2024
RELEASE     753
COMPONENT   NI (network interface)
VERSION     40
RC          -10
MODULE      /bas/753_REL/src/base/ni/nibuf.cpp
LINE        4593
DETAIL      NiBufIConnect: connection pending after 60000ms
SYSTEM CALL connect
ERRNO       36
ERRNO TEXT  Operation now in progress
COUNTER     2
 [MSG: class=, type=, number=, v1-4:=;;;]

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions