Skip to content
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

Self-built docker unable to resolve host #19

Closed
ab623 opened this issue May 27, 2015 · 5 comments
Closed

Self-built docker unable to resolve host #19

ab623 opened this issue May 27, 2015 · 5 comments

Comments

@ab623
Copy link
Contributor

ab623 commented May 27, 2015

So I don't know if this is an issue or not, but I'm seeing some weird behaviour.

When I run the following default script, everything works fine.

$ docker run --privileged  -d \
              -v /your/storage/path/:/data \
              -e "PIA_USERNAME=user" \
              -e "PIA_PASSWORD=pass" \
              -p 9091:9091 \
              -e "OPEN_VPN_CONFIG=Netherlands" \
              haugene/transmission-openvpn

but if I do

$ git clone https://github.com/haugene/docker-transmission-openvpn
$ docker build -t="docker-transmission-openvpn" .

$ docker run --privileged  -d \
              -v /your/storage/path/:/data \
              -e "PIA_USERNAME=user" \
              -e "PIA_PASSWORD=pass" \
              -p 9091:9091 \
              -e "OPEN_VPN_CONFIG=Netherlands" \
              ocker-transmission-openvpn

I get the following messages when I run docker logs containerid

Starting OpenVPN using config Netherlands.ovpn
Overriding resolv.conf...
Setting PIA credentials...
Wed May 27 21:22:28 2015 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec  1 2014
Wed May 27 21:22:28 2015 WARNING: file '/config/pia-credentials.txt' is group or others accessible
Wed May 27 21:22:28 2015 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Wed May 27 21:22:28 2015 RESOLVE: Cannot resolve host address: nl.privateinternetaccess.com: Temporary failure in name resolution
Wed May 27 21:22:28 2015 RESOLVE: Cannot resolve host address: nl.privateinternetaccess.com: Temporary failure in name resolution
Wed May 27 21:22:33 2015 RESOLVE: Cannot resolve host address: nl.privateinternetaccess.com: Temporary failure in name resolution

It won't connect at all, which is weird.

Any ideas?

@haugene
Copy link
Owner

haugene commented May 28, 2015

There was some DNS issues in #4
Can you see what's inside /etc/resolv.conf? I'm guessing that your DNS server setup has gone wrong somehow. If that is the case, as you can see in issue 4 there is a workaround for this. See RESOLV_OVERRIDE parameter described in README.
Related: moby/moby#541

@ab623
Copy link
Contributor Author

ab623 commented May 28, 2015

Did you notice that the script was trying to set the resolv.conf file even though I didn't specify the ENV variable.

Overriding resolv.conf...

I went to the transmission/start.sh and commented out the following line (23):
# printf "$RESOLV_OVERRIDE" > /etc/resolv.conf

and i had no issues building and running the container.

I think there's an issue with the ENV variable setting the wrong info. Is this becuase its not wrapped in {}?

@haugene
Copy link
Owner

haugene commented May 28, 2015

The {} wrapping in environment-variables.sh file is only for transmission related settings. The resolv override happens before this.

I haven't seen that error before, no. It doesn't occur on my host (running xubuntu), and as you say it doesn't happen in the trusted build images either. So it's probably something on your host system?

@ab623
Copy link
Contributor Author

ab623 commented May 28, 2015

I'll run an apt-get upgrade to see if there are any recent docker changes, and will try again. Thanks

@ab623
Copy link
Contributor Author

ab623 commented May 29, 2015

Updated docker version and this resolved this issue. Raised PR #21 to ensure this wont happen again to future people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants