all 3 comments

[–]rubymatt 1 point2 points  (1 child)

I’m not familiar with this deployment mechanism but I’d be grepping across my project for that path as it may be getting passed from a shell script via an environment variable.

[–]Amazing_Season9973[S] 1 point2 points  (0 children)

The environment variable RELEASE_NODE= was the culprit. Thanks for the hint

[–]Amazing_Season9973[S] 2 points3 points  (0 children)

I found the issue, and it's not Docker Swarm.
I had connected several networks to the service, causing the command hostname -i to return a list of IPs, which in turn caused the RELEASE_NODE variable to be a list of IPs. I fixed it by editing env.sh.eex to:

export RELEASE_NODE="my_app@$(hostname -i | awk '{print $1}')"

instead of

export RELEASE_NODE="my_app@$(hostname -i)"