[Résolu] "Une erreur est survenue lors de l’opération LDAP" suite upgrade 7.3

Bonjour!

Tout d’abord, voici ma config:

**Matériel: APU2
**Versions:
yunohost 3.7.0.10 (stable)
yunohost-admin 3.7.0.3 (stable)
moulinette 3.7.0.2 (stable)
ssowat 3.7.0.3 (stable)

J’ai accès à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Et voici ce qui m’amène:

Dans l’administration>Utilisateurs, un clic sur la nouvelle option de gestion de permission me renvoie “Une erreur est survenue lors de l’opération LDAP”.

Sur l’interface utilisateur, certaines applications (LSTU, Jirafeau, Shell in a box, Tiny tiny RSS, Pilea, Roundcube, Transmission, Zerobin) ne se lancent pas. D’autres sont accessibles: Nextcloud, Opensondage, Wallabag…

Bref, j’ai l’impression d’avoir cassé quelque chose mais je ne sais pas franchement comment le réparer…

Hello,

As tu les logs de la dernière mise à jours ?

Peut tu vérifier aussi que slapd fonctionne bien avec la commande systemctl status slapd

Voilà ce que me donne la commande systemctl status slapd:

root@xxxxxx:/home/admin# systemctl status slapd
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
Loaded: loaded (/etc/init.d/slapd; generated; vendor preset: enabled)
Active: active (running) since Fri 2020-03-27 22:13:17 CET; 1h 13min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 4 (limit: 4915)
CGroup: /system.slice/slapd.service
└─13142 /usr/sbin/slapd -h ldap://xxx.x.x.x:xxx/ ldaps:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d

Mar 27 22:13:16 xxxxxx.org systemd[1]: Starting LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)…
Mar 27 22:13:16 xxxxxx.org slapd[13140]: @(#) $OpenLDAP: slapd (Aug 10 2019 19:17:00) $
Debian OpenLDAP Maintainers pkg-openldap-devel@lists.alioth.debian.org
Mar 27 22:13:17 xxxxxx.org slapd[13142]: slapd starting
Mar 27 22:13:17 xxxxxx.org slapd[13135]: Starting OpenLDAP: slapd.
Mar 27 22:13:17 xxxxxx.org systemd[1]: Started LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).
Mar 27 22:13:28 xxxxxx.org slapd[13142]: slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.666.5.16
Mar 27 22:23:07 xxxxxx.org slapd[13142]: slap_global_control: unrecognized control: 1.3.6.1.4.1.42.2.27.8.5.1
Mar 27 22:38:10 xxxxxx.org slapd[13142]: slap_global_control: unrecognized control: 1.3.6.1.4.1.42.2.27.8.5.1
Mar 27 22:38:21 xxxxxx.org slapd[13142]: slap_global_control: unrecognized control: 1.3.6.1.4.1.42.2.27.8.5.1

Et voici le log de l’update:

Configuration file ‘/etc/dpkg/origins/yunohost’, does not exist on system. Installing new config file as you requested. Regenerating configuration, this might take a while… e[32me[1mSuccess! e[mConfiguration for category ‘metronome’ updated e[33me[1mWarning: e[mThe configuration file ‘/etc/nginx/conf.d/yunohost_panel.conf.inc’ has been manually modified and will not be updated e[32me[1mSuccess! e[mConfiguration for category ‘postfix’ updated e[32me[1mSuccess! e[mConfiguration for category ‘dnsmasq’ updated e[32me[1mSuccess! e[mConfiguration for category ‘dovecot’ updated e[32me[1mSuccess! e[mConfiguration for category ‘slapd’ updated Launching migrations… e[36me[1mInfo: e[mRunning migration 0011_setup_group_permission… e[36me[1mInfo: e[mCreating a backup of LDAP database and apps settings prior to the actual migration. e[36me[1mInfo: e[mUpdating LDAP schema… e[36me[1mInfo: e[mUpdating LDAP database… e[36me[1mInfo: e[mCreating a group for each user… e[33me[1mWarning: e[mCould not migrate… trying to roll back the system. e[36me[1mInfo: e[mSystem rolled back. e[31me[1mError: e[mMigration 0011_setup_group_permission did not complete, aborting. Error: Group xxxxxxxxxx axxxxxlready exists in the system groups e[36me[1mInfo: e[mThe operation ‘Migrate forward’ could not be completed. Please share the full log of this operation using the command ‘yunohost log display 20200327-103006-tools_migrations_migrate_forward --share’ to get help e[36me[1mInfo: e[mRunning migration 0012_postgresql_password_to_md5_authentication… e[32me[1mSuccess! e[mMigration 0012_postgresql_password_to_md5_authentication completed Restarting YunoHost firewall… (Reading database … (Reading database … 5% (Reading database … 10% (Reading database … 15% (Reading database … 20% (Reading database … 25% (Reading database … 30% (Reading database … 35% (Reading database … 40% (Reading database … 45% (Reading database … 50% (Reading database … 55% (Reading database … 60% (Reading database … 65% (Reading database … 70% (Reading database … 75% (Reading database … 80% (Reading database … 85% (Reading database … 90% (Reading database … 95% (Reading database … 100% (Reading database … 65454 files and directories currently installed.) Preparing to unpack …/yunohost-admin_3.7.0.2_all.deb … Unpacking yunohost-admin (3.7.0.2) over (3.6.5.1) … Processing triggers for systemd (232-25+deb9u12) … Setting up yunohost-admin (3.7.0.2) … Processing triggers for man-db (2.7.6.1-2) … Done!

J’ai aussi tenté de mettre à jour Nextcloud suite à la mise à jour de yunohost vers 7.3. Sans succès:

2020-03-27 17:25:34,091: WARNING - Traceback (most recent call last):
2020-03-27 17:25:34,093: WARNING - File “/usr/lib/python2.7/dist-packages/moulinette/authenticators/ldap.py”, line 142, in search
2020-03-27 17:25:34,094: WARNING - result = self.con.search_s(base, ldap.SCOPE_SUBTREE, filter, attrs)
2020-03-27 17:25:34,096: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 597, in search_s
2020-03-27 17:25:34,097: WARNING - return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
2020-03-27 17:25:34,099: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 993, in search_ext_s
2020-03-27 17:25:34,100: WARNING - return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
2020-03-27 17:25:34,102: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 931, in _apply_method_s
2020-03-27 17:25:34,103: WARNING - return func(self,*args,**kwargs)
2020-03-27 17:25:34,105: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 591, in search_ext_s
2020-03-27 17:25:34,106: WARNING - return self.result(msgid,all=1,timeout=timeout)[1]
2020-03-27 17:25:34,108: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 503, in result
2020-03-27 17:25:34,109: WARNING - resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
2020-03-27 17:25:34,110: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 507, in result2
2020-03-27 17:25:34,112: WARNING - resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
2020-03-27 17:25:34,113: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 514, in result3
2020-03-27 17:25:34,115: WARNING - resp_ctrl_classes=resp_ctrl_classes
2020-03-27 17:25:34,116: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 521, in result4
2020-03-27 17:25:34,118: WARNING - ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
2020-03-27 17:25:34,119: WARNING - File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 106, in _ldap_call
2020-03-27 17:25:34,120: WARNING - result = func(*args,**kwargs)
2020-03-27 17:25:34,122: WARNING - NO_SUCH_OBJECT: {‘matched’: ‘dc=yunohost,dc=org’, ‘desc’: ‘No such object’}
2020-03-27 17:25:34,324: DEBUG - 24517 action [23684.1] executed in 23.355s
2020-03-27 17:25:34,325: WARNING - 24513 Could not back up the app ‘nextcloud’
2020-03-27 17:25:34,328: WARNING - Traceback (most recent call last):
2020-03-27 17:25:34,329: WARNING - File “/usr/lib/moulinette/yunohost/backup.py”, line 709, in _collect_app_files
2020-03-27 17:25:34,331: WARNING - permissions = user_permission_list(full=True)[“permissions”]
2020-03-27 17:25:34,333: WARNING - File “/usr/lib/moulinette/yunohost/permission.py”, line 59, in user_permission_list
2020-03-27 17:25:34,335: WARNING - [“cn”, ‘groupPermission’, ‘inheritPermission’, ‘URL’])
2020-03-27 17:25:34,337: WARNING - File “/usr/lib/python2.7/dist-packages/moulinette/authenticators/ldap.py”, line 146, in search
2020-03-27 17:25:34,339: WARNING - raise MoulinetteError(‘ldap_operation_error’)
2020-03-27 17:25:34,340: WARNING - MoulinetteError: An error occurred during LDAP operation
2020-03-27 17:25:34,342: WARNING - 24518 Nothing to save
2020-03-27 17:25:34,445: DEBUG - + ‘[’ 1 -eq 0 ‘]’
2020-03-27 17:25:34,449: WARNING - Backup failed, the upgrade process was aborted.
2020-03-27 17:25:34,451: DEBUG - + ynh_die ‘–message=Backup failed, the upgrade process was aborted.’
2020-03-27 17:25:34,452: DEBUG - + local legacy_args=mc
2020-03-27 17:25:34,453: DEBUG - + args_array=([m]=message= [c]=ret_code=)
2020-03-27 17:25:34,453: DEBUG - + declare -Ar args_array
2020-03-27 17:25:34,454: DEBUG - + local message
2020-03-27 17:25:34,455: DEBUG - + local ret_code
2020-03-27 17:25:34,456: DEBUG - + ynh_handle_getopts_args ‘–message=Backup failed, the upgrade process was aborted.’
2020-03-27 17:25:34,456: DEBUG - + set +x
2020-03-27 17:25:34,457: DEBUG - + echo ‘Backup failed, the upgrade process was aborted.’
2020-03-27 17:25:34,457: DEBUG - + exit 1
2020-03-27 17:25:34,614: ERROR - Impossible de mettre à jour nextcloud : Une erreur s’est produite durant l’exécution du script de mise à niveau de l’application
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/moulinette/interfaces/api.py”, line 301, in wrapper
curr_v = params[k]
KeyError: ‘apps’

Excuse-moi, il y a encore ce log avec pour titre

Chemin

/var/log/yunohost/categories/operation/20200327-103006-tools_migrations_migrate_forward.log

Début

27 mars 2020 à 11:30

Fin

27 mars 2020 à 11:30

Erreur

Ce journal a fini avec l’erreur : Migration 0011_setup_group_permission did not complete, aborting. Error: Group xxxxxxxx already exists in the system groups

Le contenu de ce log est le suivant:

2020-03-27 11:30:08,981: DEBUG - processing pending conf ‘/home/yunohost.conf/pending/slapd/etc/default/slapd’ to system conf ‘/etc/default/slapd’

2020-03-27 11:30:08,982: DEBUG - > system conf is already up-to-date

2020-03-27 11:30:08,982: DEBUG - processing pending conf ‘/home/yunohost.conf/pending/slapd/etc/ldap/schema/sudo.schema’ to system conf ‘/etc/ldap/schema/sudo.schema’

2020-03-27 11:30:08,983: DEBUG - > system conf is already up-to-date

2020-03-27 11:30:08,984: DEBUG - processing pending conf ‘/home/yunohost.conf/pending/slapd/etc/ldap/ldap.conf’ to system conf ‘/etc/ldap/ldap.conf’

2020-03-27 11:30:08,985: DEBUG - > system conf is already up-to-date

2020-03-27 11:30:08,986: DEBUG - The configuration is already up-to-date for category ‘slapd’

2020-03-27 11:30:08,988: DEBUG - No custom hook for action ‘conf_regen’ in /etc/yunohost/hooks.d/

2020-03-27 11:30:08,993: DEBUG - Executing command ‘sh -c YNH_INTERFACE=cli YNH_CWD=/usr/share/yunohost/hooks/conf_regen YNH_STDINFO=/tmp/tmpZemY9r/stdinfo YNH_STDRETURN=/tmp/tmpVfbQ2E/stdreturn BASH_XTRACEFD=7 /bin/bash -x “./06-slapd” post 1 0 ‘’ 7>&1’…

2020-03-27 11:30:08,994: DEBUG - About to run the command ‘[‘sh’, ‘-c’, ‘YNH_INTERFACE=cli YNH_CWD=/usr/share/yunohost/hooks/conf_regen YNH_STDINFO=/tmp/tmpZemY9r/stdinfo YNH_STDRETURN=/tmp/tmpVfbQ2E/stdreturn BASH_XTRACEFD=7 /bin/bash -x “./06-slapd” post 1 0 ‘’ 7>&1’]’

2020-03-27 11:30:09,051: DEBUG - + set -e

2020-03-27 11:30:09,054: DEBUG - + tmp_backup_dir_file=/tmp/slapd-backup-dir.txt

2020-03-27 11:30:09,056: DEBUG - + FORCE=1

2020-03-27 11:30:09,058: DEBUG - + DRY_RUN=0

2020-03-27 11:30:09,059: DEBUG - + case “$1” in

2020-03-27 11:30:09,060: DEBUG - + do_post_regen

2020-03-27 11:30:09,061: DEBUG - + regen_conf_files=

2020-03-27 11:30:09,062: DEBUG - + mkdir -p /etc/ldap/slapd.d

2020-03-27 11:30:09,063: DEBUG - + echo ‘Making sure we have the right permissions needed …’

2020-03-27 11:30:09,064: DEBUG - Making sure we have the right permissions needed …

2020-03-27 11:30:09,065: DEBUG - + usermod -aG ssl-cert openldap

2020-03-27 11:30:09,066: DEBUG - + chown root:openldap /etc/ldap/slapd.conf

2020-03-27 11:30:09,169: DEBUG - + chown -R openldap:openldap /etc/ldap/schema/

2020-03-27 11:30:09,170: DEBUG - + chown -R openldap:openldap /etc/ldap/slapd.d/

2020-03-27 11:30:09,172: DEBUG - + chown -R root:ssl-cert /etc/yunohost/certs/yunohost.org/

2020-03-27 11:30:09,173: DEBUG - + chmod o-rwx /etc/yunohost/certs/yunohost.org/

2020-03-27 11:30:09,174: DEBUG - + ‘[’ -z ‘’ ‘]’

2020-03-27 11:30:09,175: DEBUG - + exit 0

2020-03-27 11:30:09,235: DEBUG - To view the log of the operation ‘Regenerate system configurations ‘slapd’’, use the command ‘yunohost log display 20200327-103008-regen_conf-slapd’

2020-03-27 11:30:09,245: INFO - Updating LDAP database…

2020-03-27 11:30:09,341: DEBUG - ou=permission does not exist, no need to delete it

2020-03-27 11:30:09,343: DEBUG - Deleting old object cn=sftpusers,ou=groups …

2020-03-27 11:30:09,345: DEBUG - Deleting old object cn=admins,ou=groups …

2020-03-27 11:30:09,348: DEBUG - Deleting old object ou=groups …

2020-03-27 11:30:09,356: INFO - Creating a group for each user…

2020-03-27 11:30:09,370: WARNING - Could not migrate… trying to roll back the system.

2020-03-27 11:30:10,788: INFO - System rolled back.

2020-03-27 11:30:10,790: ERROR - Migration 0011_setup_group_permission did not complete, aborting. Error: Group xxxxxxxxxx already exists in the system groups

Traceback (most recent call last):

File “/usr/lib/moulinette/yunohost/tools.py”, line 1128, in tools_migrations_migrate

migration.run()

File “/usr/lib/moulinette/yunohost/data_migrations/0011_setup_group_permission.py”, line 158, in run

self.migrate_LDAP_db()

File “/usr/lib/moulinette/yunohost/data_migrations/0011_setup_group_permission.py”, line 93, in migrate_LDAP_db

user_group_create(username, gid=user_info[‘uidNumber’][0], primary_group=True, sync_perm=False)

File “/usr/lib/moulinette/yunohost/log.py”, line 287, in func_wrapper

result = func(*args, **kwargs)

File “/usr/lib/moulinette/yunohost/user.py”, line 579, in user_group_create

raise YunohostError(‘group_already_exist_on_system’, group=groupname)

YunohostError: Group xxxxxxxxxx already exists in the system groups

Est-ce que tu peux relancer une mise à jour du systeme et voir si ca resouds le probleme ?

Oui j’avais déjà tenté mais ce matin j’ai un résultat différent, le voici:

root@azerty:/home/admin# apt update && apt dist-upgrade

Hit:1 Index of /debian-security stretch/updates InRelease

Ign:2 Index of /debian/ stretch InRelease

Get:3 Index of /debian/ stretch-updates InRelease [91.0 kB]

Hit:4 Index of /debian/ stretch InRelease

Hit:5 Index of /debian/ stretch Release

Hit:6 Index of /php/ stretch InRelease

Fetched 91.0 kB in 2s (39.9 kB/s)

Reading package lists… Done

Building dependency tree

Reading state information… Done

1 package can be upgraded. Run ‘apt list --upgradable’ to see it.

Reading package lists… Done

Building dependency tree

Reading state information… Done

Calculating upgrade… Done

The following packages will be upgraded:

yunohost

1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Need to get 801 kB of archives.

After this operation, 2,048 B disk space will be freed.

Do you want to continue? [Y/n] Y

Get:1 Index of /debian/ stretch/stable amd64 yunohost all 3.7.0.11 [801 kB]

Fetched 801 kB in 0s (6,261 kB/s)

Reading changelogs… Done

(Reading database … 65432 files and directories currently installed.)

Preparing to unpack …/yunohost_3.7.0.11_all.deb …

Unpacking yunohost (3.7.0.11) over (3.7.0.10) …

Setting up yunohost (3.7.0.11) …

Regenerating configuration, this might take a while…

Warning: The configuration file ‘/etc/nginx/conf.d/yunohost_panel.conf.inc’ has been manually modified and will not be updated

Success! Configuration for category ‘dnsmasq’ updated

Launching migrations…

Info: Running migration 0011_setup_group_permission…

Info: Creating a backup of LDAP database and apps settings prior to the actual migration.

Info: Updating LDAP schema…

Info: Updating LDAP database…

Info: Creating a group for each user…

Warning: Could not migrate… trying to roll back the system.

Info: System rolled back.

Error: Migration 0011_setup_group_permission did not complete, aborting. Error: _log() got an unexpected keyword argument ‘group’

Info: The operation ‘Run migrations’ could not be completed. Please share the full log of this operation using the command ‘yunohost log display 20200328-080112-tools_migrations_migrate_forward --share’ to get help

Restarting YunoHost firewall…

Processing triggers for systemd (232-25+deb9u12) …

Processing triggers for man-db (2.7.6.1-2) …

Du coup, ça ne résouds rien mais on voit qu’il y a un soucis avec cette mise à jour de la base de données LDAP…

[edit] Je viens de refaire la commande à l’instant et voilà le retour…

root@azerty:/home/admin# apt update && apt dist-upgrade
Ign:1 Index of /debian/ stretch InRelease
Hit:2 Index of /debian/ stretch InRelease
Hit:3 Index of /debian/ stretch-updates InRelease
Hit:4 Index of /debian-security stretch/updates InRelease
Hit:5 Index of /debian/ stretch Release
Hit:6 Index of /php/ stretch InRelease
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Bonjour,
Juste pour dire que j’ai exactement le même problème. Je viens de retenter une mise à jour.
Mais le résultat est le même que pour eeaiou.
J’ai exporté le log, si ça peut servir :
https://paste.yunohost.org/raw/ihobucugev

Bonjour lebipbip,
Malheureusement ravi de ne pas être le seul avec ce soucis!

J’ai eu le même souci. J’avais effectivement créé manuellement groupe pour mon utilisateur local.
J’ai fait un sudo groupdel xxxxxxxxxx puis sudo yunohost tools migrations migrate et la migration est passée.

Attention toutefois si tu as défini des autorisations particulières sur ce groupe.

Salut Djib et merci pour ta proposition.
Voilà ce que me donne groupdel:

groupdel: cannot remove the primary group of user ‘xxxxxxxxxx’

Et, en effet, je n’avais pas créé de groupe auparavant…

@eeaiou @lebipbip : déso, j’avais pas assez tester mon correctif et une erreur stupide s’est glissée dedans :stuck_out_tongue_winking_eye:

Est-ce que tu peux retenter une mise à jour ? (On va y arriver :wink: )

1 Like

:+1:

Merci beaucoup!
Tout fonctionne à nouveau

1 Like

Je confirme, ça marche!!
Merci beaucoup Aleks, pour ta réactivité.
Et merci à toute l’équipe Yuno, bien sûr :wink:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.