If you have your sites on easyengine and none of your sites are down, you have to check if nginx is running fine. So I refreshed the services but then I got an error:
root@localhost:~# ee service refresh
Starting services_global-nginx-proxy_1 ... error
ERROR: for services_global-nginx-proxy_1 Cannot start service global-nginx-proxy: driver failed programming external connectivity on endpoint services_global-nginx-proxy_1 (9892615d9abf37c843695746727dc7ff065283139fe3f2ab66526c45ebe96b36): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: for global-nginx-proxy Cannot start service global-nginx-proxy: driver failed programming external connectivity on endpoint services_global-nginx-proxy_1 (9892615d9abf37c843695746727dc7ff065283139fe3f2ab66526c45ebe96b36): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
Encountered errors while bringing up the project.
It definitely looks like something’s broken with the easyengine. I’ve googled the similar error code and found some results that suggested to restart the ngingx-proxy itself so I did:
root@localhost:~# ee service restart nginx-proxy
Restarting services_global-nginx-proxy_1 ... error
ERROR: for services_global-nginx-proxy_1 Cannot restart container 834def9742a94182bebabd65da2e745b59ebf459cdd81ee363e7d6d0cf413c91: driver failed programming external connectivity on endpoint services_global-nginx-proxy_1 (8f1d2b9569490b7cfa30fb6d831d5a086ab96c07019f98919539aed083b52161): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
Success: Service global-nginx-proxy restarted.
However, that was not enough because none of my sites were accessible. Whenever I tried to access any of the sites I have on easyengine I got that Cloudflare’s 521 error saying there’s a problem with the server.
Some suggestions said I should search for any docker instance and kill it:
root@localhost:~# ps -ef | grep docker
root 739 1 0 12:11 ? 00:00:05 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root@localhost:~# kill 739
But that didn’t really fix my issue even after starting docker again:
root@localhost:/opt/easyengine/services# docker-compose up -d
Pulling global-newrelic-daemon (easyengine/newrelic-daemon:v4.3.0)...
v4.3.0: Pulling from easyengine/newrelic-daemon
cd784148e348: Pull complete
b50607677bac: Pull complete
Creating services_global-redis_1 ...
Creating services_global-nginx-proxy_1 ... error
Creating services_global-newrelic-daemon_1 ...
Creating services_global-redis_1 ... done
Creating services_global-newrelic-daemon_1 ... doneCreating services_global-db_1 ... done
ERROR: for global-nginx-proxy Cannot start service global-nginx-proxy: driver failed programming external connectivity on endpoint services_global-nginx-proxy_1 (34445ab9661c25cdbbdd8cea161f5a8a9dea69a00d60dcae9e16ecaf3e72eb60): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.
Then I thought maybe there’s apache2 running and I don’t know and that was the case so I disabled it.
root@localhost:/opt/easyengine/services# apache2
[Thu Jun 30 13:19:43.888904 2022] [core:warn] [pid 26507] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
root@localhost:/opt/easyengine/services# systemctl stop apache2
root@localhost:/opt/easyengine/services# systemctl disable apache2
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable apache2
Now easyengine works great again.
Leave a Reply