YunoHost-Apps / netdata_ynh

NetData package for YunoHost
http://my-netdata.io/
GNU General Public License v3.0
10 stars 5 forks source link

Last upgrade broke my YNH admin interface #85

Closed stemy2 closed 2 years ago

stemy2 commented 2 years ago

Describe the bug

Since i upgraded netdata, i can't access to the admin interface. I juste habve the message: File does not exist, or is not accessible: /opt/netdata/usr/share/netdata/web/yunohost/admin/. If i delete netdata, i have an HTTP 502 error.

Context

Steps to reproduce

sudo yunohost app upgrade

Expected behavior

Upgrade

Logs

https://paste.yunohost.org/raw/elozivusaz https://paste.yunohost.org/raw/yudatecife

JimboJoe commented 2 years ago

Is your netdata instance at a domain root? If so, could you please check you have the netdata.conf nginx conf file netdata.conf in /etc/nginx/conf.d/domain.conf.d, and potentially a duplicate in /etc/nginx/conf.d/yourfdefaultdomain.conf.d? If so, could you remove the latter one and reload nginx (systemctl reload nginx)?

stemy2 commented 2 years ago

The directory "/etc/nginx/conf.d/mydefaultdomain.tld.conf.d" is empty.

I deleted the one contained in "/etc/nginx/conf.d/domain.conf.d" then reloaded nginx, no changes.

JimboJoe commented 2 years ago

Sorry; I misled you: you have to replace "domain" by the domain where you installed netdata (at the root "/" or not?). "mydefaultdomain" is the default domain of your YunoHost install (where you access the sso or the admin interface). Is it really empty? Now that you've removed the netdata.conf of the "domain" conf directory, is there any remaining? If so, you need to keep it, but in the right directory corresponding to the domain where you installed netdata.

stemy2 commented 2 years ago
Sorry; I misled you: you have to replace "domain" by the domain where you installed netdata (at the root "/" or not?).
"mydefaultdomain" is the default domain of your YunoHost install (where you access the sso or the admin interface). Is it really empty?

No, it didn't misleaded me, i understood i had to replace them by actual (sub)domains.

JimboJoe commented 2 years ago

OK, good 😅 So what is the status? Is netdata installed at the root of the domain? Do you have any remaining netdata.conf file in the nginx conf directories? (For the background, it happened to me once when I tested the upgrade, to have a duplicate netdata.conf file in the conf dir of my default YunoHost domain, and it created the same symptoms... Yet I don't understand (yet) that behavior... 😅).

EDIT: I spotted a long-lasting bug with variables scope that is the culprit. You definitely have a second netdata.conf file in nginx conf dir, but in a random domain configuration dir. Just move it to the proper directory and you should be all set! I'm testing right now a fix release to prevent this to happen in the future.

stemy2 commented 2 years ago

Ok, i reinstalled netdata and applied what you said and it's working now.

Thanks.