/usr/bin/docker: Error response from daemon: driver failed programming external connectivity on endpoint app

Hey guys, been stuck on this for over a week. I’ve read all of the relevant topics on meta and tried all the solutions here and elsewhere and nothing’s working. I’m just stumped.

Every time I try to ./launcher rebuild app it goes all the way to the end and then…

Removing old container
+ /usr/bin/docker rm app
app

+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_HOSTNAME=bitkcor.com -e DISCOURSE_DEVELOPER_EMAILS=admin@bitkcor.com -e DISCOURSE_SMTP_ADDRESS=smtp.mailgun.org -e DISCOURSE_SMTP_PORT=2525 -e DISCOURSE_SMTP_USER_NAME=postmaster@bitkcor.com -e DISCOURSE_SMTP_PASSWORD=af3ce4432f9613e0b36545e5c1b941c6-c1fe131e-22e64a1e -e LETSENCRYPT_ACCOUNT_EMAIL=admin@bitkcor.com -h bitkcor-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:d6:ee:ff:fa:8d local_discourse/app /sbin/boot
2bef25314e87e6c0679ced8f3c04dd8a98808350baba7a4ff94a3e4c55dc5c20
/usr/bin/docker: Error response from daemon: driver failed programming external connectivity on endpoint app (095c02cba7ddee18c64f04ccd1043408aa8ffed8a3c560b8eeeea133c7abe6c6): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.

Thinking the solution has got to be easy, but can’t find it.

Anybody know the answer?

1 Like

Something is clogging up port 80, which means webserver of some kind.

2 Likes

Thanks Jeff, read your comment on a thread about this from '15 earlier today. Is there a terminal command to trace what’s using it?

Tried sudo lsof -i :80 and got.

COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   3336     root    6u  IPv4  21408      0t0  TCP *:http (LISTEN)
nginx   3336     root    7u  IPv6  21409      0t0  TCP *:http (LISTEN)
nginx   3338 www-data    6u  IPv4  21408      0t0  TCP *:http (LISTEN)
nginx   3338 www-data    7u  IPv6  21409      0t0  TCP *:http (LISTEN)
nginx   3339 www-data    6u  IPv4  21408      0t0  TCP *:http (LISTEN)
nginx   3339 www-data    7u  IPv6  21409      0t0  TCP *:http (LISTEN)
1 Like

Okay, I was doing it wrong. Exited root and hit sudo lsof -i :80 again. Still trying to figure out what this is, but it’s progress.

COMMAND   PID        USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Google    671 triberocket   30u  IPv4 0x1e729b312ca69e05      0t0  TCP 10.0.0.237:56713->server-13-249-71-64.dfw53.r.cloudfront.net:http (ESTABLISHED)
Google    671 triberocket   58u  IPv4 0x1e729b311af72ba5      0t0  TCP 10.0.0.237:56714->server-13-249-71-64.dfw53.r.cloudfront.net:http (ESTABLISHED)
1 Like

Thoroughly confused now. Used Activity Monitor and sorted by Port. A Google Drive File Stream app I just downloaded was built to take port 80. App was wack so it gets the full delete and empty the trash. As soon as I shut down the Google App, something called ContactAccountsServices shows up in Activity Manitor. I shut it down and run a full computer restart.

Computer starts again. I discovered what Google above is two tabs in Chrome. Shut down Chrome and run ./launcher rebuild app. After restart I go ssh root@... and ran system reboot on the Ubuntu server. That seemed to do something but you never want to get too excited. So I go back and long story short

2020-04-10 22:38:39.934 UTC [49] LOG: aborting any active transactions

2020-04-10 22:38:39.937 UTC [49] LOG: worker process: logical replication launcher (PID 58) exited with exit code 1

2020-04-10 22:38:39.939 UTC [53] LOG: shutting down

166:M 10 Apr 2020 22:38:39.942 # User requested shutdown...

166:M 10 Apr 2020 22:38:39.942 * Saving the final RDB snapshot before exiting.

2020-04-10 22:38:39.964 UTC [49] LOG: database system is shut down

166:M 10 Apr 2020 22:38:39.978 * DB saved on disk

166:M 10 Apr 2020 22:38:39.978 # Redis is now ready to exit, bye bye...

sha256:ab0f0c30c7e98b280832fc0355cd0a3eada6063b268b8ae1371e9d315b0ca43e

293cf39b9377bfd9dda6a0e3b9d43bde3e6dcc8341d34d9da21a155f18afb45c

Removing old container

+ /usr/bin/docker rm app

app

+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_HOSTNAME=bitkcor.com -e DISCOURSE_DEVELOPER_EMAILS=admin@bitkcor.com -e DISCOURSE_SMTP_ADDRESS=smtp.mailgun.org -e DISCOURSE_SMTP_PORT=2525 -e DISCOURSE_SMTP_USER_NAME=postmaster@bitkcor.com -e DISCOURSE_SMTP_PASSWORD=af3ce4432f9613e0b36545e5c1b941c6-c1fe131e-22e64a1e -e LETSENCRYPT_ACCOUNT_EMAIL=admin@bitkcor.com -h bitkcor-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:d6:ee:ff:fa:8d local_discourse/app /sbin/boot

b2076d8166130c73c7d988e7e51ac100b9a12ce75f020328d0f47eebdad5e9a3

/usr/bin/docker: Error response from daemon: driver failed programming external connectivity on endpoint app (ba1f594a24e17f29cdaeb0cfe3f2a79af2bb7d22a28c4902c97d37e8f5036347): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.

So, yeah. I’m ready to get out grass skirts and chicken bones to debug this. It’s some Voodoo that’s got to be some simple thing I’m staring right at but have not tried. What that is, I cannot tell you. Can you tell me? Please? My sanity hangs in the balance. I’m better than this. lol

2 Likes

Try sudo systemctl stop nginx .

3 Likes

Removed the nginx welcome page, but now nothing loads — https://bitkcor.com/

Still staring at a blank page. Do I need to restart something now? Any suggestions?

Actually. Just set the SSL back to strict in Cloudflare and it brought it all back.

sudo systemctl stop nginx was the answer.

Thank you @riking!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.