[SOLVED] Getting LDAP error when trying to install new domain

Hello YunoHost community,

I have bought several new domains that I would like to run new services on. I add them with the command: yunohost domain add [domain]. It all went fine with the first domain, however, when wanting to register the second domain I got the error: ERROR An error occurred during LDAP operation. The full debug log can be found on Pastebin or last in this post.

My domains contain the character ø (I’m danish :wink: ), which I might suspect to be the problem, as the admin panel don’t even will let me start the process to add the domains - says wrong format. If YunoHost doesn’t support adding such domains right now, wll I be able to manually add the domains to the configs?

I have tried to update and restart the server, unfortunately neither did solve the problem. I have also tried to regenerate the Yunohost installation with the command yunohost service regen-conf --force, as, from I what I could read from the logs, it was an error caused by that, but I encountered the following problem:

Warning: Traceback (most recent call last):
Warning:   File "<stdin>", line 10, in <module>
Warning: TypeError: argument of type 'NoneType' is not iterable
Error: Script execution failed: /usr/share/yunohost/hooks/conf_regen/01-yunohost
Traceback (most recent call last):
   File "/usr/bin/yunohost", line 217, in <module>
   File "/usr/lib/python2.7/dist-packages/moulinette/__init__.py", line 139, in cli
     moulinette.run(args, output_as=output_as, password=password, timeout=timeout)
   File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 358, in run
     ret = self.actionsmap.process(args, timeout=timeout)
   File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 484, in process
     return func(**arguments)
   File "/usr/lib/moulinette/yunohost/service.py", line 345, in service_regen_conf
     conf_hashes = _get_conf_hashes(service)
   File "/usr/lib/moulinette/yunohost/service.py", line 652, in _get_conf_hashes
     if service not in services:
 TypeError: argument of type 'NoneType' is not iterable

I have no clue what to try next to solve this problem, so any help regarding this issue would be greatly appreciated.

Error log when trying to add new domain:

yunohost domain add [domain] --debug

34 DEBUG loading actions map namespace ‘yunohost’
41 DEBUG extra parameter classes loaded: [‘ask’, ‘password’, ‘required’, ‘pattern’]
41 DEBUG initializing base actions map parser for cli
41 DEBUG registering new callback action ‘yunohost.utils.packages.ynh_packages_version’ to [‘-v’, ‘–version’]
83 DEBUG initialize authenticator ‘default’ with: uri=‘ldap://localhost:389’, base_dn=‘dc=yunohost,dc=org’, user_rdn=‘cn=admin’
Administration password:
6040 DEBUG lock has been acquired
6503 INFO processing action [3847.1]: yunohost.domain.add with args={‘domain’: ‘frederikdyrmosej\xc3\xb8rgensen.dk’, ‘dyndns’: False, ‘auth’: <moulinette.authenticators.ldap.Authenticator object at 0x7f2c78e10150>}
6978 INFO Generating a 2048 bit RSA private key
writing new private key to ‘/etc/yunohost/certs//[domain]-history/20170811.190532-selfsigned/key.pem’

6987 INFO Using configuration from /etc/yunohost/certs//[domain]-history/20170811.190532-selfsigned/openssl.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 33 (0x21)
Not Before: Aug 11 23:05:32 2017 GMT
Not After : Aug 9 23:05:32 2027 GMT
commonName = frederikdyrmosej\C3\B8rgensen.dk
X509v3 extensions:
X509v3 Basic Constraints:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
X509v3 Authority Key Identifier:

        X509v3 Key Usage:
            Digital Signature, Non Repudiation, Key Encipherment
        X509v3 Subject Alternative Name:
            DNS:[domain], DNS:www.[domain], DNS:ns.[domain]

Certificate is to be certified until Aug 9 23:05:32 2027 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated

6987 INFO Enabling the certificate for domain [domain] …
6987 INFO Restarting services…
7019 ERROR error during LDAP delete operation with: rdn=‘virtualdomain=[domain],ou=domains’
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/moulinette/authenticators/ldap.py”, line 159, in remove
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 288, in delete_s
return self.delete_ext_s(dn,None,None)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 281, in delete_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 469, in result3
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 476, in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 99, in _ldap_call
result = func(*args,**kwargs)
NO_SUCH_OBJECT: {‘matched’: ‘ou=domains,dc=yunohost,dc=org’, ‘desc’: ‘No such object’}
7020 DEBUG action [3847.1] ended after 0.517s
7021 DEBUG lock has been released
7021 ERROR An error occurred during LDAP operation

I couldn’t solve this problem, and talking with support over chat, other people could successfully install domains with foreign characters, such as “ø”, via the cli, but not with webadmin. The only problem was that some files weren’t removed properly when trying to remove a domain with a foreign character - a domain added with cli.

I have therefore chosen to reinstall the whole system, and will wait to take my new domain name in use until there is support for these kinds of unicode characters in domain names.