2

I try to get the Docker image (1.651.3 or latest version) running on my QNAP NAS using the internal ContainerStation.

Just using the default settings without setting any parameters or binding any resource, I can't access the internet. I already tried the NAT or Host network mode, but this would make no difference.

Stacktrace:

Oct 02, 2016 1:55:07 PM javax.jmdns.impl.HostInfo newHostInfo                                                                   
WARNING: Could not intialize the host network interface on nullbecause of an error: 5929616b9f0b: 5929616b9f0b: unknown error   
java.net.UnknownHostException: 5929616b9f0b: 5929616b9f0b: unknown error                                                        
    at java.net.InetAddress.getLocalHost(InetAddress.java:1505)                                                             
    at javax.jmdns.impl.HostInfo.newHostInfo(HostInfo.java:75)                                                              
    at javax.jmdns.impl.JmDNSImpl.<init>(JmDNSImpl.java:407)                                                                
    at javax.jmdns.JmDNS.create(JmDNS.java:60)                                                                              
    at hudson.DNSMultiCast$1.call(DNSMultiCast.java:32)                                                                     
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)                         
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)                                                             
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)                                      
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)                                      
    at java.lang.Thread.run(Thread.java:745)                                                                                
Caused by: java.net.UnknownHostException: 5929616b9f0b: unknown error                                                           
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)                                                           
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)                                                       
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)                                              
    at java.net.InetAddress.getLocalHost(InetAddress.java:1500)                                                             
    ... 9 more    

Using bash:

$ ping google.de     
ping: unknown host  

Any idea what might be the problem? Any other docker image can access the internet, only this image has these problems.

mhall
  • 3,671
  • 3
  • 23
  • 35
Christian Gripp
  • 333
  • 2
  • 9

1 Answers1

1

I recently experienced the same problem and in my case it turned out to be caused by the ACL lists on the QNAP, preventing the jenkins user in the container from reading the /etc/hosts and /etc/resolv.conf files.

Here's how I fixed it. Perhaps it can be of some help to you as well:

  1. ssh to the QNAP

    $ ssh admin@<your IP or domain name here>

  2. Manually create a jenkins user on the QNAP with UID 1000 (the same UID as the jenkins user in the container)

    $ useradd -u 1000 -M -s /bin/false jenkins

  3. Log into the QNAP web interface

  4. Navigate to Control panel -> Users

  5. Click the Edit Shared Folder Permissions icon for the jenkins user

  6. Tick the RW checkbox (Read/Write access) for the Container folder and click Apply

  7. Start your Jenkins container

Disclaimer: I am no sysadmin so I don't know whether this approach would cause any security issues on your system. You may want to look into that before giving outside access to your Jenkins web interface... :)

mhall
  • 3,671
  • 3
  • 23
  • 35