PyRFC
PyRFC copied to clipboard
Setting up Server
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 =
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.
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.
no matter what I set in ghserv, it tries to connect 3300, why? not the instance number I want. It's meaningless.
Hi! Use gwserv instead ghserv. It works.
Server bindings are implemented in main branch: df9805e
More info: https://github.com/SAP/PyRFC/issues/193#issuecomment-720645607
Server bindings are published with 2.3.0 release on PyPI, feel free to test.