YunoHost-Apps / kresus_ynh

Kresus (personal finance manager) for YunoHost
https://kresus.org/
GNU Affero General Public License v3.0
20 stars 20 forks source link

App restore not working : Kresus service fails to start #39

Closed SiM closed 4 years ago

SiM commented 4 years ago

I'm trying to restore a kresus backup (made on a raspberry) on another server (vps). (yunohost 3.6.5.3)

The "yunohost backup restore" tells me everything is ok and has been restored.

But I'm unable to enter the Kresus app, because the kresus service fails to start.

Here is the log :

systemd[1]: Started kresus. kresus[2697]: [2019-12-04T.426] [INFO] apply-config - Running Kresus with the following parameters: kresus[2697]: [2019-12-04T.434] [INFO] apply-config - NODE_ENV = production kresus[2697]: [2019-12-04T.435] [INFO] apply-config - KRESUS_LOGIN = user kresus[2697]: [2019-12-04T.435] [INFO] apply-config - KRESUS_DIR = /var/www/kresus/data/ kresus[2697]: [2019-12-04T.436] [INFO] apply-config - PORT = 9876 kresus[2697]: [2019-12-04T.436] [INFO] apply-config - HOST = 127.0.0.1 kresus[2697]: [2019-12-04T.436] [INFO] apply-config - KRESUS_PYTHON_EXEC = /var/www/kresus/venv/bin/python kresus[2697]: [2019-12-04T.437] [INFO] apply-config - KRESUS_URL_PREFIX = /banksim kresus[2697]: [2019-12-04T.437] [INFO] apply-config - KRESUS_SALT = (hidden) kresus[2697]: [2019-12-04T.438] [INFO] apply-config - KRESUS_WEBOOB_DIR = null kresus[2697]: [2019-12-04T.438] [INFO] apply-config - KRESUS_WEBOOB_SOURCES_LIST = null kresus[2697]: [2019-12-04T.438] [INFO] apply-config - KRESUS_EMAIL_TRANSPORT = null kresus[2697]: [2019-12-04T.439] [INFO] apply-config - KRESUS_EMAIL_SENDMAIL_BIN = null kresus[2697]: [2019-12-04T.439] [INFO] apply-config - KRESUS_EMAIL_FROM = null kresus[2697]: [2019-12-04T.440] [INFO] apply-config - KRESUS_EMAIL_HOST = null kresus[2697]: [2019-12-04T.440] [INFO] apply-config - KRESUS_EMAIL_PORT = null kresus[2697]: [2019-12-04T.440] [INFO] apply-config - KRESUS_EMAIL_USER = null kresus[2697]: [2019-12-04T.441] [INFO] apply-config - KRESUS_EMAIL_PASSWORD = null kresus[2697]: [2019-12-04T.441] [INFO] apply-config - KRESUS_EMAIL_FORCE_TLS = false kresus[2697]: [2019-12-04T.442] [INFO] apply-config - KRESUS_EMAIL_REJECT_UNAUTHORIZED_TLS = true kresus[2697]: [2019-12-04T.442] [INFO] apply-config - KRESUS_LOG_FILE = /var/www/kresus/data/kresus.log kresus[2697]: /var/www/kresus/node_modules/bindings/bindings.js:91 kresus[2697]: throw e kresus[2697]: ^ kresus[2697]: Error: /var/www/kresus/node_modules/leveldown/build/Release/leveldown.node: wrong ELF class: ELFCLASS32 kresus[2697]: at Object.Module._extensions..node (module.js:682:18) kresus[2697]: at Module.load (module.js:566:32) kresus[2697]: at tryModuleLoad (module.js:506:12) kresus[2697]: at Function.Module._load (module.js:498:3) kresus[2697]: at Module.require (module.js:597:17) kresus[2697]: at require (internal/module.js:11:18) systemd[1]: kresus.service: Main process exited, code=exited, status=1/FAILURE systemd[1]: kresus.service: Unit entered failed state. systemd[1]: kresus.service: Failed with result 'exit-code'. systemd[1]: kresus.service: Service hold-off time over, scheduling restart. systemd[1]: Stopped kresus. systemd[1]: kresus.service: Start request repeated too quickly. systemd[1]: Failed to start kresus. systemd[1]: kresus.service: Unit entered failed state. systemd[1]: kresus.service: Failed with result 'exit-code'.

Any help would be welcome :)

Jibec commented 4 years ago

The way I do backup is primitive. It's a huge copy of the folder, which includes compiled files. As you are changing architecture, I assume this may be the reason of the failure.

Would you mind trying to use the export/import feature of Kresus itself and see if this works? I have a workaround if you don't have your raspy anymore.

SiM commented 4 years ago

Hi Jibec, thanks for your answer.

I finally managed to access my raspberry, and I was able to use the export / import feature.

But I'm interested in knowing the workaround, can be usefull one day !

ZeHiro commented 4 years ago

This looks like a failure due to a change of node version, and the dependencies were not reinstalled with the new version of node.

Jibec commented 4 years ago

@SiM : I think all of kresus data are in /var/www/kresus/data, reinstalling the application and then copying the data folder from the old install may do the trick