I have a lemmy-ui instance working correctly, fresh ansible install. I haven’t configured it yet, but it’s up and running and test posts work fine.
I’m mostly interested in lemmyBB, so I installed that according to “Alongside existing Lemmy instance (native)” install instructions.
Everything seems to work fine during install,
systemctl status lemmy_bb.service
shows:
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket::launch_] (FileServer: assets) GET /assets/<path..> [10]
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket::launch] 📡 Fairings:
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket::launch_] Templating (ignite, liftoff)
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket::launch_] Shield (liftoff, response, singleton)
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket::launch_] Site data fetcher (request)
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket::shield::shield] 🛡️ Shield:
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket_dyn_templates::fairing] 📐 Templating:
Jan 17 06:51:57 vps-f7b29755 lemmy_bb[484]: [2023-01-17T06:51:57Z INFO rocket::launch] 🚀 Rocket has launched from http://127.0.0.1:8703
When checking in with a browser, I get 502 Bad Gateway.
error.log
2023/01/17 07:05:13 [error] 528#528: *33 connect() failed (111: Connection refused) while connecting to upstream, client: 205.178.101.86, server: forums.domain.com, request: "GET / HTTP/2.0"$2023/01/17 07:05:13 [error] 528#528: *33 connect() failed (111: Connection refused) while connecting to upstream, client: 205.178.101.86, server: forums.domain.com, request: "GET /favicon.ic$2023/01/17 07:05:32 [error] 528#528: *50 connect() failed (111: Connection refused) while connecting to upstream, client: 205.178.101.86, server: forums.domain.com, request: "GET / HTTP/2.0"$2023/01/17 07:05:32 [error] 528#528: *50 connect() failed (111: Connection refused) while connecting to upstream, client: 205.178.101.86, server: forums.domain.com, request: "GET /favicon.ic$
Make sure these ports are the same. Since your UI is running on 8703 you should use 8703 in the nginx config as well.
I appreciate all the help! New error, 500
systemctl status lemmy_bb.service
How are you running the lemmy backend? What port is it running on?
Here’s the config I use for the lemmy backend: https://github.com/LemmyNet/lemmy/blob/main/docker/prod/nginx.conf here’s my lemmy.hjson https://github.com/LemmyNet/lemmy/blob/main/docker/prod/lemmy.hjson
like I said, aside from domain name and required variables, everything is default, running a fresh vps. Ansible install for Lemmy, “install along other instance” instructions for lemmyBB.
No messing with ports. Fresh debian 10, debian 11, ubuntu 22, all with the same result:
Lemmy-UI works fine, lemmyBB returns a 502.
Are you using docker at all? If yes, can you share the output of
docker ps
?Also, can you share your
/etc/systemd/system/lemmy_bb.service
file?Thank you for sticking with me!
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 88a017ba5903 dessalines/lemmy-ui:0.16.7 "docker-entrypoint.s…" 35 hours ago Up 22 minutes 127.0.0.1:8601->1234/tcp itsdomaincom_lemmy-ui_1 1299fcaeb678 dessalines/lemmy:0.16.7 "/app/lemmy" 35 hours ago Up 22 minutes 127.0.0.1:30850->8536/tcp itsdomaincom_lemmy_1 145c7d2f16f2 mwader/postfix-relay "/root/run" 35 hours ago Up 22 minutes 25/tcp itsdomaincom_postfix_1 737381a2939c asonix/pictrs:0.3.1 "/sbin/tini -- /usr/…" 35 hours ago Up 22 minutes 6669/tcp, 127.0.0.1:2112->8080/tcp itsdomaincom_pictrs_1 0f907e51bb9d postgres:12-alpine "docker-entrypoint.s…" 35 hours ago Up 22 minutes 5432/tcp itsdomaincom_postgres_1
lemmy_bb.service
[Unit] Description=lemmy_bb After=network.target [Service] Type=simple WorkingDirectory=/opt/lemmyBB/ Environment="LEMMYBB_BACKEND=http://127.0.0.1:8536" Environment="LEMMYBB_LISTEN_ADDRESS=127.0.0.1:8703" Environment="LEMMYBB_INCREASED_RATE_LIMIT=1" Environment="LD_PRELOAD=libjemalloc.so" ExecStart=/opt/lemmyBB/target/release/lemmy_bb Restart=always [Install] WantedBy=multi-user.target
Try changing this to
LEMMYBB_BACKEND=http://127.0.0.1:30850
and see if it works.New error, getting closer I think
500: Internal Server Error The server encountered an internal error while processing this request. Rocket
What do the lemmy_bb logs say?