YunoHost-Apps / monitorix_ynh

Monitorix package for YunoHost
GNU Affero General Public License v3.0
3 stars 10 forks source link

Upgrade fails when reloading nginx with "invalid port in upstream" #41

Closed MayeulC closed 7 months ago

MayeulC commented 1 year ago
2022-11-17 10:54:14,716: DEBUG - nov. 17 10:54:14 nginx[1553622]: nginx: [emerg] invalid port in upstream "127.0.0.1:/monitorix" in /etc/nginx/conf.d/maindomain.tld.d/monitorix.conf:2

https://paste.yunohost.org/raw/erulayaxec

More recent attempt: https://paste.yunohost.org/raw/ufahozocuk

_Originally posted by @MayeulC in https://github.com/YunoHost-Apps/monitorix_ynh/issues/40#issuecomment-1318383205_

MayeulC commented 1 year ago

Still an issue: https://paste.yunohost.org/raw/hahofuxima

yunohost_version: 11.0.11
  YNH_APP_CURRENT_VERSION: 3.12.0~ynh2
  YNH_APP_MANIFEST_VERSION: 3.15.0~ynh2

Edit: same with yunohost 11.1

MayeulC commented 1 year ago

It failed restoring too: https://paste.yunohost.org/raw/piyupoqule

Looking at the log, //tmp/tmp.0CDrYHYynC/app.deb is obviously invalid, and only /tmp/tmp.0CDrYHYynC/app exists.

Edit: fixed the restore issue by manually editing the last line of that part of the restore script:

tempdir="$(mktemp -d)"
ynh_setup_source --dest_dir="$tempdir"
ynh_package_update
dpkg --force-confdef --force-confold -i /$tempdir/app.deb

to:

dpkg --force-confdef --force-confold -i $tempdir/app
MayeulC commented 1 year ago

SOLVED!

I only had the port: 8081 yunohost setting; the http_port setting was not set.

I suggest:

Can I delete the old "port" setting key?

Josue-T commented 7 months ago

Closing as theses settings was mainly reworked with packaging v2 and #55