Solved: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

NorbertKoch
Beiträge: 133
Registriert: 26 Aug 2021, 08:37

Solved: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von NorbertKoch »

Hallo zusammen,

das Upgrade des Servers (von 20.04) lief ohne Fehler, aber ein Einloggen im opsi config editor ist nicht möglich:
"Keine Verbindung
java.net ConnectException: Connection refused: connect"

Eine Suche im Web führte mich leider zu keinen Lösungen.

Jemand ne Idee?
Zuletzt geändert von NorbertKoch am 19 Jun 2023, 10:16, insgesamt 1-mal geändert.
Liebe Grüße

Norbert
Benutzeravatar
j.schneider
uib-Team
Beiträge: 1819
Registriert: 29 Mai 2008, 15:14

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von j.schneider »

Hallo!

Code: Alles auswählen

apt reinstall opsiconfd
könnte helfen.
NorbertKoch
Beiträge: 133
Registriert: 26 Aug 2021, 08:37

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von NorbertKoch »

Hallo Herr Schneider,

leider keine Besserung.

Weitere Ideen?
Liebe Grüße

Norbert
thomas.besser
Beiträge: 461
Registriert: 09 Sep 2009, 09:40

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von thomas.besser »

Läuft der opsiconfd Prozess?
Was gibt z.B. ein...

Code: Alles auswählen

ps ax | grep opsiconfd
Oder ein...

Code: Alles auswählen

netstat -tlnp | grep 4447
Was sagt das Log-File unter '/var/log/opsi/opsiconfd/opsiconfd.log'?
NorbertKoch
Beiträge: 133
Registriert: 26 Aug 2021, 08:37

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von NorbertKoch »

Hallo Thomas,
10882 pts/1 S+ 0:00 grep --color=auto opsiconfd
netstat bleibt ohne antwort. Aber laut ps läuft opsinconfd auch nicht, oder sehe ich das falsch?

Die Adminseite gibt mir ein
ERR_CONNECTION_REFUSED
zurück.

Der reinstall gab folgende Warnmeldungen aus:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.10.121', port=4447): Max retries exceeded with url: /rpc (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4fa2faeb30>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "opsiconfd/setup.py", line 262, in setup
File "opsiconfd/ssl.py", line 483, in setup_ssl
File "opsiconfd/ssl.py", line 300, in setup_ca
File "opsiconfd/ssl.py", line 224, in depotserver_setup_ca
File "opsiconfd/backend/__init__.py", line 100, in get_backend
File "OPSI/Backend/Manager/_Manager.py", line 170, in __init__
File "OPSI/Backend/Manager/Dispatcher.py", line 77, in __init__
File "OPSI/Backend/Manager/Dispatcher.py", line 145, in __loadBackends
File "OPSI/Backend/JSONRPC.py", line 43, in __init__
File "opsicommon/client/jsonrpc.py", line 252, in __init__
File "opsicommon/client/jsonrpc.py", line 596, in connect
File "opsicommon/client/jsonrpc.py", line 465, in _execute_rpc
File "requests/sessions.py", line 637, in post
File "requests/sessions.py", line 589, in request
File "requests/sessions.py", line 703, in send
File "opsicommon/client/jsonrpc.py", line 75, in send
File "requests/adapters.py", line 519, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.10.121', port=4447): Max retries exceeded with url: /rpc (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4fa2faeb30>: Failed to establish a new connection: [Errno 111] Connection refused'))
Liebe Grüße

Norbert
thomas.besser
Beiträge: 461
Registriert: 09 Sep 2009, 09:40

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von thomas.besser »

Nö, das 'ps ax | grep opsiconfd' ausgeführt in einer Shell findet sich immer auch selbst.

So sieht z.B. ein laufender 'opsiconfd' aus:

Code: Alles auswählen

ps ax | grep opsiconfd
 402334 ?        Ssl    6:11 /usr/lib/opsiconfd/opsiconfd start --log-level-stderr=0
 402400 ?        S      0:00 /usr/lib/opsiconfd/opsiconfd -B -S -E -s -c from multiprocessing.resource_tracker import main;main(23)
 402401 ?        Sl     6:58 /usr/lib/opsiconfd/opsiconfd --multiprocessing-fork tracker_fd=24 pipe_handle=26
 413251 pts/0    S+     0:00 grep opsiconfd
Kein 'netstat'!? Dann fehlt dir wahrscheinlich das Paket 'net-tools'.

Was sagt das Logfile?
NorbertKoch
Beiträge: 133
Registriert: 26 Aug 2021, 08:37

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von NorbertKoch »

Hallo Thomas,

net-tools sind installiert, gerade nochmal gecheckt:
root@opsi:~# netstat -tlnp | grep 4447
root@opsi:~# apt-get install net-tools
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
net-tools ist schon die neueste Version (1.60+git20181103.0eebece-1ubuntu5).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Dennoch gibt netstat keine Antwort.

Gegenbeweis, dass die net-tools installiert sind:

root@opsi:~# netstat -tlnp | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1230/apache2
tcp 0 0 0.0.0.0:48061 0.0.0.0:* LISTEN 974/rpc.statd
Liebe Grüße

Norbert
NorbertKoch
Beiträge: 133
Registriert: 26 Aug 2021, 08:37

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von NorbertKoch »

Ich denke, es liegt am Zertifikat:
(Auszug aus dem opsiconfd.log)
[4] [2023-04-11 08:12:08.525] [ ] Failed to verify server cert with opsi CA (CA is not valid before 2023-04-11 06:12:07 but certificate is valid before 2023-04-02 06:56:12), creating new server cert>
Liebe Grüße

Norbert
NorbertKoch
Beiträge: 133
Registriert: 26 Aug 2021, 08:37

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von NorbertKoch »

Allerdings kann ich mit

Code: Alles auswählen

opsi-setup --renew-opsiconfd-cert
auch kein Renew anstoßen:
Usage: opsi-setup [options]

Options:
-h, --help show this help
-l log-level 0..9
-V, --version Show version info and exit.

--log-file <path> path to log file
--backend-config <json hash> overwrite backend config hash values
--ip-address <ip> force to this ip address (do not lookup by name)
--register-depot register depot at config server
--set-rights [path] set default rights on opsi files (in [path] only)
--init-current-config init current backend configuration
--update-from=<version> update from opsi version <version>
--update-mysql update mysql backend
--update-file update file backend
--configure-mysql configure mysql backend
--file-to-mysql migrate file to mysql backend and adjust dispatch.conf
--no-backup do not run a backup before migration
--no-restart do not restart services on migration
--edit-config-defaults edit global config defaults
--cleanup-backend cleanup backend
--auto-configure-samba patch smb.conf
--auto-configure-dhcpd patch dhcpd.conf
--patch-sudoers-file patching sudoers file for tasks in opsiadmin context.

[3] [2023-06-16 10:34:02.388] [ ] option --renew-opsiconfd-cert not recognized (opsisetup.py:1052)
Traceback (most recent call last):
File "opsiutils/opsisetup.py", line 1048, in main
File "opsiutils/opsisetup.py", line 868, in opsisetup_main
File "getopt.py", line 93, in getopt
File "getopt.py", line 157, in do_longs
File "getopt.py", line 174, in long_has_args
getopt.GetoptError: option --renew-opsiconfd-cert not recognized

ERROR: option --renew-opsiconfd-cert not recognized
Liebe Grüße

Norbert
thomas.besser
Beiträge: 461
Registriert: 09 Sep 2009, 09:40

Re: Probleme nach Upgrade des opsi-Servers auf Ubuntu 22.04

Beitrag von thomas.besser »

Ich habe Zweifel, dass die Ausgabe des Logfiles wirklich vom Ende der Datei stammt!?

Poste mal die Ausgabe von...

Code: Alles auswählen

tail /var/log/opsi/opsiconfd/opsiconfd.log
Antworten