Hi 🖖Thank you for this great product :D I hope I'm at the right place here. Thanks for your time in advance!
Bad Gateway issue
I installed ihatemoney on a fresh hetzner yunohost instance (with these instructions) a few weeks ago and everything worked perfectly out of the box.
A week later (without touching anything) my ihatemoney instance showed 502 Bad Gateway nginx. The other apps did/do not have any problems.
Context
Hardware: VPS bought online (hetzner)
Versions
YunoHost version: 11.0.11
kvm amd64
Linux-Kernel 5.10.0-20-amd64
Debian 11.6
I have access to my server: Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
Using, or trying to install package version/branch: 5.2.0~ynh2
Steps to reproduce
I tried lots of things (see below). So I set up a fresh (untouched) yunohost instance and only installed ihatemoney (via web ui).
This also gives me an empty page with the "Bad Gateway" message. Am I alone with that?
2023/01/14 19:49:11 [error] 12319#12319: *24 directory index of "/var/www/ihatemoney/venv/lib/python3.9/site-packages/ihatemoney/static/" is forbidden, client: 62.216.199.26, server: yuno.example.com, request: "GET /ihatemoney/static/ HTTP/2.0", host: "yuno.example.com"
2023/01/14 19:49:35 [error] 12319#12319: *24 upstream prematurely closed connection while reading response header from upstream, client: 62.216.199.26, server: yuno.example.com, request: "GET /ihatemoney/ HTTP/2.0", upstream: "http://unix:/tmp/budget.gunicorn_ihatemoney.sock:/ihatemoney/", host: "yuno.example.com"
2023/01/14 19:51:01 [error] 12648#12648: *1 upstream prematurely closed connection while reading response header from upstream, client: 62.216.199.26, server: yuno.example.com, request: "GET /ihatemoney/ HTTP/2.0", upstream: "http://unix:/tmp/budget.gunicorn_ihatemoney.sock:/ihatemoney/", host: "yuno.example.com"
2023/01/14 19:57:57 [error] 13077#13077: *1 upstream prematurely closed connection while reading response header from upstream, client: 62.216.199.26, server: yuno.example.com, request: "GET /ihatemoney/ HTTP/2.0", upstream: "http://unix:/tmp/budget.gunicorn_ihatemoney.sock:/ihatemoney/", host: "yuno.example.com"
2023/01/14 20:04:03 [crit] 13077#13077: *16 connect() to unix:/tmp/budget.gunicorn_ihatemoney.sock failed (2: No such file or directory) while connecting to upstream, client: 62.216.199.26, server: yuno.example.com, request: "GET /ihatemoney/ HTTP/2.0", upstream: "http://unix:/tmp/budget.gunicorn_ihatemoney.sock:/ihatemoney/", host: "yuno.example.com"
The connect() to unix:/tmp/budget.gunicorn_ihatemoney.sock failed looks bad. So I found this and thought it might have been an issue with nginx not being able to use the socket in /temp.
So I added PrivateTmp=no to
nano /etc/systemd/system/ihatemoney.service
nano /lib/systemd/system/nginx.service
The error does not appear anymore, but my issue still remains.
The other issue that looks suspicious is [Warning] Aborted connection 42 to db: 'ihatemoney' user: 'ihatemoney' host: 'localhost' (Got an error reading communication packets) from the daemon.log.
So I checked if db access is set properly:
mysql --database=ihatemoney --user=ihatemoney -p
use password from cat /var/www/ihatemoney/ihatemoney.cfg
Works without problems. Not sure how to check if there is an issue with sqlalchemy...
... so I thought: just use sqlite (from here)
nano /var/www/ihatemoney/ihatemoney.cfg
SQLALCHEMY_DATABASE_URI = 'sqlite:////var/lib/ihatemoney/ihatemoney.sqlite'
create the folder and file and chmod 777 them.
source /var/www/ihatemoney/venv/bin/activate
export IHATEMONEY_SETTINGS_FILE_PATH=$PWD/ihatemoney.cfg
ihatemoney db upgrade head
Nah, doesn't help.
So i thought: it might have been an update to the repo, which happened a week ago. I went ahead and rolled back the changes and manually installed an older version from here.
Lol. I just came back to my installation and its now working again. Didn't do anything since my last attempt. Maybe it was a language issue (I used German). Cheers!
Hi 🖖Thank you for this great product :D I hope I'm at the right place here. Thanks for your time in advance!
Bad Gateway issue
I installed ihatemoney on a fresh hetzner yunohost instance (with these instructions) a few weeks ago and everything worked perfectly out of the box. A week later (without touching anything) my ihatemoney instance showed
502 Bad Gateway nginx
. The other apps did/do not have any problems.Context
Steps to reproduce
I tried lots of things (see below). So I set up a fresh (untouched) yunohost instance and only installed ihatemoney (via web ui). This also gives me an empty page with the "Bad Gateway" message. Am I alone with that?
Expected behavior
The page should show the ihatemoney ui like here.
Things I (also) tried/checked (sadly without success)
Looks like an issue with nginx, so we restart the required services (good old: turn it off and on).
systemctl restart ihatemoney
systemctl restart nginx
systemctl restart mysql
sudo reboot
Didn't help. So look at logs.
https://examle.com/yunohost/admin/#/services/ihatemoney (journalctl)
cat /var/log/daemon.log
https://yuno.example.com/yunohost/admin/#/services/nginx /var/log/nginx/yuno.example.com-error.log
The
connect() to unix:/tmp/budget.gunicorn_ihatemoney.sock failed
looks bad. So I found this and thought it might have been an issue with nginx not being able to use the socket in /temp.So I added
PrivateTmp=no
toThe error does not appear anymore, but my issue still remains.
The other issue that looks suspicious is
[Warning] Aborted connection 42 to db: 'ihatemoney' user: 'ihatemoney' host: 'localhost' (Got an error reading communication packets)
from thedaemon.log
.So I checked if db access is set properly: mysql --database=ihatemoney --user=ihatemoney -p use password from
cat /var/www/ihatemoney/ihatemoney.cfg
Works without problems. Not sure how to check if there is an issue with sqlalchemy...
... so I thought: just use sqlite (from here) nano /var/www/ihatemoney/ihatemoney.cfg SQLALCHEMY_DATABASE_URI = 'sqlite:////var/lib/ihatemoney/ihatemoney.sqlite' create the folder and file and
chmod 777
them.Nah, doesn't help.
So i thought: it might have been an update to the repo, which happened a week ago. I went ahead and rolled back the changes and manually installed an older version from here.
Didn't help. nginx still tells me
Forced upgrade (
yunohost app upgrade ihatemoney --force
) didn't help.Updating yunohost to latest dev didn't help.
yuno.example.com/ihatemoney/static/favicon.ico is working
Any ideas?