PyRFC icon indicating copy to clipboard operation
PyRFC copied to clipboard

Setting up Server

Open mpf82 opened this issue 7 years ago • 6 comments

We are trying to setup a server based on the serverStfcConnection.py example, however we always get this error:

CommunicationError("\nLOCATION    CPIC (TCP/IP) on local host OUR_HOST with Unicode
ERROR       partner '10.XX.XX.43:3300' not reached
TIME        Mon Feb 12 14:56:03 2018
RELEASE     721
COMPONENT   NI (network interface)
VERSION     40
RC          -10
MODULE      nixxi.cpp
LINE        3289
DETAIL      NiPConnect2: 10.XX.XX.43:3300
SYSTEM CALL connect
ERRNO       111
ERRNO TEXT  Connection refused
COUNTER     2\n",)

We can ping the server and also a telnet from the SAP server on our application server on 3300 works.

We can also see the application in the SAP gateway monitor.

The RFC connection has been created in SAP SM59 according to this info: http://sap.github.io/PyRFC/server.html

But also the connection test from SM59 fails.

Suggestions?

Here's our config:

[connection]
ashost = 10.XX.XX.59
client = 300
# saprouter =
sysnr = 00
user = XXXX
passwd = XXXX
dest = 10.XX.XX.43

[gateway]
gwhost = 10.XX.XX.43
# gateway server name
ghserv = sapgw00
program_id = PROG_TEST
# saprouter =

mpf82 avatar Feb 12 '18 14:02 mpf82

It looks like network configuration issue and hard to guess without looking into SAP server configuration. Did you try SAP niping utility ? It can help find and fix certain RFC connectivity and config issues. If niping connectivity test works, Python RFC connection should work with same parameters as well.

bsrdjan avatar Feb 12 '18 14:02 bsrdjan

Thanks for your reply.

It was a bad configuration on our part, we put the wrong gwhost in the gateway section, it's all working now.

Closing issue.

mpf82 avatar Feb 17 '18 08:02 mpf82

no matter what I set in ghserv, it tries to connect 3300, why? not the instance number I want. It's meaningless.

loewechiu avatar Apr 29 '19 02:04 loewechiu

Hi! Use gwserv instead ghserv. It works.

zAlexAlex avatar Jul 12 '19 08:07 zAlexAlex

Server bindings are implemented in main branch: df9805e

More info: https://github.com/SAP/PyRFC/issues/193#issuecomment-720645607

bsrdjan avatar Nov 02 '20 18:11 bsrdjan

Server bindings are published with 2.3.0 release on PyPI, feel free to test.

bsrdjan avatar Dec 02 '20 13:12 bsrdjan