Open retiolus opened 1 year ago
The issue is coming from the lemmy service, I can't get logs, yunohost-api crash when trying to get them.
Do you still have this issue? I just tried upgrading on my live instance and noticed the same thing however I was able to dig a little deeper. I think this is if you have a large database. If you can ssh into your machine (or have physical access), you can see what the lemmy service is doing by looking at the /var/log/lemmy/lemmy.log
file. In my case I saw the following line:
lemmy_db_schema::utils: Running Database migrations (this may take a long time)...
Yunohost thinks the upgrade succeeded but you should have seen a warning saying the lemmy service didn't fully start, that's because it's still running the migrations.
You can follow along by running tail -f /var/log/lemmy/lemmy.log
and waiting until it says something new. You can also run top
and see that postgres
is using a ton of CPU as it goes through the migrations. It seems like the best bet is to wait until the migrations are complete and you see Database migrations complete.
in that log file.
That's correct
2 h and still doing the database migration (~7 GB database), is this normal?
Database migration finished and still having the "Error" message.
API error: FetchError: request to http://0.0.0.0:8536/api/v3/site? failed, reason: connect ECONNREFUSED 0.0.0.0:8536
I'm seeing this too. After migration I'm getting:
Error connecting to postgres://lemmy:9WVl5bVF0FA9myk1slnMFlY7g9KEsW@localhost:5432/lemmy: could not connect to server: Connection refused
I was seeing the connection refused to the postgres server, attempting to start lemmy again got me past that issue. But then it appeared that I was having troubles federating. I wasn't able to see any incoming activity.
I've opted to restore from my backup for the time being.
Fixed the issue following these steps:
/etc/systemd/system/lemmy-ui.service
:
LEMMY_INTERNAL_HOST
--> LEMMY_UI_LEMMY_INTERNAL_HOST
LEMMY_EXTERNAL_HOST
--> LEMMY_UI_LEMMY_EXTERNAL_HOST
LEMMY_HTTPS
--> LEMMY_UI_HTTPS
lemmy-ui
serviceUpdated config of the environment variables: https://github.com/LemmyNet/lemmy-ui#configuration
Thank you @retiolus for this possible fix, as I do not see the OP error. It's not clear if the server is now federating or not though.
Now I'm getting the original error again. Anyone have any ideas on how to fix this?
My server running 0.18.2~ynh3 was completely broken, here is how I fixed it (not sure if this will allow futures updates from YunoHost):
node: v20.14.0 yarn: 1.22.22
sudo -u lemmy bash
cd
rm -rf lemmy-ui
git clone https://github.com/LemmyNet/lemmy-ui.git --recursive
--> --recursive
is very importantcd lemmy-ui
git checkout 0.18.2
yarn install --pure-lockfile
yarn build:prod
sudo nano /var/www/lemmy/config/config.hjson
and change port
to 8536
sudo systemctl restart lemmy
sudo nano /etc/nginx/conf.d/lemmy.cat.d/lemmy.conf
and change all 8537
to 8536
sudo systemctl daemon-reload && sudo systemctl restart nginx
sudo systemctl restart lemmy-ui
After upgrading to latest 0.18.1 Lemmy Yunohost version, my Lemmy server look like this: