Docker Community Forums

Share and learn in the Docker community.

Ports not accessible from host in v1.12-rc2-beta16


(Devin Carlson) #1

In docker for mac v1.11 our Rails app built successfully without issue. The site was accessible from the host. Once the upgrade to v1.12 occurred, the app is no longer accessible from the host however the container appears to build correctly. The app logs (Rails production.log & Thin server log) appear normal with no errors indicating that the web server isn’t starting.

The docker logs show this line which could point to the issue: 6/28/16 9:10:33.402 PM Docker[669]: tcp:0.0.0.0:5000:tcp:172.17.0.2:5000 proxy failed with flow proxy b: write failed with Eof

Running curl http://0.0.0.0:5000 in the container returns 200 however running curl outside the container returns curl: (52) Empty reply from server

Information

We have a scripted deployment but the final docker run command (where the ports are forwarded) is this:
docker run -it -d -v #{@deploy_dir}/llp:/home/app/llp -v #{@deploy_dir}/te-api:/home/app/te-api -v #{@host_db_dir}:/var/lib/mysql -v #{@host_upload_dir}:/home/app/llp/public/uploads -p 0.0.0.0:5000:5000 ll_app /var/start_services.sh

Docker for Mac: version: mac-v1.12.0-beta16.2
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160628-211214.tar.gz
failure: No error was detected
[OK] docker-cli
[OK] app
[OK] menubar
[OK] virtualization
[OK] system
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

I’ve taken a look at quite a few posts like these here and here but can’t figure out what’s wrong. Any assistance is greatly appreciated.


(Devin Carlson) #2

Just in case someone comes across this, I found a solution after chasing my tail for a few days.

I just had to reset docker in the preference pane. Then, after rebuilding the container, the ports were working as expected. Not sure what happened when docker got updated but something broke and was fixed with the reset.

Hope that helps.