getting while running GOCD docker container in QNAP

I am trying to run gocd docker container ( on QNAP (TS-451 x86 based, firmware 4.2.0) in container station.

container doesn’t’ start and bombs out with

  • Docker Swarm JDBC connection
  • How to connect to mysql using ipv6 from wordpress
  • Mesos/Marathon Memory usage limits for Docker
  • Docker tool box proxy config ,Windows 7
  • Failed to append certificates from PEM in jenkins in docker build and publish plugin OSX
  • Track docker repositories pull
  • May 21 20:21:28 gocd-server-1 syslog-ng[16]: syslog-ng starting up; version='3.5.3'                                                                              
    using default settings from /etc/default/go-server                                                                                                               
    ERROR: Failed to start Go server. Please check the logs.                                                                                                         
    java.lang.RuntimeException: gocd-server-1: gocd-server-1                                                                                                         
            at com.thoughtworks.go.util.ExceptionUtils.bomb(                                                                                  
            at com.thoughtworks.go.server.util.GoSslSocketConnector.getHostname(                                                       
            at com.thoughtworks.go.server.util.GoSslSocketConnector.storeX509Certificate(                                               
            at com.thoughtworks.go.server.util.GoSslSocketConnector.sslConnector(                                                       
            at com.thoughtworks.go.server.util.GoSslSocketConnector.<init>(                                                             
            at com.thoughtworks.go.server.Jetty9Server.sslConnector(                                                                           
            at com.thoughtworks.go.server.Jetty9Server.configure(                                                                               
            at com.thoughtworks.go.server.GoServer.configureServer(                                                                                 
            at com.thoughtworks.go.server.GoServer.startServer(                                                                                     
            at com.thoughtworks.go.server.GoServer.go(                                                                                              
            at com.thoughtworks.go.server.util.GoLauncher.main(                                                                                   
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                           
            at sun.reflect.NativeMethodAccessorImpl.invoke(                                                                         
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(                                                                 
            at java.lang.reflect.Method.invoke(                                                                                                      
            at com.simontuffs.onejar.Boot.main(                                                                                                        
    Caused by: gocd-server-1: gocd-server-1                                                                                           
            at com.thoughtworks.go.server.util.GoSslSocketConnector.getHostname(                                                       
            ... 15 more                                                                                                                                              
    Caused by: gocd-server-1                                                                                                          
            at Method) 

    I checked /etc/hosts inside the container – it includes correct host mapping : gocd-server-1       localhost
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters gocd-server-1
    hostname resovles correctly:
    root@gocd-server-1:/tmp# hostname

    the container image is fine – I have run exactly the same gocd docker container on vagrant Ubuntu vm without any issues

    so the issue is somehow related to QNAP Linux (which seems to be Ubuntu 4.1.2)

    [~] # cat /proc/version
    Linux version 3.12.6 (root@NasX86-12) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Fri Mar 11 02:20:16 CST 2016)

    any ideas how to get around exception?

  • Rebuilding docker image is failing although using the same Dockerfile as shown in the hub
  • Can I get an image digest without downloading the image?
  • Is it possible to assign a static IP adress to a docker container after it's creation?
  • Docker File: Chmod on Entrypoint Script
  • Schema Registry container: Server died unexpectedly when launching using docker-compose
  • Installing docker 17 version on centos 7
  • 2 Solutions collect form web for “getting while running GOCD docker container in QNAP”

    To close this thread: though I still don’t understand why this exception happens I think I found the workaround. So if you are the owner of QNAP and want to run GOCD server using ContainerStation the following steps might be useful:
    1. Create a new container, using travix/gocd-server:lastest image ( This container uses JDK8 (instead of JDK7 as official gocd container) plus it includes more options to configure (if you go to advanced settings while creating a container in ContainerStation).
    2. Start the container – you will get the exception – Caused by:

    Why? no idea, I am pretty sure my /etc/hosts settings are correct. In fact I know they are correct.

    1. next step – keep the container running but ssh to your QNAP:

      ssh admin@ (in my case – change ip of the box to yours)

      // check what images are running:
      docker ps -a

    dde6ce028868 travix/gocd-server:latest “/docker-entrypoint.s” 21 hours ago Up 21 hours>8153/tcp,>8154/tcp gocd

    // ssh into the container  
    docker exec -it dde6ce028868 bash
    // run go-server start script 

    let it run, in my case it successfully started gocd.

    1. clean up work dir
      rm -rf /var/lib/go-server/work/

    2. and now restart the container from ContainerStation

    in my case it starts up correctly without unknown host exceptions

    any theories why? (DNS caching, permissions, some initialisations which silently fail?)

    it turned out the issue is related to ACL which gives read access to /etc/hosts and /etc/resolv.conf only to root. So java application running inside the container under a different user, can’t access these files.

    pls. see this discussion for more information:.

    why am I getting permission denied on file with read permissions inside Docker container?

    if you want to use GOCD with QNAP – you might try to use this container

    which includes the following fix:

    # modify ACL so go user would have read access
    # to /etc/hosts and /etc/resolv.conf
    # this is to avoid HostUnknown exception which happends
    # when the gocd container is used on QNAP with ContainerStation
    setfacl -m user:${USER_ID}:r /etc/resolv.conf
    setfacl -m user:${USER_ID}:r /etc/hosts
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.