-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Hostname #180
Comments
Using niping didn't reveal anything useful. However, it seems like the problem might be on Docker EE's support for linux containers being experimental. Outside of the container, or using windows containers on the same server, there are no issues with resolving the hostnames. Even though I haven't found a solution for this exact problem, I am using the workaround of using a Windows container instead, so I am closing the issue. |
Have the same problem, but I don't want to use a windows container.. do anybody know another workaround? |
@NicolasHomolka, are you using the latest PyRFC and NWRFC SDK releases? Can you share the Dockerfile so that I can try to reproduce? |
Dockerfile: ARG BASE_IMAGETAG="develop" COPY ./sap /usr/local/sap COPY ./src ${RELEASE_DIR} RUN rm /tmp/requirements.txt WORKDIR ${RELEASE_DIR} CMD ["python3", "-u", "test.py"] Requirements.txt: test.py inside src dir: ` def check_config(host, sysnr, client, username, password): while True: It's working local on Ubuntu, but on our staging system theres a centos host and I get the host unknown error |
Which PyRFC and which SAP NWRFC SDK are you using? How your hostname unknown message looks like, does it show the ashost you use for testing or random string as described in initial issue above? If the hostname is correct it is a different issue and it looks like the backend system is not reachable from the staging system centos host. Could that be the case? Can you test the script from the staging system shell and post the error message? |
Ok, that is definitely different issue. The hostname looks correct and PL5 is fine. Could you please test if the |
cl4hana-base-vm is not the value of the ashost variable.. it's the os name of the host os.. |
Can you test from the staging system console if the |
ping from the staging system works.. |
Sorry, no idea than, The fact it works from one system and not from another sounds like a network issue, not related to PyRFC. I would suggest the Basis consultant or network admin check the configuration and test with SAP |
But where the cl4hana-base-vm hostname come from? In python code the ashost variable has the value 192.168.x.x.. Should not be the error message something like "hostname '192.168.x.x unknown" ? |
No idea about NWRFC SDK error messages. Could it be the staging system is running on a local VM? Configured in hosted instead of the bridged mode? You can also check the staging system connectivity to backend, using niping utility. The parameters working for |
Changing the network mode worked for me.. but still no idea why the os-name of the host-os is in the error message.. Propably a SDK peculiarity.. Thank you for your efforts!! |
I'm trying to execute my code in a different server, but I cannot manage to setup a connection using PyRFC. I suspect that there might be something setup erroneously in the network device.
Whever I attempt to create an instance of pyrfc.Connection, I get an error:
The host name displayed in the error message, is not actually the string I provide as the "ashost" parameter, and it seems to be a random string of numbers and letters. I get this error independently from whether the connection parameters I provide are correct or not. For contrast, if I attempt to create a connection with an erroneous host name, the error will show the erroneous name in the error message above.
The random string shown in the message error is different with every new container I run in the server, but within the same container, remains the same independently from what I provide as "ashost".
Performing a ping to the host name or the IP address from the same computer works correctly, so the server should be reachable.
The only similar issue I could find was #43 However, in that issue the provided host name is actually shown in the error message, so I don't think it's the same error.
Here's the rest of the error:
Environment Details
PyRFC Version: 2.0.5 (Dockerfile pulls the current master branch of this repo)
Base Image: python:3.7-buster
Docker: Docker EE 19.03.5
The text was updated successfully, but these errors were encountered: