"Wazo authentication server connection error" après installation LetsEncrypt

Quand je tape wazo-confd :

2022-07-03 03:00:09,133 [13871] (ERROR) (wazo_confd.main): undefined environment variable XIVO_UUID
2022-07-03 03:00:09,133 [13871] (CRITICAL) (root): XIVO_UUID environment variable is not set
Traceback (most recent call last):
  File "/usr/bin/wazo-confd", line 11, in <module>
    load_entry_point('wazo-confd==0.1', 'console_scripts', 'wazo-confd')()
  File "/usr/lib/python3/dist-packages/wazo_confd/main.py", line 33, in main
    set_xivo_uuid(config, logger)
  File "/usr/lib/python3/dist-packages/xivo/config_helper.py", line 148, in set_xivo_uuid
    config['uuid'] = get_xivo_uuid(logger)
  File "/usr/lib/python3/dist-packages/xivo/config_helper.py", line 143, in get_xivo_uuid
    raise UUIDNotFound()
xivo.config_helper.UUIDNotFound: XIVO_UUID environment variable is not set

Quand je regarde le log de wazo confd :

2022-07-03 00:32:28,555 [9903] (WARNING) (xivo.token_renewer): Creating token with wazo-auth failed (). Retrying in 32 seconds...

Quand je lance wazo-upgrade :

wazo-upgrade is already the newest version (22.07~20220425.131930.1196d88.deb10).
The following packages were automatically installed and are no longer required:
  asterisk-sounds-main asterisk-sounds-wav-fr-fr erlang-asn1 erlang-base
  erlang-crypto erlang-eldap erlang-ftp erlang-inets erlang-mnesia
  erlang-os-mon erlang-parsetools erlang-public-key erlang-runtime-tools
  erlang-snmp erlang-ssl erlang-syntax-tools erlang-tftp erlang-tools
  erlang-xmerl ethtool fail2ban fontconfig gdebi-core hdparm ipcalc
  isc-dhcp-server libalgorithm-c3-perl libb-hooks-endofscope-perl
  libb-hooks-op-check-perl libcairo2 libcgi-fast-perl libcgi-pm-perl
  libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl
  libclass-method-modifiers-perl libclass-xsaccessor-perl libcurses-perl
  libdata-optlist-perl libdate-manip-perl libdatrie1 libdbi1
  libdevel-callchecker-perl libdevel-caller-perl
  libdevel-globaldestruction-perl libdevel-lexalias-perl
  libdevel-stacktrace-perl libdist-checkconflicts-perl
  libdynaloader-functions-perl libemail-date-format-perl libeval-closure-perl
  libexception-class-perl libexporter-tiny-perl libfcgi-perl
  libfile-copy-recursive-perl libgraphite2-3 libharfbuzz0b
  libhtml-template-perl libid3tag0 libio-multiplex-perl libipc-shareable-perl
  libirs-export161 libisccfg-export163 liblist-moreutils-perl
  liblog-dispatch-perl liblog-log4perl-perl libmad0 libmail-sendmail-perl
  libmime-lite-perl libmime-types-perl libmodule-implementation-perl
  libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl
  libnamespace-clean-perl libnet-cidr-perl libnet-ip-perl libnet-netmask-perl
  libnet-server-perl libnet-snmp-perl libnet-telnet-perl libopencore-amrnb0
  libopencore-amrwb0 libpackage-stash-perl libpackage-stash-xs-perl
  libpadwalker-perl libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0
  libparams-classify-perl libparams-util-perl
  libparams-validationcompiler-perl libpixman-1-0 libreadonly-perl
  libref-util-perl libref-util-xs-perl librole-tiny-perl librrd8 librrds-perl
  libsctp1 libsox-fmt-alsa libsox-fmt-base libsox3 libspecio-perl
  libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl
  libsub-install-perl libsub-quote-perl libsys-hostname-long-perl
  libterm-readkey-perl libthai-data libthai0 libtiff-tools
  libvariable-magic-perl libxcb-render0 libxcb-shm0 libxrender1 madplay monit
  munin munin-common munin-doc munin-node munin-plugins-core policycoreutils
  python-certbot-nginx python-netaddr python3-arrow python3-billiard
  python3-celery python3-cherrypy3 python3-contextlib2 python3-debian
  python3-ephem python3-flask-graphql python3-graphene python3-graphql-core
  python3-graphql-relay python3-graphql-server-core python3-h11 python3-h2
  python3-hpack python3-hstspreload python3-httpx python3-hyperframe
  python3-jaraco.functools python3-memcache python3-portend
  python3-progressbar python3-promise python3-pyfcm python3-pyinotify
  python3-rfc3986 python3-rx python3-setproctitle python3-sqlalchemy-utils
  python3-systemd python3-tempora python3-zc.lockfile rabbitmq-server rrdtool
  rsync selinux-utils smartmontools socat sox tcpdump vlan wazo-agentd
  wazo-agentd-cli wazo-agentd-client-python3 wazo-call-logd
  wazo-calld-client-python3 wazo-chatd wazo-debug wazo-dhcpd-update wazo-dird
  wazo-dist-upgrade wazo-dxtora wazo-dxtorc wazo-keyring wazo-libsccp
  wazo-market-client-python3 wazo-phoned wazo-plugind wazo-provd-cli
  wazo-provd-client wazo-purge-db wazo-service wazo-sounds-fr-fr
  wazo-sounds-main wazo-stat wazo-webhookd xivo-backup xivo-config
  xivo-fetchfw xivo-lib-fetchfw-python3 xivo-monitoring xivo-res-freeze-check
  xivo-swagger-doc xivo-sync xivo-utils
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
                                                               1 not fully installed or removed.
                                                                                                After this operation, 0 B of additional disk space will be used.
                                                                                                                                                                Setting up wazo-auth (22.09~20220621.152040.9f743d7.deb10) ...
Upgrading wazo-auth database ...
Traceback (most recent call last):
  File "/usr/bin/wazo-auth-upgrade-db", line 11, in <module>
    load_entry_point('wazo-auth==1.0', 'console_scripts', 'wazo-auth-upgrade-db')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/wazo_auth/main.py", line 11, in <module>
    from wazo_auth.config import get_config
  File "/usr/lib/python3/dist-packages/wazo_auth/config.py", line 7, in <module>
    from xivo.config_helper import read_config_file_hierarchy_accumulating_list
ImportError: cannot import name 'read_config_file_hierarchy_accumulating_list' from 'xivo.config_helper' (/usr/lib/python3/dist-packages/xivo/config_helper.py)
dpkg: error processing package wazo-auth (--configure):
 installed wazo-auth package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 wazo-auth
E: Sub-process /usr/bin/dpkg returned an error code (1)
ERROR: You must configure Wazo by running the wizard (POST /api/confd/1.1/wizard) before using wazo-upgrade

J’ai donc tenté POST /api/confd/1.1/wizard :
et là il me demande une info que je ne trouve pas, ne connais pas ou ne sais pas où chercher :

Please enter content (application/x-www-form-urlencoded) to be POSTed:

apt install wazo-auth me donne ceci :

ImportError: cannot import name 'read_config_file_hierarchy_accumulating_list' from 'xivo.config_helper' (/usr/lib/python3/dist-packages/xivo/config_helper.py)
dpkg: error processing package wazo-auth (--configure):
 installed wazo-auth package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 wazo-auth
E: Sub-process /usr/bin/dpkg returned an error code (1)

Pour info, wazo-auth-cli user list me donne les infos suivantes :

HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //voip.kiao.fr:9497/0.1/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb4a4a9ff60>: Failed to establish a new connection: [Errno -2] Name or service not known'))

Je sens bien que je ne suis pas loin et que je rate un truc tout con…

J’ai fait un wazo-service status aussi, puis un wazo-service start :

wazo-service status
Checking database...
        NOK (current revision is c04ed3f6a685)
Checking services...
        unknown         dahdi
        running         wazo-plugind
        running         wazo-webhookd
        running         wazo-sysconfd
        running         wazo-confgend
        running         wazo-confd
        stopped         wazo-auth
        running         wazo-call-logd
        running         wazo-dxtora
        running         wazo-provd
        running         wazo-agid
        running         asterisk
        running         wazo-amid
        running         wazo-agentd
        running         wazo-dird
        running         wazo-phoned
        running         wazo-calld
        running         wazo-websocketd
        running         wazo-chatd
debian@vps-716432a2:~$ sudo wazo-service start
Waiting for services to start successfully...
        starting dahdi ... ignored
        starting wazo-auth ...Failed to start wazo-auth.service: Unit wazo-auth.service not found.
 NOK
Opening port 5060.

Ensuite systemctl status wazo-auth.service


● wazo-auth.service - wazo-auth server
   Loaded: loaded (/lib/systemd/system/wazo-auth.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2022-07-03 12:48:29 CEST; 4s ago
  Process: 3726 ExecStart=/usr/bin/wazo-auth (code=killed, signal=TERM)
  Process: 3727 ExecStartPost=/usr/bin/wazo-auth-wait (code=exited, status=1/FAILURE)
 Main PID: 3726 (code=killed, signal=TERM)

Et enfin journalctl -xe :

-- Support: https://www.debian.org/support
--
-- Automatic restarting of the unit wazo-auth.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jul 03 12:49:40 vps-716432a2 systemd[1]: Stopped wazo-auth server.
-- Subject: A stop job for unit wazo-auth.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit wazo-auth.service has finished.
--
-- The job identifier is 22523 and the job result is done.
Jul 03 12:49:40 vps-716432a2 systemd[1]: wazo-auth.service: Start request repeated too quickly.
Jul 03 12:49:40 vps-716432a2 systemd[1]: wazo-auth.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit wazo-auth.service has entered the 'failed' state with result 'exit-code'.
Jul 03 12:49:40 vps-716432a2 systemd[1]: Failed to start wazo-auth server.
-- Subject: A start job for unit wazo-auth.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit wazo-auth.service has finished with a failure.
--
-- The job identifier is 22523 and the job result is failed.
Jul 03 12:49:40 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:40,471 [8212] (INFO) (flask.app): request: GET http://localhost:9489/0.1/status {'Host': 'localhost:9489', 'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, d
Jul 03 12:49:40 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:40,474 [8212] (ERROR) (xivo.rest_api_helpers): Authentication server unreachable: {'auth_server_host': 'localhost', 'auth_server_port': 9497, 'original_error': "HTTPConnectio
Jul 03 12:49:40 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:40,475 [8212] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9489/0.1/status 503
Jul 03 12:49:40 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:40,886 [8212] (WARNING) (xivo.token_renewer): Creating token with wazo-auth failed (). Retrying in 32 seconds...
Jul 03 12:49:41 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:41,813 [9835] (ERROR) (xivo.rest_api_helpers): wazo-plugind is not initialized: {}
Jul 03 12:49:41 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:41,815 [9835] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9503/0.2/config 503
Jul 03 12:49:42 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:42,482 [8212] (INFO) (flask.app): request: GET http://localhost:9489/0.1/status {'Host': 'localhost:9489', 'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, d
Jul 03 12:49:42 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:42,485 [8212] (ERROR) (xivo.rest_api_helpers): Authentication server unreachable: {'auth_server_host': 'localhost', 'auth_server_port': 9497, 'original_error': "HTTPConnectio
Jul 03 12:49:42 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:42,485 [8212] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9489/0.1/status 503
Jul 03 12:49:43 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:43,822 [9835] (ERROR) (xivo.rest_api_helpers): wazo-plugind is not initialized: {}
Jul 03 12:49:43 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:43,823 [9835] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9503/0.2/config 503
Jul 03 12:49:44 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:44,491 [8212] (INFO) (flask.app): request: GET http://localhost:9489/0.1/status {'Host': 'localhost:9489', 'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, d
Jul 03 12:49:44 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:44,496 [8212] (ERROR) (xivo.rest_api_helpers): Authentication server unreachable: {'auth_server_host': 'localhost', 'auth_server_port': 9497, 'original_error': "HTTPConnectio
Jul 03 12:49:44 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:44,497 [8212] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9489/0.1/status 503
Jul 03 12:49:45 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:45,831 [9835] (ERROR) (xivo.rest_api_helpers): wazo-plugind is not initialized: {}
Jul 03 12:49:45 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:45,833 [9835] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9503/0.2/config 503
Jul 03 12:49:46 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:46,504 [8212] (INFO) (flask.app): request: GET http://localhost:9489/0.1/status {'Host': 'localhost:9489', 'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, d
Jul 03 12:49:46 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:46,507 [8212] (ERROR) (xivo.rest_api_helpers): Authentication server unreachable: {'auth_server_host': 'localhost', 'auth_server_port': 9497, 'original_error': "HTTPConnectio
Jul 03 12:49:46 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:46,508 [8212] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9489/0.1/status 503
Jul 03 12:49:46 vps-716432a2 wazo-agid[10017]: 2022-07-03 12:49:46,831 [10017] (WARNING) (xivo.token_renewer): Creating token with wazo-auth failed (). Retrying in 32 seconds...
Jul 03 12:49:47 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:47,840 [9835] (ERROR) (xivo.rest_api_helpers): wazo-plugind is not initialized: {}
Jul 03 12:49:47 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:47,840 [9835] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9503/0.2/config 503
Jul 03 12:49:48 vps-716432a2 wazo-webhookd[8423]: 2022-07-03 12:49:48,079 [8423] (WARNING) (xivo.token_renewer): Creating token with wazo-auth failed (). Retrying in 32 seconds...
Jul 03 12:49:48 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:48,514 [8212] (INFO) (flask.app): request: GET http://localhost:9489/0.1/status {'Host': 'localhost:9489', 'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, d
Jul 03 12:49:48 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:48,517 [8212] (ERROR) (xivo.rest_api_helpers): Authentication server unreachable: {'auth_server_host': 'localhost', 'auth_server_port': 9497, 'original_error': "HTTPConnectio
Jul 03 12:49:48 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:48,518 [8212] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9489/0.1/status 503
Jul 03 12:49:49 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:49,845 [9835] (ERROR) (xivo.rest_api_helpers): wazo-plugind is not initialized: {}
Jul 03 12:49:49 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:49,847 [9835] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9503/0.2/config 503
Jul 03 12:49:50 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:50,524 [8212] (INFO) (flask.app): request: GET http://localhost:9489/0.1/status {'Host': 'localhost:9489', 'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, d
Jul 03 12:49:50 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:50,527 [8212] (ERROR) (xivo.rest_api_helpers): Authentication server unreachable: {'auth_server_host': 'localhost', 'auth_server_port': 9497, 'original_error': "HTTPConnectio
Jul 03 12:49:50 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:50,528 [8212] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9489/0.1/status 503
Jul 03 12:49:51 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:51,853 [9835] (ERROR) (xivo.rest_api_helpers): wazo-plugind is not initialized: {}
Jul 03 12:49:51 vps-716432a2 wazo-plugind[9835]: 2022-07-03 12:49:51,854 [9835] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9503/0.2/config 503
Jul 03 12:49:52 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:52,534 [8212] (INFO) (flask.app): request: GET http://localhost:9489/0.1/status {'Host': 'localhost:9489', 'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, d
Jul 03 12:49:52 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:52,537 [8212] (ERROR) (xivo.rest_api_helpers): Authentication server unreachable: {'auth_server_host': 'localhost', 'auth_server_port': 9497, 'original_error': "HTTPConnectio
Jul 03 12:49:52 vps-716432a2 wazo-dird[8212]: 2022-07-03 12:49:52,538 [8212] (INFO) (flask.app): response: (127.0.0.1) GET http://localhost:9489/0.1/status 503
Jul 03 12:49:53 vps-716432a2 sudo[3811]:   debian : TTY=pts/0 ; PWD=/home/debian ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Jul 03 12:49:53 vps-716432a2 sudo[3811]: pam_unix(sudo:session): session opened for user root by debian(uid=0)

je vais regarder tout ça plus en profondeur

Merci en tout cas !