socket.gaierror with python-gitlab package on some docker images

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

socket.gaierror with python-gitlab package on some docker images

Philipp Thuerwaechter
Hello PyInstaller community,

We use PyInstaller with python3 to create an executable that access gitlab API with python-gitlab package.  We run this executable on several docker images.

On dockerhub python / openjdk images everything works fine, but on dockerhub node (debian based) there is a runtime error that shows up as soon as the first https request to the gitlab API is made. Looks like dns lookup is not initialised properly.

Traceback (most recent call last):
  File "site-packages/urllib3/connection.py", line 159, in _new_conn
  File "site-packages/urllib3/util/connection.py", line 61, in create_connection
  File "socket.py", line 918, in getaddrinfo
socket.gaierror: [Errno -2] Name or service not known


When running the code with python3 directly  on the node image after installing  python-gitlab package everything works fine. That fact makes me quit sure, that it is no issue with image itself but with PyInstaller

Does anyone has a clue how to solve that issue or how to dig further

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/13beee89-b8d7-4326-a0a5-1aa7cda9d8d7o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: socket.gaierror with python-gitlab package on some docker images

Philipp Thuerwaechter
After investigating, i guess it's an issue with different c libraries. the pure `node` image is not `debian` based, but alpine, therefore it uses muslc instead of glibc. when running on node:12-buster which is debian based, the binary runs

So in my case, i have to build and run the binary on a linux with the same c library.

On Tuesday, 23 June 2020 10:24:00 UTC+2, Philipp Thuerwaechter wrote:
Hello PyInstaller community,

We use PyInstaller with python3 to create an executable that access gitlab API with python-gitlab package.  We run this executable on several docker images.

On dockerhub python / openjdk images everything works fine, but on dockerhub node (debian based) there is a runtime error that shows up as soon as the first https request to the gitlab API is made. Looks like dns lookup is not initialised properly.

Traceback (most recent call last):
  File "site-packages/urllib3/connection.py", line 159, in _new_conn
  File "site-packages/urllib3/util/connection.py", line 61, in create_connection
  File "socket.py", line 918, in getaddrinfo
socket.gaierror: [Errno -2] Name or service not known


When running the code with python3 directly  on the node image after installing  python-gitlab package everything works fine. That fact makes me quit sure, that it is no issue with image itself but with PyInstaller

Does anyone has a clue how to solve that issue or how to dig further

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/53da97d8-4f20-46d2-b130-bb77951aa57eo%40googlegroups.com.