Error connecting to Actyx in Docker Container

Hi there,

we’ve been successfully using Actyx running in Docker for some time now.
But with a new machine, we get the following error when starting our connector:

Error in connection to Actyx (ws://localhost:4243/store_api): getaddrinfo EAI_AGAIN localhost

Docker runs this version of Actyx: “Actyx 2.8.1-5ac08c40ada3b996ea76463462a83f9b35f89993-linux-x86_64-release”
The dependency used in our package.json for the connector is “@actyx/pond”: “3”

Did anyone else encounter this problem before?

Kind regards,
Max

Hi Max,

this error very likely originates from Docker being confused, see for example javascript - What's the source of Error: getaddrinfo EAI_AGAIN? - Stack Overflow. Normally, localhost is resolved without network access by being described in /etc/hosts, so I assume that your Pond app runs inside a container that doesn’t have this file.

Regards,

Roland

Hi Roland,

you were right on the money! Thank you!
When I ran the container locally in WSL, WSL created a hosts file on the fly, so everything worked.
When I ran the container on an older docker/ubuntu version, the same thing happened apparently, so again everything worked. I don’t know if that had anything to do with the older versions, though.
But on the newer version, the hosts file was not created, so I ran in to the mentioned error.
The solution: I had to pass --add-host localhost:127.0.0.1 as a docker option.

1 Like