Closed fmunim closed 1 year ago
Yep. That's a Lemmy UI bug. It's caused by improper error handling in the server-side-rendering. If Lemmy-UI can't download the icon for the instance, it simply gives up, instead of proceeding without the icon like it should. You likely added an icon to your instance not too long ago.
Based on the discussion in that issue, it also seems like the URL it's trying to use is being incorrectly calculated in some cases. In your case, it's trying to use port 443 on a localhost IP. It should be using the pictrs
internal hostname, but it isn't. So there's probably two bugs at the same time here.
Unfortunately, this is a Lemmy-UI bug, not a Lemmy-Easy-Deploy bug, so I can't help you fix it permanently. However, you can check that linked issue for some workarounds that seems to be working for people. You'll basically have to log in to your Postgres database from the command line and clear the icon manually. I've never done that, so I can't help you much more than that, but I can at least tell you how to get into your Postgres shell:
cd ./live
docker compose -p lemmy-easy-deploy exec postgres /bin/sh
psql -U lemmy
From there, you can probably run some of the postgres commands posted in that issue I linked.
I hope that helps you at least work around it for now!
Yep. That's a Lemmy UI bug. It's caused by improper error handling in the server-side-rendering. If Lemmy-UI can't download the icon for the instance, it simply gives up, instead of proceeding without the icon like it should. You likely added an icon to your instance not too long ago.
Based on the discussion in that issue, it also seems like the URL it's trying to use is being incorrectly calculated in some cases. In your case, it's trying to use port 443 on a localhost IP. It should be using the
pictrs
internal hostname, but it isn't. So there's probably two bugs at the same time here.Unfortunately, this is a Lemmy-UI bug, not a Lemmy-Easy-Deploy bug, so I can't help you fix it permanently. However, you can check that linked issue for some workarounds that seems to be working for people. You'll basically have to log in to your Postgres database from the command line and clear the icon manually. I've never done that, so I can't help you much more than that, but I can at least tell you how to get into your Postgres shell:
cd ./live docker compose -p lemmy-easy-deploy exec postgres /bin/sh psql -U lemmy
From there, you can probably run some of the postgres commands posted in that issue I linked.
I hope that helps you at least work around it for now!
@ubergeek77 Thank you for the response, could you atleast tell me what did you do to fix it? Since it does not seem like you went into the db?
I just got lucky. When I had this issue, it was from before I updated the docker-compose.yml.template
to remove the internal Docker networks. In Lemmy 0.17.4
and below, the Lemmy maintainers used to have each service on a special internal network that didn't have internet access. In 0.18.0
, they removed those so that every service has internet access.
Before I made this change, Lemmy-UI was trying to reach the internet to go to my real domain to download the icon, but couldn't, so it would crash. I "fixed" it by updating docker-compose.yml.template
, however:
0.18.0
, but now it does. This is a regression.In your case (and some other people in that thread), it seems like Lemmy-UI is somehow resolving an IP address of 127.0.1.1
for your domain. That's obviously wrong, and you're not the only person with that issue. I have no idea what causes it though. This is sadly a regression in 0.18.0
that the Lemmy team will have to eventually fix. But since you are affected, removing the icon is the best you can do for now, sadly.
@ubergeek77 Ah, thank you for the explanation. It seems to work if you remove the icon from DB. Thank you again!
@granddao Out of curiosity, if you run cat /etc/hostname
on your server (not in the postgres container), does it print out your exact Lemmy hostname? Like the .com and all?
@ubergeek77 yes. It does. It seems like I can just upload back the icon after removing it but if anytime it restarts it will go back to that error.
Ok, I see what's going on here. I'll have to add a warning about this.
Check out what happens if you do this:
cat /etc/hosts
You probably see something like 127.0.1.1 lemmy.your-domain.com
, right?
If your machine hostname matches the domain you actually want to use for Lemmy, the record in /etc/hosts
will override any DNS requests, and make the container think it needs to talk to 127.0.1.1
, instead of the real IP.
I'm not sure what your hosting provider is, but you probably named your VM/VPS that domain name, causing it to become this hostname.
You will need to change the hostname of your server to avoid issues like this. You can look up how to do this for Ubuntu, but maybe this will be all you need:
https://phoenixnap.com/kb/ubuntu-20-04-change-hostname
Once you do that and reboot, check /etc/hostname
and /etc/hosts
to make sure your Lemmy domain isn't in there. Then, you can set an icon and you will be fine!
Still, Lemmy-UI needs some error handling :p
@ubergeek77 wow you are a genius, that actually worked!!! Thank you ❤️❤️
I agree about that. Imagine an icon bringing the whole site crashing down.
You're welcome!
Describe the bug I upgraded using the command
sudo ./deploy.sh -f -l 0.18.1-rc.9 -w 0.18.1-rc.9
and it seemed to work but when I open up the site I am greeted with:Logs only says this:
Any help would be appreciated (I did do a backup of the db volume btw)
Relevant: https://github.com/LemmyNet/lemmy-ui/issues/1530
Not sure if this is relevant: https://github.com/LemmyNet/lemmy/issues/3447
Diagnostic Information