args:
  domain: ssb.sanyi.nl
  dyndns: false
ended_at: 2022-01-07 17:49:18.499492
error: 'Could not regenerate the configuration for category(s): nginx'
interface: api
operation: domain_add
parent: null
related_to:
- - domain
  - ssb.sanyi.nl
started_at: 2022-01-07 17:49:11.547256
success: false
yunohost_version: 4.3.5

============

2022-01-07 17:49:11,818: DEBUG - Ignoring -days; not generating a certificate
Generating a RSA private key
.......................................................+++++
.............................................................+++++
writing new private key to '/etc/yunohost/certs//ssb.sanyi.nl-history/20220107.174911-selfsigned/key.pem'
-----

2022-01-07 17:49:11,950: DEBUG - Using configuration from /etc/yunohost/certs//ssb.sanyi.nl-history/20220107.174911-selfsigned/openssl.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
        Serial Number:
            de:25:74:43:5d:20:b1:db:7b:10:aa:2e:86:ef:d6:17:12:4a:46
        Validity
            Not Before: Jan  7 17:49:11 2022 GMT
            Not After : Jan  5 17:49:11 2032 GMT
        Subject:
            commonName                = ssb.sanyi.nl
        X509v3 extensions:
            X509v3 Basic Constraints: 
                CA:FALSE
            Netscape Comment: 
                OpenSSL Generated Certificate
            X509v3 Subject Key Identifier: 
                7D:B4:22:F3:5D:A7:33:DC:EC:E7:48:8D:1E:AF:0C:20:AD:2A:27:73
            X509v3 Authority Key Identifier: 
                keyid:56:44:97:B4:91:F6:AE:E9:F1:8C:F3:80:C1:70:BF:84:21:E7:38:E8

            X509v3 Key Usage: 
                Digital Signature, Non Repudiation, Key Encipherment
            X509v3 Subject Alternative Name: 
                DNS:ssb.sanyi.nl, DNS:www.ssb.sanyi.nl, DNS:ns.ssb.sanyi.nl, DNS:xmpp-upload.ssb.sanyi.nl
Certificate is to be certified until Jan  5 17:49:11 2032 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated

2022-01-07 17:49:11,957: DEBUG - Enabling the certificate for domain ssb.sanyi.nl ...
2022-01-07 17:49:11,983: DEBUG - Restarting services...
2022-01-07 17:49:12,006: DEBUG - Running 'systemctl restart postfix'
2022-01-07 17:49:12,730: DEBUG - Running 'systemctl restart dovecot'
2022-01-07 17:49:13,925: DEBUG - Running 'systemctl restart metronome'
2022-01-07 17:49:14,448: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./15-nginx" pre \'\' \'\' /home/yunohost.conf/pending/nginx 7>&1']'
2022-01-07 17:49:14,554: DEBUG - + set -e
2022-01-07 17:49:14,554: DEBUG - + . /usr/share/yunohost/helpers
2022-01-07 17:49:14,570: DEBUG - +++ set +o
2022-01-07 17:49:14,570: DEBUG - +++ grep xtrace
2022-01-07 17:49:14,583: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
2022-01-07 17:49:14,583: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
2022-01-07 17:49:14,669: DEBUG - + do_pre_regen /home/yunohost.conf/pending/nginx
2022-01-07 17:49:14,670: DEBUG - + pending_dir=/home/yunohost.conf/pending/nginx
2022-01-07 17:49:14,670: DEBUG - + cd /usr/share/yunohost/templates/nginx
2022-01-07 17:49:14,670: DEBUG - + nginx_dir=/home/yunohost.conf/pending/nginx/etc/nginx
2022-01-07 17:49:14,670: DEBUG - + nginx_conf_dir=/home/yunohost.conf/pending/nginx/etc/nginx/conf.d
2022-01-07 17:49:14,671: DEBUG - + mkdir -p /home/yunohost.conf/pending/nginx/etc/nginx/conf.d
2022-01-07 17:49:14,684: DEBUG - + cp plain/acme-challenge.conf.inc plain/global.conf plain/ssowat.conf plain/yunohost_panel.conf.inc plain/yunohost_sso.conf.inc /home/yunohost.conf/pending/nginx/etc/nginx/conf.d
2022-01-07 17:49:14,711: DEBUG - ++ yunohost settings get ssowat.panel_overlay.enabled
2022-01-07 17:49:15,078: DEBUG - + panel_overlay=True
2022-01-07 17:49:15,078: DEBUG - + '[' True == false ']'
2022-01-07 17:49:15,078: DEBUG - + '[' True == False ']'
2022-01-07 17:49:15,079: DEBUG - ++ cat /etc/yunohost/current_host
2022-01-07 17:49:15,083: DEBUG - + main_domain=maindomain.tld
2022-01-07 17:49:15,084: DEBUG - ++ yunohost settings get security.nginx.redirect_to_https
2022-01-07 17:49:15,664: DEBUG - + export redirect_to_https=True
2022-01-07 17:49:15,665: DEBUG - + redirect_to_https=True
2022-01-07 17:49:15,665: DEBUG - ++ yunohost settings get security.nginx.compatibility
2022-01-07 17:49:15,962: DEBUG - + export compatibility=intermediate
2022-01-07 17:49:15,963: DEBUG - + compatibility=intermediate
2022-01-07 17:49:15,963: DEBUG - ++ yunohost settings get security.experimental.enabled
2022-01-07 17:49:16,468: DEBUG - + export experimental=False
2022-01-07 17:49:16,469: DEBUG - + experimental=False
2022-01-07 17:49:16,469: DEBUG - + ynh_render_template security.conf.inc /home/yunohost.conf/pending/nginx/etc/nginx/conf.d/security.conf.inc
2022-01-07 17:49:16,470: DEBUG - + local template_path=security.conf.inc
2022-01-07 17:49:16,470: DEBUG - + local output_path=/home/yunohost.conf/pending/nginx/etc/nginx/conf.d/security.conf.inc
2022-01-07 17:49:16,471: DEBUG - ++ dirname /home/yunohost.conf/pending/nginx/etc/nginx/conf.d/security.conf.inc
2022-01-07 17:49:16,474: DEBUG - + mkdir -p /home/yunohost.conf/pending/nginx/etc/nginx/conf.d
2022-01-07 17:49:16,478: DEBUG - + python3 -c 'import os, sys, jinja2; sys.stdout.write(
2022-01-07 17:49:16,478: DEBUG -                     jinja2.Template(sys.stdin.read()
2022-01-07 17:49:16,478: DEBUG -                     ).render(os.environ));'
2022-01-07 17:49:16,791: DEBUG - ++ yunohost domain cert status --json
2022-01-07 17:49:17,355: WARNING - Traceback (most recent call last):
2022-01-07 17:49:17,356: WARNING -   File "/usr/bin/yunohost", line 72, in <module>
2022-01-07 17:49:17,357: WARNING -     parser=parser
2022-01-07 17:49:17,357: WARNING -   File "/usr/lib/moulinette/yunohost/__init__.py", line 25, in cli
2022-01-07 17:49:17,358: WARNING -     ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser)
2022-01-07 17:49:17,358: WARNING -   File "/usr/lib/python3/dist-packages/moulinette/__init__.py", line 131, in cli
2022-01-07 17:49:17,359: WARNING -     args, output_as=output_as, timeout=timeout
2022-01-07 17:49:17,359: WARNING -   File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 496, in run
2022-01-07 17:49:17,360: WARNING -     ret = self.actionsmap.process(args, timeout=timeout)
2022-01-07 17:49:17,361: WARNING -   File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 599, in process
2022-01-07 17:49:17,361: WARNING -     return func(**arguments)
2022-01-07 17:49:17,362: WARNING -   File "/usr/lib/moulinette/yunohost/domain.py", line 512, in domain_cert_status
2022-01-07 17:49:17,362: WARNING -     return yunohost.certificate.certificate_status(domain_list, full)
2022-01-07 17:49:17,374: WARNING -   File "/usr/lib/moulinette/yunohost/certificate.py", line 95, in certificate_status
2022-01-07 17:49:17,374: WARNING -     status = _get_status(domain)
2022-01-07 17:49:17,375: WARNING -   File "/usr/lib/moulinette/yunohost/certificate.py", line 677, in _get_status
2022-01-07 17:49:17,376: WARNING -     cert.get_notAfter().decode("utf-8"), "%Y%m%d%H%M%SZ"
2022-01-07 17:49:17,376: WARNING -   File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1407, in get_notAfter
2022-01-07 17:49:17,377: WARNING -     return self._get_boundary_time(_lib.X509_get_notAfter)
2022-01-07 17:49:17,377: WARNING - AttributeError: module 'lib' has no attribute 'X509_get_notAfter'
2022-01-07 17:49:17,462: DEBUG - + cert_status=
2022-01-07 17:49:18,463: ERROR - Could not run script: /usr/share/yunohost/hooks/conf_regen/15-nginx
Traceback (most recent call last):
  File "/usr/lib/moulinette/yunohost/hook.py", line 306, in hook_callback
    path, args=hook_args, chdir=chdir, env=env, raise_on_error=True
  File "/usr/lib/moulinette/yunohost/hook.py", line 393, in hook_exec
    raise YunohostError("hook_exec_failed", path=path)
yunohost.utils.error.YunohostError: Could not run script: /usr/share/yunohost/hooks/conf_regen/15-nginx
2022-01-07 17:49:18,480: INFO - <strong>Could not complete the operation 'Regenerate system configurations 'nginx''. Please provide the full log of this operation by <a href="#/tools/logs/20220107-174914-regen_conf-nginx">clicking here</a> to get help</strong>