YunoHost-Apps / wikijs_ynh

Modern and powerful wiki app package for YunoHost
https://wiki.js.org/
GNU Affero General Public License v3.0
18 stars 4 forks source link

Wikijs service don't want start : A system error occurred: uv_interface_addresses returned Unknown system error 97 #163

Closed GannonTdW closed 2 years ago

GannonTdW commented 2 years ago

Hello / Salut

I have update my yunohost and my app to the lastest version and I have a issue with Wikijs

J'ai mis à jour yunohost and mes applications à leurs dernière version avant hière et j'ai un problème avec l'application WikiJS (elle semble être la seul)

Describe the bug

Context

Logs

->  systemctl status wikijs
● wikijs.service - wikijs service
   Loaded: loaded (/etc/systemd/system/wikijs.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2022-01-30 21:24:42 CET; 27min ago
  Process: 4010 ExecStart=/opt/node_n/n/versions/node/16/bin/node /var/www/wikijs/server (code=exited, status=1/FAILURE)
 Main PID: 4010 (code=exited, status=1/FAILURE)

Jan 30 21:24:42 mydomaine.fr systemd[1]: wikijs.service: Service RestartSec=100ms expired, scheduling restart.
Jan 30 21:24:42 mydomaine.fr systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 5.
Jan 30 21:24:42 mydomaine.fr systemd[1]: Stopped wikijs service.
Jan 30 21:24:42 mydomaine.fr systemd[1]: wikijs.service: Start request repeated too quickly.
Jan 30 21:24:42 mydomaine.fr systemd[1]: wikijs.service: Failed with result 'exit-code'.
Jan 30 21:24:42 mydomaine.fr systemd[1]: Failed to start wikijs service.
->  yunohost service log wikijs 
journalctl: 
  - -- Logs begin at Sun 2022-01-30 21:02:31 CET, end at Sun 2022-01-30 21:53:31 CET. --
  - Jan 30 21:24:39 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 2.
  - Jan 30 21:24:39 systemd[1]: Stopped wikijs service.
  - Jan 30 21:24:39 systemd[1]: Started wikijs service.
  - Jan 30 21:24:39 node[3978]: Loading configuration from /var/www/wikijs/config.yml... OK
  - Jan 30 21:24:39 node[3978]: 2022-01-30T20:24:39.515Z [MASTER] info: =======================================
  - Jan 30 21:24:39 node[3978]: 2022-01-30T20:24:39.516Z [MASTER] info: = Wiki.js 2.5.272 =====================
  - Jan 30 21:24:39 node[3978]: 2022-01-30T20:24:39.516Z [MASTER] info: =======================================
  - Jan 30 21:24:39 node[3978]: 2022-01-30T20:24:39.516Z [MASTER] info: Initializing...
  - Jan 30 21:24:39 node[3978]: 2022-01-30T20:24:39.798Z [MASTER] info: Using database driver pg for postgres [ OK ]
  - Jan 30 21:24:39 node[3978]: 2022-01-30T20:24:39.801Z [MASTER] info: Connecting to database...
  - Jan 30 21:24:39 node[3978]: 2022-01-30T20:24:39.816Z [MASTER] info: Database Connection Successful [ OK ]
  - Jan 30 21:24:40 node[3978]: 2022-01-30T20:24:40.062Z [MASTER] error: A system error occurred: uv_interface_addresses returned Unknown system error 97 (Unknown system error 97)
  - Jan 30 21:24:40 systemd[1]: wikijs.service: Main process exited, code=exited, status=1/FAILURE
  - Jan 30 21:24:40 systemd[1]: wikijs.service: Failed with result 'exit-code'.
  - Jan 30 21:24:40 systemd[1]: wikijs.service: Service RestartSec=100ms expired, scheduling restart.
  - Jan 30 21:24:40 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 3.
  - Jan 30 21:24:40 systemd[1]: Stopped wikijs service.
  - Jan 30 21:24:40 systemd[1]: Started wikijs service.
  - Jan 30 21:24:40 node[3996]: Loading configuration from /var/www/wikijs/config.yml... OK
  - Jan 30 21:24:40 node[3996]: 2022-01-30T20:24:40.504Z [MASTER] info: =======================================
  - Jan 30 21:24:40 node[3996]: 2022-01-30T20:24:40.504Z [MASTER] info: = Wiki.js 2.5.272 =====================
  - Jan 30 21:24:40 node[3996]: 2022-01-30T20:24:40.504Z [MASTER] info: =======================================
  - Jan 30 21:24:40 node[3996]: 2022-01-30T20:24:40.504Z [MASTER] info: Initializing...
  - Jan 30 21:24:40 node[3996]: 2022-01-30T20:24:40.786Z [MASTER] info: Using database driver pg for postgres [ OK ]
  - Jan 30 21:24:40 node[3996]: 2022-01-30T20:24:40.789Z [MASTER] info: Connecting to database...
  - Jan 30 21:24:40 node[3996]: 2022-01-30T20:24:40.803Z [MASTER] info: Database Connection Successful [ OK ]
  - Jan 30 21:24:41 node[3996]: 2022-01-30T20:24:41.045Z [MASTER] error: A system error occurred: uv_interface_addresses returned Unknown system error 97 (Unknown system error 97)
  - Jan 30 21:24:41 systemd[1]: wikijs.service: Main process exited, code=exited, status=1/FAILURE
  - Jan 30 21:24:41 systemd[1]: wikijs.service: Failed with result 'exit-code'.
  - Jan 30 21:24:41 systemd[1]: wikijs.service: Service RestartSec=100ms expired, scheduling restart.
  - Jan 30 21:24:41 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 4.
  - Jan 30 21:24:41 systemd[1]: Stopped wikijs service.
  - Jan 30 21:24:41 systemd[1]: Started wikijs service.
  - Jan 30 21:24:41 node[4010]: Loading configuration from /var/www/wikijs/config.yml... OK
  - Jan 30 21:24:41 node[4010]: 2022-01-30T20:24:41.507Z [MASTER] info: =======================================
  - Jan 30 21:24:41 node[4010]: 2022-01-30T20:24:41.507Z [MASTER] info: = Wiki.js 2.5.272 =====================
  - Jan 30 21:24:41 node[4010]: 2022-01-30T20:24:41.508Z [MASTER] info: =======================================
  - Jan 30 21:24:41 node[4010]: 2022-01-30T20:24:41.508Z [MASTER] info: Initializing...
  - Jan 30 21:24:41 node[4010]: 2022-01-30T20:24:41.789Z [MASTER] info: Using database driver pg for postgres [ OK ]
  - Jan 30 21:24:41 node[4010]: 2022-01-30T20:24:41.792Z [MASTER] info: Connecting to database...
  - Jan 30 21:24:41 node[4010]: 2022-01-30T20:24:41.806Z [MASTER] info: Database Connection Successful [ OK ]
  - Jan 30 21:24:42 node[4010]: 2022-01-30T20:24:42.054Z [MASTER] error: A system error occurred: uv_interface_addresses returned Unknown system error 97 (Unknown system error 97)
  - Jan 30 21:24:42 systemd[1]: wikijs.service: Main process exited, code=exited, status=1/FAILURE
  - Jan 30 21:24:42 systemd[1]: wikijs.service: Failed with result 'exit-code'.
  - Jan 30 21:24:42 systemd[1]: wikijs.service: Service RestartSec=100ms expired, scheduling restart.
  - Jan 30 21:24:42 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 5.
  - Jan 30 21:24:42 systemd[1]: Stopped wikijs service.
  - Jan 30 21:24:42 systemd[1]: wikijs.service: Start request repeated too quickly.
  - Jan 30 21:24:42 systemd[1]: wikijs.service: Failed with result 'exit-code'.
  - Jan 30 21:24:42 systemd[1]: Failed to start wikijs service.

Have you an idea ? Vous avez une idéée d'où cela peut venir et dans quel log je peux fouinner ?

carb0n commented 2 years ago

Bonjour, Je rencontre exactement le même problème. La seule solution : revenir à la sauvegarde.

GannonTdW commented 2 years ago

@carb0n Effectivement que cela soit dans les log ou en recherche internet, je trouve rien de bien concluant Donc j’ai restauré une sauvegarde (sans problème).

Merci Je ferme l’issue.

carb0n commented 2 years ago

Pourquoi fermer l'issue ? Le problème est entier puisque nous n'arrivons pas à réaliser l'upgrade...

GannonTdW commented 2 years ago

Pourquoi fermer l'issue ?

Bonne question, manque de café sûrement.

@yalh76 thx Par contre pour la résolution je vois pas

yalh76 commented 2 years ago

Have you tryed to upgrade to last 2.5.274~ynh1 ?

carb0n commented 2 years ago

Bonjour,

Même problème.

$ sudo yunohost tools upgrade apps
Info: Now upgrading wikijs...
Info: [+...................] > Loading installation settings...
Info: [#+..................] > Checking version...
Info: [##+.................] > Backing up the app before upgrading (may take a while)...
Info: [###++...............] > Stopping a systemd service...
Info: The service wikijs has correctly executed the action stop.
Info: [#####+..............] > Ensuring downward compatibility...
Info: '/etc/apt/sources.list.d/yarn.list' wasn't deleted because it doesn't exist.
Info: '/var/log/wikijs/' wasn't deleted because it doesn't exist.
Warning: ERROR:  role "wikijs" already exists
Warning: NOTICE:  extension "pg_trgm" already exists, skipping
Info: [######+.............] > Making sure dedicated system user exists...
Info: [#######+............] > Upgrading source files...
Info: [########++..........] > Upgrading NGINX web server configuration...
Info: [##########+.........] > Upgrading dependencies...
Warning: dpkg: warning: version 'v8.0.0' has bad syntax: version number does not start with digit
Info: [###########+........] > Updating a configuration file...
Info: [############+.......] > Upgrading systemd configuration...
Info: [#############++.....] > Integrating service in YunoHost...
Info: [###############+....] > Starting a systemd service...
Warning: (this may take some time)
Warning: The service wikijs didn't fully executed the action start before the timeout.
Warning: Please find here an extract of the end of the log of the service wikijs:
Warning: Feb 16 18:29:11 node[12332]: 2022-02-16T17:29:11.180Z [MASTER] info: =======================================
Warning: Feb 16 18:29:11 node[12332]: 2022-02-16T17:29:11.181Z [MASTER] info: Initializing...
Warning: Feb 16 18:29:11 node[12332]: 2022-02-16T17:29:11.938Z [MASTER] info: Using database driver pg for postgres [ OK ]
Warning: Feb 16 18:29:11 node[12332]: 2022-02-16T17:29:11.943Z [MASTER] info: Connecting to database...
Warning: Feb 16 18:29:11 node[12332]: 2022-02-16T17:29:11.969Z [MASTER] info: Database Connection Successful [ OK ]
Warning: Feb 16 18:29:12 node[12332]: 2022-02-16T17:29:12.685Z [MASTER] error: A system error occurred: uv_interface_addresses returned Unknown system error 97 (Unknown system error 97)
Warning: Feb 16 18:29:12 systemd[1]: wikijs.service: Main process exited, code=exited, status=1/FAILURE
Warning: Feb 16 18:29:12 systemd[1]: wikijs.service: Failed with result 'exit-code'.
Warning: Feb 16 18:29:13 systemd[1]: wikijs.service: Service RestartSec=100ms expired, scheduling restart.
Warning: Feb 16 18:29:13 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 138.
Warning: Feb 16 18:29:13 systemd[1]: Stopped wikijs service.
Warning: Feb 16 18:29:13 systemd[1]: Started wikijs service.
Warning: Feb 16 18:29:13 node[12350]: Loading configuration from /var/www/wikijs/config.yml... OK
Warning: Feb 16 18:29:13 node[12350]: 2022-02-16T17:29:13.489Z [MASTER] info: =======================================
Warning: Feb 16 18:29:13 node[12350]: 2022-02-16T17:29:13.491Z [MASTER] info: = Wiki.js 2.5.274 =====================
Warning: Feb 16 18:29:13 node[12350]: 2022-02-16T17:29:13.491Z [MASTER] info: =======================================
Warning: Feb 16 18:29:13 node[12350]: 2022-02-16T17:29:13.491Z [MASTER] info: Initializing...
Warning: Feb 16 18:29:14 node[12350]: 2022-02-16T17:29:14.278Z [MASTER] info: Using database driver pg for postgres [ OK ]
Warning: Feb 16 18:29:14 node[12350]: 2022-02-16T17:29:14.283Z [MASTER] info: Connecting to database...
Warning: Feb 16 18:29:14 node[12350]: 2022-02-16T17:29:14.309Z [MASTER] info: Database Connection Successful [ OK ]
Info: [################+...] > Reloading NGINX web server...
Info: [#################+..] > Sending ReadMe to admin...
Info: [##################++] > Upgrade of wikijs completed

Syslog (en boucle) :

systemd[1]: Started wikijs service.
node[14425]: Loading configuration from /var/www/wikijs/config.yml... OK
jeanmy node[14425]: 2022-02-16T17:31:28.948Z [MASTER] #033[32minfo#033[39m: =======================================
node[14425]: 2022-02-16T17:31:28.950Z [MASTER] #033[32minfo#033[39m: = Wiki.js 2.5.274 =====================
node[14425]: 2022-02-16T17:31:28.951Z [MASTER] #033[32minfo#033[39m: =======================================
node[14425]: 2022-02-16T17:31:28.951Z [MASTER] #033[32minfo#033[39m: Initializing...
php7.3[1011]: [17:31:29/1011] [MASTER] active jobs: 0, next spawn at 60 sec.
node[14425]: 2022-02-16T17:31:29.743Z [MASTER] #033[32minfo#033[39m: Using database driver pg for postgres [ OK ]
node[14425]: 2022-02-16T17:31:29.749Z [MASTER] #033[32minfo#033[39m: Connecting to database...
node[14425]: 2022-02-16T17:31:29.778Z [MASTER] #033[32minfo#033[39m: Database Connection Successful [ OK ]
node[14425]: 2022-02-16T17:31:30.508Z [MASTER] #033[31merror#033[39m: A system error occurred: uv_interface_addresses returned Unknown system error 97 (Unknown system error 97)
systemd[1]: wikijs.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: wikijs.service: Failed with result 'exit-code'.
systemd[1]: wikijs.service: Service RestartSec=100ms expired, scheduling restart.
systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 201.
systemd[1]: Stopped wikijs service.`

J'ai dû réinjecter la sauvegarde.

yalh76 commented 2 years ago

well ... i've tested upgrade:

apps:
  current_version: 2.5.219~ynh2
  id: wikijs
  label: Wiki.js
  new_version: 2.5.274~ynh1

and no problem :/

from which version do you try to upgrade

oiseauroch commented 2 years ago

as said in my post on the forum, i get the same error and fixed it by commenting the line : 

RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6

in the systemd service.

carb0n commented 2 years ago

from which version do you try to upgrade

La version qui fonctionne actuellement sur mon serveur est : 2.5.219~ynh2

Je vais attendre que la modification proposée par @Tagadda soit intégrée avant de faire la mise à jour.

yalh76 commented 2 years ago

et bien un énorme merci à @Tagadda pour #165, tu fais un boulot énorme et toujours là pour enlever une épine du pied ^^

stilobique commented 2 years ago

Un grand merci pour ce support !! @Tagadda et @yalh76 ! ❤️

GannonTdW commented 2 years ago

@oiseauroch Hum capte pas ... la modification de Tagadda à été incorporée dans la branche dev non ? cf https://github.com/YunoHost-Apps/wikijs_ynh/pull/165

Car quand je mets à jours l'app, même en me basant sur la branche dev, sa modification ne l'est toujours pas :(

admin@yunohost:~$ sudo yunohost app upgrade
Info: Now upgrading wikijs...
Info: [+...................] > Loading installation settings...
Info: [#+..................] > Checking version...
Info: [##+.................] > Backing up the app before upgrading (may take a while)...
Info: [###++...............] > Stopping a systemd service...
Info: The service wikijs has correctly executed the action stop.
Info: [#####+..............] > Ensuring downward compatibility...
Info: '/etc/apt/sources.list.d/yarn.list' wasn't deleted because it doesn't exist.
Info: '/var/log/wikijs/' wasn't deleted because it doesn't exist.
Warning: ERROR:  role "wikijs" already exists
Warning: NOTICE:  extension "pg_trgm" already exists, skipping
Info: [######+.............] > Making sure dedicated system user exists...
Info: [#######+............] > Upgrading source files...
Info: [########++..........] > Upgrading NGINX web server configuration...
Info: [##########+.........] > Upgrading dependencies...
Warning: dpkg: warning: version 'v8.0.0' has bad syntax: version number does not start with digit
Info: [###########+........] > Updating a configuration file...
Info: [############+.......] > Upgrading systemd configuration...
Info: [#############++.....] > Integrating service in YunoHost...
Info: [###############+....] > Starting a systemd service...
Warning: (this may take some time)
Warning: The service wikijs didn't fully executed the action start before the timeout.
Warning: Please find here an extract of the end of the log of the service wikijs:
Warning: Feb 18 15:31:33 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 4.
Warning: Feb 18 15:31:33 systemd[1]: Stopped wikijs service.
Warning: Feb 18 15:31:33 systemd[1]: Started wikijs service.
Warning: Feb 18 15:31:33 node[15725]: Loading configuration from /var/www/wikijs/config.yml... OK
Warning: Feb 18 15:31:33 node[15725]: 2022-02-18T14:31:33.631Z [MASTER] info: =======================================
Warning: Feb 18 15:31:33 node[15725]: 2022-02-18T14:31:33.633Z [MASTER] info: = Wiki.js 2.5.274 =====================
Warning: Feb 18 15:31:33 node[15725]: 2022-02-18T14:31:33.633Z [MASTER] info: =======================================
Warning: Feb 18 15:31:33 node[15725]: 2022-02-18T14:31:33.633Z [MASTER] info: Initializing...
Warning: Feb 18 15:31:33 node[15725]: 2022-02-18T14:31:33.984Z [MASTER] info: Using database driver pg for postgres [ OK ]
Warning: Feb 18 15:31:33 node[15725]: 2022-02-18T14:31:33.989Z [MASTER] info: Connecting to database...
Warning: Feb 18 15:31:34 node[15725]: 2022-02-18T14:31:34.009Z [MASTER] info: Database Connection Successful [ OK ]
Warning: Feb 18 15:31:34 node[15725]: 2022-02-18T14:31:34.362Z [MASTER] error: A system error occurred: uv_interface_addresses returned Unknown system error 97 (Unknown system error 97)
Warning: Feb 18 15:31:34 systemd[1]: wikijs.service: Main process exited, code=exited, status=1/FAILURE
Warning: Feb 18 15:31:34 systemd[1]: wikijs.service: Failed with result 'exit-code'.
Warning: Feb 18 15:31:34 systemd[1]: wikijs.service: Service RestartSec=100ms expired, scheduling restart.
Warning: Feb 18 15:31:34 systemd[1]: wikijs.service: Scheduled restart job, restart counter is at 5.
Warning: Feb 18 15:31:34 systemd[1]: Stopped wikijs service.
Warning: Feb 18 15:31:34 systemd[1]: wikijs.service: Start request repeated too quickly.
Warning: Feb 18 15:31:34 systemd[1]: wikijs.service: Failed with result 'exit-code'.
Warning: Feb 18 15:31:34 systemd[1]: Failed to start wikijs service.
Info: [################+...] > Reloading NGINX web server...
Info: [#################+..] > Sending ReadMe to admin...
Info: [##################++] > Upgrade of wikijs completed
Success! wikijs upgraded
admin@yunohost:~$ sudo cat /etc/systemd/system/wikijs.service | grep RestrictAddressFamilies
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
admin@yunohost:~$ sudo yunohost app upgrade wikijs -u https://github.com/YunoHost-Apps/wikijs_ynh/tree/testing --debug
46   DEBUG initializing base actions map parser for cli
46   DEBUG loading actions map namespace 'yunohost'
47   DEBUG building parser...
52   DEBUG building parser took 0.005s
53   DEBUG acquiring lock...
57   DEBUG lock has been acquired
62   DEBUG loading python module yunohost.app took 0.005s
62   DEBUG processing action [1643.1]: yunohost.app.upgrade with args={'app': ['wikijs'], 'url': 'https://github.com/YunoHost-Apps/wikijs_ynh/tree/testing', 'file': None, 'force': False, 'no_safety_backup': False}
68   INFO Now upgrading wikijs...
88   DEBUG initializing ldap interface
108  DEBUG Downloading...
745  DEBUG Done
956  SUCCESS wikijs is already up-to-date
1047 DEBUG The permission database has been resynchronized
1154 DEBUG SSOwat configuration regenerated
1157 SUCCESS Upgrade complete
1158 DEBUG action [1643.1] executed in 1.096s
1158 DEBUG lock has been released
admin@yunohost:~$ sudo cat /etc/systemd/system/wikijs.service | grep RestrictAddressFamilies
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6

Mais quand je fais la modification à la main, ca fonctionne; merci / thx pour la solution @Tagadda

yalh76 commented 2 years ago

@oiseauroch Hum capte pas ... la modification de Tagadda à été incorporée dans la branche dev non ? cf #165

euh non ... pas encore ...