haugene / docker-transmission-openvpn

Docker container running Transmission torrent client with WebUI over an OpenVPN tunnel
GNU General Public License v3.0
4.13k stars 1.21k forks source link

Running in Boot2Docker, PIA can't be resolved #4

Closed justrhysism closed 9 years ago

justrhysism commented 9 years ago

I'm pretty new to Docker, so I'm still struggling a touch to figure it all out, and it probably doesn't help that I'm using it with Boot2Docker. Anyhow...

The script is failing because www.privateinternetaccess.com can't be resolved:

Mon Feb 23 12:04:15 2015 TUN/TAP device tun0 opened
Mon Feb 23 12:04:15 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Mon Feb 23 12:04:15 2015 /sbin/ip link set dev tun0 up mtu 1500
Mon Feb 23 12:04:15 2015 /sbin/ip addr add dev tun0 local ##.###.#.6 peer ##.###.#.5
Mon Feb 23 12:04:15 2015 Initialization Sequence Completed
head: cannot open '/config/transmission-credentials.txt' for reading: No such file or directory
tail: cannot open '/config/transmission-credentials.txt' for reading: No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:19 --:--:--     0curl: (6) Could not resolve host: www.privateinternetaccess.com
Got new port  from pia
transmission auth not required
localhost:9091/transmission/rpc/ responded: "success"
Checking port...
Error: portTested: http error 0: No Response

Would you have any ideas on what this might be?

justrhysism commented 9 years ago

Actually, after some further research, I have a pretty strong feeling that this is why: https://github.com/boot2docker/boot2docker/issues/357

haugene commented 9 years ago

Hey! I've been away for a while. Did you resolve the issue? Was it docker dns settings that was the problem? I've stumbled upon a similar problem on linux in another project. I ended up setting global docker daemon dns servers so that all containers had a working internet connection...

ianneub commented 9 years ago

I'm also seeing this problem. Not using boot2docker, but I am on OS X running Docker inside a VirtualBox VM, I'm thinking it's related to that.

@justrhysism Did you resolve this issue?

ianneub commented 9 years ago

I was able to get this to work by replacing /etc/resolv.conf after the container started. Not ideal, but it works, just FYI.

justrhysism commented 9 years ago

Sorry I've been MIA - my server is down ATM so I haven't made any progress for quite some time.

JesterEE commented 9 years ago

I found this to also be an issue when running a docker host in VMWare. When checking the /etc/resolv.conf file, the nameserver was being set to the IP address of my LAN router instead of a valid DNS server. To fix the issue, I needed to add the --dns 8.8.8.8 option to my docker container launch script. This can be confusing to diagnose as the openvpn process remains active even when it's not working and the start-up options don't add management or logging for the openvpn process. I recommend adding a link to this issue, or a potential fix on the docker hub info and github README pages.