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

Can't connect #5

Open
thom-nic opened this issue Jan 20, 2016 · 4 comments
Open

Can't connect #5

thom-nic opened this issue Jan 20, 2016 · 4 comments

Comments

@thom-nic
Copy link

Apologies as I suspect this is a PEBCAK but for some reason even though I can see the listening ports and running java process, every connect attempt is closed immediately.

if I docker-machine ssh into the box I can see the listening ports and running java process but still can't connect:

docker@dev:~$ netstat -anlt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
tcp        0      0 10.0.2.15:22            10.0.2.2:53390          ESTABLISHED 
tcp        0      0 :::8080                 :::*                    LISTEN      
tcp        0      0 :::8880                 :::*                    LISTEN      
tcp        0      0 :::22                   :::*                    LISTEN      
tcp        0      0 :::8443                 :::*                    LISTEN      
tcp        0      0 :::37117                :::*                    LISTEN      
tcp        0      0 :::2376                 :::*                    LISTEN      
docker@dev:~$ curl http://localhost:8080
curl: (52) Empty reply from server
docker@dev:~$ curl http://localhost:8880
curl: (52) Empty reply from server
docker@dev:~$ curl https://localhost:8443
curl: (35) Unknown SSL protocol error in connection to localhost:8443 

Java process is running but not mongod:

docker@dev:~$ ps ax|grep java
 7196 ?        SNl    0:04 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java -Xmx256M -jar /usr/lib/unifi/lib/ace.jar start
 7467 pts/0    S+     0:00 grep java
docker@dev:~$ ps ax|grep mongo
 7478 pts/0    S+     0:00 grep mongo

However no errors in the log:

$ docker logs unifi
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2016-01-20 14:38:59,688 CRIT Supervisor running as root (no user in config file)
2016-01-20 14:38:59,688 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2016-01-20 14:38:59,704 INFO RPC interface 'supervisor' initialized
2016-01-20 14:38:59,704 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-01-20 14:38:59,704 INFO supervisord started with pid 1
2016-01-20 14:39:00,708 INFO spawned: 'unify' with pid 8
2016-01-20 14:39:01,709 INFO success: unify entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Any thoughts?

@rednut
Copy link
Owner

rednut commented Jan 20, 2016

check the logs directory inside your data volume mount point
check host firewalling
are you using a preexisting data dir?

@thom-nic
Copy link
Author

I did use -v as described in the README like so -v /usr/local/lib/unifi/data:/usr/lib/unifi/data but the directory is empty on my host side. Should I only use it if I have a preexisting unifi controller data dir? I was expecting the dockerized controller to bootstrap and add data to that directory on first boot but it's still empty. No logs directory.

Although now I wonder if I'm experiencing this docker-library/mysql#44 (comment) since yes, I am on osx and using docker-machine which uses boot2docker under the hood...

@thom-nic
Copy link
Author

yup, looks like the issue was with volume permissions between OSX and boot2docker. I removed the -v line and the I can connect to the controller webapp now.

Although I think I have to change the network configuration of my boot2docker VM - since by default it's NAT'ed I think it's not going to find any APs on my network until I change the network configuration to bridged. But that's a separate issue. Thanks for pointing me in the right direction!

@rednut
Copy link
Owner

rednut commented Feb 1, 2016

u cannot reliabaly mount osx paths into your docker containers using stock boot2docker... yet....

use a data volume container instead...

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

No branches or pull requests

2 participants