Domain remove fails after failed restore

My YunoHost server

Hardware: Old desktop computer
YunoHost version: 3.6.4.6
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain:
Two things:

  1. Yes, my router has hairpinning issues.

  2. Just beforehand I tried to restore from a backup by commandline and got this in the terminal:

    root@yuno:~# yunohost backup restore 20190912-022210
    Warning: YunoHost is already installed
    Do you really want to restore an already installed system? [y/N]: y
    Info: Preparing archive for restoration…
    Warning: cp: cannot stat ‘/home/yunohost.backup/tmp/20190912-022210/conf/cron/.’: No such file or directory
    Success! The configuration has been updated for category ‘metronome’
    Success! The configuration has been updated for category ‘nginx’
    Success! The configuration has been updated for category ‘postfix’
    Info: The configuration file ‘/etc/dnsmasq.d/01-pihole.conf’ is expected to be deleted by regen-conf (category dnsmasq) but has been kept back.
    Info: Restoring application writefreely…
    Error: An app is already installed with the id ‘writefreely’
    Info: The operation ‘Restore ‘writefreely’ from a backup archive’ has failed! To get help, please share the full log of this operation using the command ‘yunohost log display 20190919-132045-backup_restore_app-writefreely --share’
    Info: Restoring application collaboradocker…
    Error: An app is already installed with the id ‘collaboradocker’
    Info: The operation ‘Restore ‘collaboradocker’ from a backup archive’ has failed! To get help, please share the full log of this operation using the command ‘yunohost log display 20190919-132045-backup_restore_app-collaboradocker --share’
    Info: Restoring application nextcloud…
    Error: An app is already installed with the id ‘nextcloud’
    Info: The operation ‘Restore ‘nextcloud’ from a backup archive’ has failed! To get help, please share the full log of this operation using the command ‘yunohost log display 20190919-132045-backup_restore_app-nextcloud --share’
    Success! Restore complete
    apps:
    collaboradocker: Error
    nextcloud: Error
    writefreely: Error
    system:
    conf_cron: Success
    conf_ldap: Success
    conf_nginx: Success
    conf_ssh: Success
    conf_ssowat: Success
    conf_xmpp: Success
    conf_ynh_certs: Success
    conf_ynh_currenthost: Success
    conf_ynh_firewall: Success
    conf_ynh_mysql: Success
    data_home: Success
    data_mail: Success
    root@yuno:~# yunohost backup list
    archives:

    • 20190912-022210
    • nextcloud-pre-upgrade1

Description of my issue

I’m trying to remove and recreate the domain.

Restoring errors seem to have damaged my configuration. Now one of my domains is missing in the domains list, and yet can’t be re-added by yunohost domain add. (And yes, I definitely said domain ADD despite the error messages mentioning domain REMOVE):

root@yuno:~# yunohost domain add [MYDOMAIN.TLD]
Warning: Timed out when server tried to contact itself through HTTP using public IP address (domain c with ip x.x.x.x). You may be experiencing hairpinning issue or the firewall/router ahead of your server is misconfigured.
Info: The operation 'Remove '[MYDOMAIN.TLD]' domain from system configuration' has failed! To get help, please share the full log of this operation using the command 'yunohost log display 20190919-140739-domain_remove-[MYDOMAIN.TLD] --share'
Info: The operation 'Add '[MYDOMAIN.TLD]' domain into system configuration' has failed! To get help, please share the full log of this operation using the command 'yunohost log display 20190919-140728-domain_add-[MYDOMAIN.TLD] --share'
Error: An error occurred during LDAP operation

Also, here are the logs that the error message refers to:

description: Remove '[MYDOMAIN.TLD]' domain from system configuration
log_path: /var/log/yunohost/categories/operation/20190919-140739-domain_remove-[MYDOMAIN.TLD].log
logs: 
metadata: 
  args: 
    domain: [MYDOMAIN.TLD]
    force: True
  ended_at: 2019-09-19 10:07:39
  error: An error occurred during LDAP operation
  operation: domain_remove
  related_to: 
    - domain
    - [MYDOMAIN.TLD]
  started_at: 2019-09-19 10:07:39
  success: False
metadata_path: /var/log/yunohost/categories/operation/20190919-140739-domain_remove-[MYDOMAIN.TLD].yml
name: 20190919-140739-domain_remove-[MYDOMAIN.TLD]

…and the second one:

description: Add '[MYDOMAIN.TLD]' domain into system configuration
log_path: /var/log/yunohost/categories/operation/20190919-140728-domain_add-[MYDOMAIN.TLD].log
logs: 
  - 2019-09-19 10:07:39,268: WARNING - Timed out when server tried to contact itself through HTTP using public IP address (domain [MYDOMAIN.TLD] with ip 45.2.79.194). You may be experiencing hairpinning issue or the firewall/router ahead of your server is misconfigured.
  - 2019-09-19 10:07:39,283: INFO - The operation 'Remove '[MYDOMAIN.TLD]' domain from system configuration' has failed! To get help, please share the full log of this operation using the command 'yunohost log display 20190919-140739-domain_remove-[MYDOMAIN.TLD] --share'
metadata: 
  args: 
    domain: [MYDOMAIN.TLD]
    dyndns: False
  ended_at: 2019-09-19 10:07:39
  error: An error occurred during LDAP operation
  operation: domain_add
  related_to: 
    - domain
    - [MYDOMAIN.TLD]
  started_at: 2019-09-19 10:07:28
  success: False
metadata_path: /var/log/yunohost/categories/operation/20190919-140728-domain_add-[MYDOMAIN.TLD].yml
name: 20190919-140728-domain_add-[MYDOMAIN.TLD]

We like so much those kind of informative error messages :smiley: (Our fault, not yours :stuck_out_tongue_winking_eye:)

Can you check slapd is running with systemctl status slapd (or in the ‘services’ page in the webadmin)

Thanks for the reply @Aleks,

here’s what I get:

root@yuno:~# 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 Thu 2019-09-19 09:29:30 EDT; 4h 15min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 4 (limit: 4915)
   Memory: 8.6M
      CPU: 109ms
   CGroup: /system.slice/slapd.service
           └─855 /usr/sbin/slapd -h ldap://127.0.0.1:389/ ldaps:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slap

Sep 19 09:29:15 [MYDOMAIN.TLD] systemd[1]: Starting LSB: OpenLDAP standalone server (Lightweight Directory Access 
Sep 19 09:29:25 [MYDOMAIN.TLD] slapd[673]: @(#) $OpenLDAP: slapd  (Aug 10 2019 19:17:00) $
                                                        Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.de
Sep 19 09:29:30 [MYDOMAIN.TLD] slapd[855]: slapd starting
Sep 19 09:29:30 [MYDOMAIN.TLD] slapd[577]: Starting OpenLDAP: slapd.
Sep 19 09:29:30 [MYDOMAIN.TLD] systemd[1]: Started LSB: OpenLDAP standalone server (Lightweight Directory Access P
Sep 19 09:59:08 [MYDOMAIN.TLD] slapd[855]: slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.666.5.16
Sep 19 09:59:28 [MYDOMAIN.TLD] slapd[855]: slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.666.5.16

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