Installation error - Cannot start service web, address already in use
Hello,
Running Step 9 of installation, I got an error:
ERROR: for talkyard_web_1 Cannot start service web: driver failed programming external connectivity on endpoint talkyard_web_1 (5852cd9052079346c8185603c2d2451ad3d3352e1cb8fceeb691812a9448b561): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
On
docker-compose ps
I got:
Name Command State Ports
talkyard_app_1 /bin/sh -c rm -f /opt/talk ... Up 3333/tcp, 9000/tcp, 9443/tcp,
9999/tcp
talkyard_cache_1 docker-entrypoint.sh redis ... Up 6379/tcp
talkyard_rdb_1 /chown-logs-then-exec-entr ... Up 5432/tcp
talkyard_search_1 /docker-entrypoint.sh /bin ... Up 9200/tcp, 9300/tcp
talkyard_web_1 /bin/sh -c /etc/nginx/run- ... Exit 128
So I inquired what's using port 80 with
sudo lsof -i :80
and found Nginx using this port:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 19819 root 6u IPv4 46549 0t0 TCP *:http (LISTEN)
nginx 19819 root 7u IPv6 46550 0t0 TCP *:http (LISTEN)
nginx 25491 www-data 6u IPv4 46549 0t0 TCP *:http (LISTEN)
nginx 25491 www-data 7u IPv6 46550 0t0 TCP *:http (LISTEN)
So I stopped Nginx with
systemctl stop nginx
Then Step 9 was completed successfully, and all the containers were up:
Name Command State Ports
talkyard_app_1 /bin/sh -c rm -f /opt/talk ... Up 3333/tcp, 9000/tcp, 9443/tcp, 9999/tcp
talkyard_cache_1 docker-entrypoint.sh redis ... Up 6379/tcp
talkyard_rdb_1 /chown-logs-then-exec-entr ... Up 5432/tcp
talkyard_search_1 /docker-entrypoint.sh /bin ... Up 9200/tcp, 9300/tcp
talkyard_web_1 /bin/sh -c /etc/nginx/run- ... Up 0.0.0.0:443->443/tcp,:::443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp
Yet I have not found anything at the "talkyard.vimuttimag.ga" page. When I opened the home page of my website, I got Talkyard "Create admin account" page instead of the Ghost I installed before, and on pressing a "Create Account" button an error message:
502 Bad Gateway [TyE502BGW]
Talkyard's Nginx server cannot connect to Talkyard's application server.
Is the application server not running, or is there some network error?Please check if the 'app' Docker container is running: 'docker-compose ps'
The
docker-compose ps
showed that the "app" container is running:
Name Command State Ports
talkyard_app_1 /bin/sh -c rm -f /opt/talk ... Up 3333/tcp, 9000/tcp, 9443/tcp, 9999/tcp
talkyard_cache_1 docker-entrypoint.sh redis ... Up 6379/tcp
talkyard_rdb_1 /chown-logs-then-exec-entr ... Up 5432/tcp
talkyard_search_1 /docker-entrypoint.sh /bin ... Up 9200/tcp, 9300/tcp
talkyard_web_1 /bin/sh -c /etc/nginx/run- ... Up 0.0.0.0:443->443/tcp,:::443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp
What should I do to properly integrate Talkyard to Ghost?
- KajMagnus @KajMagnus2021-10-13 21:28:51.101Z
Yet I have not found anything at the "talkyard.vimuttimag.ga" page. When I opened the home page of my website, I got Talkyard "Create admin account" page instead of the Ghost I installed before
Was Nginx, which you mentioned you stopped, previously serving Ghost? Then, when stopping Nginx, and starting Talkyard instead, Talkyard would reply at port 80 and 443 (instead of Ghost, which would "disappear").
What should I do to properly integrate Talkyard to Ghost?
To run both Ghost and Talkyard on the same machine, you can to configure Nginx as a reverse proxy for both Talkyard and Ghost.
Here someone, Locatelli, wrote a mini tutorial about how to do that: (Nginx reverse proxy + Talkyard)
- DDmytro Ivakhnenko @Digharatta
Thank you for detailed reply!
I inquired about configuring Nginx as a reverse proxy for Ghost, and I am waiting for an answer.
But perhaps there's a simpler solution - what if I just install Ghost on the main domain, Talkyard on the subdomain, and integrate it in a way similar to:
https://ghost.org/integrations/talkyard/ - In reply toKajMagnus⬆:DDmytro Ivakhnenko @Digharatta
Thank you!
I have set up the Ghost and Talkyard on two separate small servers, and this standard setup worked.
- In reply toDigharatta⬆:KajMagnus @KajMagnus2021-10-13 21:34:15.601Z
on pressing a "Create Account" button an error message: .... 502 Bad Gateway
That's odd. What happens if you
telnet localhost 9000
ornetstat -tlpn | grep 9000
? Or if you have a look in/var/log/nginx/error.log
and/var/log/talkyard/
— if you want to, you could tar-gzip any log files, or the end / the-relevant-parts of the files, and send to me in a PM- DDmytro Ivakhnenko @Digharatta
Probably the reason for this is that I skipped the initial step:
"Point a domain name, say, talkyard.your-website.com, to the server IP address."
Now I have added an A record "talkyard".