WebUI 7.2 (7.2.27-testing): Installation der Pakete kann nicht erfolgreich abgeschlossen werden

Hallo Arnaud,

ich habe auf dem Testsserver versucht die aktuellsten Pakete einzuspielen. Dies scheitert zuerst daran, dass apt-utils fehlen. Nachdem ich diese nachinstalliert habe, wird versucht linuxmuster7-webui (in der o.g. Version) einzurichten. Dieser Vorgang kann nciht erfolgreich beendet werden.
Ich erhalte folgende Fehlermeldungen:

ebconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package apt-utils.
(Reading database ... 170871 files and directories currently installed.)
Preparing to unpack .../apt-utils_2.4.11_amd64.deb ...
Unpacking apt-utils (2.4.11) ...
Setting up linuxmuster-webui7 (7.2.27-testing) ...

---------------------------------------------------------------

---------------------------------------------------------------
Updating linuxmuster-webui
---------------------------------------------------------------


Stop linuxmuster-webui


Upgrade pip to latest version

Requirement already satisfied: pip in /usr/local/lib/python3.10/dist-packages (23.3.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Remove deprecated plugins

WARNING: Skipping ajenti.plugin.auth-users as it is not installed.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Backing up and updating config.yml


Check requirements

WARNING: Skipping gevent-socketio-hartwork as it is not installed.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: aj==2.2.7 in /usr/local/lib/python3.10/dist-packages (from -r /usr/lib/linuxmuster-webui/etc/requirements.txt (line 1)) (2.2.7)
Requirement already satisfied: ajenti-panel==2.2.7 in /usr/local/lib/python3.10/dist-packages (from -r /usr/lib/linuxmuster-webui/etc/requirements.txt (line 2)) (2.2.7)
Requirement already satisfied: ajenti.plugin.ace==0.32 in /usr/local/lib/python3.10/dist-packages (from -r /usr/lib/linuxmuster-webui/etc/requirements.txt (line 3)) (0.32)

Requirement already satisfied: pypng in /usr/local/lib/python3.10/dist-packages (from qrcode->aj==2.2.7->-r /usr/lib/linuxmuster-webui/etc/requirements.txt (line 1)) (0.20220715.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Set default sophomorix webui rights

Command line::
Hmmh. do not know what to do with option info
Option json is a modifier option
Option verbose is a modifier option
E: Sub-process /usr/bin/dpkg returned an error code (1)
* forcing info mode
Option combinations successfully checked

ERROR: Connection to AD failed: No password found!

sophomorix connects to AD with the user administrator:
  A) Make sure administrator exists:
     samba-tool user create administrator %<password>% 
     (Replace <password> according to: samba-tool domain passwordsettings show)
  B) Store the Password of administrator (without newline character) in:
     /etc/linuxmuster/.secret/administrator


Verifying upload folder

setfacl: Invalid argument in line 9 of file /usr/lib/linuxmuster-webui/etc/install_scripts/webuiUpload.ntacl
dpkg: error processing package linuxmuster-webui7 (--configure):
 installed linuxmuster-webui7 package post-installation script subprocess returned error exit status 2
Setting up apt-utils (2.4.11) ...
Errors were encountered while processing:
 linuxmuster-webui7
needrestart is being skipped since dpkg has failed

Versuche ich dem Hinweis zu sophomorix in der Fehlermeldung zu folgen, erhalte ich folgende Fehler:

Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory
Failed to connect to 'tdb:///var/lib/samba/private/sam.ldb' with backend 'tdb': Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory
ERROR(ldb): uncaught exception - Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 186, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain.py", line 1271, in run
    samdb = SamDB(url=H, session_info=system_session(),
  File "/usr/lib/python3/dist-packages/samba/samdb.py", line 70, in __init__
    super(SamDB, self).__init__(url=url, lp=lp, modules_dir=modules_dir,
  File "/usr/lib/python3/dist-packages/samba/__init__.py", line 114, in __init__
    self.connect(url, flags, options)
  File "/usr/lib/python3/dist-packages/samba/samdb.py", line 86, in connect
    super(SamDB, self).connect(url=url, flags=flags,
linuxadmin@server:~$  samba-tool user create administrator %Muster!%
 samba-tool user create administrator %Muster
ltdb: tdb(/var/lib/samba/private/sam.ldb): tdb_open_ex: could not open file /var/lib/samba/private/sam.ldb: No such file or directory

Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory
Failed to connect to 'tdb:///var/lib/samba/private/sam.ldb' with backend 'tdb': Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory
ERROR(ldb): Failed to add user 'administrator':  - Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory

Die Datei /etc/linuxmuster/.secret/administrator gibt es scheinbar nicht.

Hast Du Ideen, woran das liegen könnte.

LG
Chris

Hallo Chris,

Es sieht so aus, dass Samba gar nicht eingerichtet ist. War es eine neue Installation ? Waren samba und sophomorix schon richtig installiert und nutzbar ?

Z.B. : ergibt testparm die richtige Samba Konfig ?

In diesem Fall scheitert die Installation, weil den Aufruf von setfacl und sophomorix-ui nicht klappen.

Gruß

Arnaud

Hallo Arnaud,

stimmt, ich hatte bislang nur soweit bis zum Setup von lmn7.2 installiert. Das Setup steht noch an.
Dann würde ein Update der Pakete vor dem Setup aber in jedem Fall zu diesem Fehler führen, oder ?

LG
Chris

Hallo Chris,

Ja. Das Update geht davon aus, dass alles schon eingerichtet ist.

Gruß

Arnaud

Hallo Arnaud,
ok, diejenigen, die dann den Server erstmalig aufsetzen, laufen dann aber auch in den Fehler, oder ? Gibt es eine Möglichkeit, das abzufangen? Das dürfte einige nervös machen :grin:
LG
Chris

Hallo Chris,

Das ist wahrscheinlich machbar: ich muss checken, ob lmn schon konfiguriert ist, und wenn nicht, das Postinstall Skript stoppen mit einer Fehlermeldung, wie „Please first configure linuxmuster through the webui and then run a dpkg -a reconfigure.“

Muss ich testen / nachschauen.

Gruß

Arnaud

Hi Arnaud,
ich habe das in einer neuen VM nochmals durchgespielt. Nachdem ich den Server mit lmn-prepare vorbereitet habe und danach auf die WebUI zugreifen will, schlägt dies fehl. Ich kann nur in der Konsole ein lmn-setup durchführen. Die WebUI ist nicht erreichbar.

Die lmn-schulkonsole ist aber auch noch erfolgreichem Konsolen-Setup nicht erreichbar.

Ein systemctl status linuxmuster-webui.service liefert

linuxmuster-webui.service - linuxmuster.net WebUI
     Loaded: loaded (/lib/systemd/system/linuxmuster-webui.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2023-11-26 16:54:35 CET; 4min 27s ago
    Process: 6747 ExecStart=/usr/bin/python3 /usr/local/bin/ajenti-panel -d --stock-plugins --plugins /usr/lib/linuxmuster-webui/plugins (code=exited, status=0/SUCCESS)
   Main PID: 6749 (python3)
      Tasks: 2 (limit: 4558)
     Memory: 61.5M
        CPU: 2.240s
     CGroup: /system.slice/linuxmuster-webui.service
             ├─6749 /usr/bin/python3 /usr/local/bin/ajenti-panel -d --stock-plugins --plugins /usr/lib/linuxmuster-webui/plugins
             └─6994 "/usr/local/bin/ajenti-panel worker [restricted session]" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" >

Nov 26 16:54:35 server.linuxmuster.lan systemd[1]: Starting linuxmuster.net WebUI...
Nov 26 16:54:35 server.linuxmuster.lan systemd[1]: linuxmuster-webui.service: Can't open PID file /run/ajenti.pid (yet?) after start: Operation not permitted
Nov 26 16:54:35 server.linuxmuster.lan systemd[1]: Started linuxmuster.net WebUI.

Ein Neustart der WebUI führt auch nicht zum Erfolg.

Der /var/log/ajenti/ajenti.log gibt u.a. Folgendes aus:

023-11-26 17:01:18,518 INFO    : lmn_websession.__init__.py: lmn_websession loaded
2023-11-26 17:01:18,519 INFO    : Loaded 19 plugins
2023-11-26 17:01:18,519 INFO    : Binding to [0.0.0.0]:443
2023-11-26 17:01:18,525 ERROR   : Fatal crash occured
2023-11-26 17:01:18,531 INFO    : New worker "restricted session" PID 7341, EUID 0, EGID 0
2023-11-26 17:01:18,531 INFO    : Worker 7341 is demoting to UID 65534 / GID 65534...
2023-11-26 17:01:18,532 INFO    : ...done, new EUID 65534 EGID 65534
2023-11-26 17:01:18,534 ERROR   : Crash report written to /var/log/ajenti/crash-2023-11-26-17h01.txt
2023-11-26 17:01:18,534 ERROR   : Please submit it to https://github.com/ajenti/ajenti/issues/new

Der crashreport in den Logs besagt:

Platform | debian / ubuntu / Ubuntu 22.04.3 LTS
Architecture | x86_64
Python | 3.10.12
Debug | False
Loaded plugins | ace, core, dashboard, filesystem, lmn_crontab, lmn_docker, lmn_landingpage, lmn_links, lmn_nextcloud, lmn_samba_shares, lmn_smbclient, lmn_vdi_administration, lmn_vdi_dashboard, lmn_w_datetime, lmn_websession, passwd, plugins, session_list, settings

Library | Version
------- | -------
gevent | 22.10.2
greenlet | 22.10.2
psutil | 5.9.6


    Traceback (most recent call last):
      File "/usr/local/lib/python3.10/dist-packages/aj/entry.py", line 29, in start
        aj.core.run(dev_mode=dev_mode, **kwargs)
      File "/usr/local/lib/python3.10/dist-packages/aj/core.py", line 182, in run
        middleware_stack = HttpMasterMiddleware.all(aj.context) + [gateway]
      File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 122, in _all
        return list(context.get_components(cls, ignore_exceptions=ignore_exceptions))
      File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 38, in get_components
        instance = self.get_component(comp)
      File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 32, in get_component
        self.component_instances[fqdn] = cls(self)
      File "/usr/local/lib/python3.10/dist-packages/aj/security/pwreset.py", line 21, in __init__
        self.auth_provider = AuthenticationService.get(self.context).get_provider()
      File "/usr/local/lib/python3.10/dist-packages/aj/auth.py", line 189, in get_provider
        raise AuthenticationError(f'Authentication provider {provider_id} is unavailable')
    aj.auth.AuthenticationError: Authentication provider lm is unavailable

LG
Chris

Hi Chris,

systemctl status linuxmuster-webui.service wird nie eine nützliche Information dazu geben. Die Webui läuft als Daemon der keine Info an systemctl schickt.

Gibt es eventuell etwas interessant in /var/log/ajenti ?

Gruß

Arnaud

Unsere posts haben sich überschnitten - s.o.

Ok, probier mal bitte folgendes:

systemctl stop linuxmuster-webui.service
ajenti-panel --dev --stock-plugins --plugins /usr/lib/linuxmuster-webui/plugins

Vielleicht kann man damit direkt sehen, was schief geht :wink:

Gruß

Arnaud

ok, habe ich gemacht:

1  [master  7545]         entry.py:50    ERROR  Fatal crash occured
26.11.2023 17:18:41  [...     7790]          gipc.py:678   DEBUG    Invalidating <_GIPCReader_e9155e fd: 6> ...
26.11.2023 17:18:41  [...     7790]          gipc.py:376   DEBUG    Invalidate <_GIPCWriter_f41b82 fd: 9> in child.
26.11.2023 17:18:41  [...     7790]          gipc.py:689   DEBUG    Legitimate <_GIPCWriter_f41b82 fd: 9> for current process.
26.11.2023 17:18:41  [...     7790]          gipc.py:678   DEBUG    Invalidating <_GIPCWriter_f41b82 fd: 9> ...
26.11.2023 17:18:41  [...     7790]          gipc.py:689   DEBUG    Legitimate <_GIPCWriter_4c6037 fd: 7> for current process.
26.11.2023 17:18:41  [...     7790]          gipc.py:394   DEBUG    Handle `<_GIPCWriter_4c6037 fd: 7>` is now valid in child.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/aj/entry.py", line 39, in start
    aj.core.run(dev_mode=dev_mode, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/aj/core.py", line 182, in run
    middleware_stack = HttpMasterMiddleware.all(aj.context) + [gateway]
  File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 122, in _all
    return list(context.get_components(cls, ignore_exceptions=ignore_exceptions))
  File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 38, in get_components
    instance = self.get_component(comp)
  File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 32, in get_component
    self.component_instances[fqdn] = cls(self)
  File "/usr/local/lib/python3.10/dist-packages/aj/security/pwreset.py", line 21, in __init__
    self.auth_provider = AuthenticationService.get(self.context).get_provider()
  File "/usr/local/lib/python3.10/dist-packages/aj/auth.py", line 189, in get_provider
    raise AuthenticationError(f'Authentication provider {provider_id} is unavailable')
aj.auth.AuthenticationError: Authentication provider lm is unavailable
26.11.2023 17:18:41  [...     7790]          gipc.py:689   DEBUG    Legitimate <_GIPCReader_272b8c fd: 8> for current process.
26.11.2023 17:18:41  [...     7790]          gipc.py:394   DEBUG    Handle `<_GIPCReader_272b8c fd: 8>` is now valid in child.
26.11.2023 17:18:41  [master  7545]        compat.py:20    DEBUG  Popen: ['uname', '-m']
26.11.2023 17:18:41  [rstrct  7790]          gate.py:168   INFO     New worker "restricted session" PID 7790, EUID 0, EGID 0
26.11.2023 17:18:41  [rstrct  7790]          gate.py:168   INFO     Worker 7790 is demoting to UID 65534 / GID 65534...
26.11.2023 17:18:41  [rstrct  7790]          gate.py:168   INFO     ...done, new EUID 65534 EGID 65534
26.11.2023 17:18:41  [master  7545]         entry.py:63    ERROR  Crash report written to /var/log/ajenti/crash-2023-11-26-17h18.txt
26.11.2023 17:18:41  [master  7545]         entry.py:64    ERROR  Please submit it to https://github.com/ajenti/ajenti/issues/new

Das Ganze endet nicht von alleine, erst mit strg-c.
Der letzte crash-Report gibt Folgendes aus:

latform | debian / ubuntu / Ubuntu 22.04.3 LTS
Architecture | x86_64
Python | 3.10.12
Debug | True
Loaded plugins | ace, core, dashboard, filesystem, lmn_crontab, lmn_docker, lmn_landingpage, lmn_links, lmn_nextcloud, lmn_samba_shares, lmn_smbclient, lmn_vdi_administration, lmn_vdi_dashboard, lmn_w_datetime, lmn_websession, passwd, plugins, session_list, settings

Library | Version
------- | -------
gevent | 22.10.2
greenlet | 22.10.2
psutil | 5.9.6


    Traceback (most recent call last):
      File "/usr/local/lib/python3.10/dist-packages/aj/entry.py", line 39, in start
        aj.core.run(dev_mode=dev_mode, **kwargs)
      File "/usr/local/lib/python3.10/dist-packages/aj/core.py", line 182, in run
        middleware_stack = HttpMasterMiddleware.all(aj.context) + [gateway]
      File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 122, in _all
        return list(context.get_components(cls, ignore_exceptions=ignore_exceptions))
      File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 38, in get_components
        instance = self.get_component(comp)
      File "/usr/local/lib/python3.10/dist-packages/jadi/jadi.py", line 32, in get_component
        self.component_instances[fqdn] = cls(self)
      File "/usr/local/lib/python3.10/dist-packages/aj/security/pwreset.py", line 21, in __init__
        self.auth_provider = AuthenticationService.get(self.context).get_provider()
      File "/usr/local/lib/python3.10/dist-packages/aj/auth.py", line 189, in get_provider
        raise AuthenticationError(f'Authentication provider {provider_id} is unavailable')
    aj.auth.AuthenticationError: Authentication provider lm is unavailable


LG
Chris

Danke für den Output.
Ja, das ist normal. Aber die Fehlermeldung Authentication provier lm is unavailable ist nicht die Ursache sondern einen Konsequenz. Es gibt sehr warhscheinlich eine andere Fehlermeldung früher im Prozess, und diese Fehlermeldung bräuchte ich :slight_smile:

Gruß

Arnaud

ok, anbei die vollständige Ausgabe.
ajenti-error.doc (66,1 KB)

Ha, ok, danke.

Vielleicht pip3 install python-magic löst das Problem ?

Wenn ja, mache ich sofort im Paket drin.

Gruß

Arnaud

habe ich ausgeführt und die schulkonsole neu gestartet.
Diese ist aber weiterhin nicht via Browser erreichbar.

Führe ich o.g. Befehle erneut aus, bleiben die Fehler bestehen.
LG
Chris

Ich habe es überprüft, und das ist eigentlich schon in die Requirements, dieses Paket sollte schon installiert sein werden. Gab es eine Fehlermeldung während des Installprozesses ?

Gruß

Arnaud

Ich bin nicht ganz sicher, welche Du meinst. Führe ich den Befehl oben aus, dann erhalte ich

Requirement already satisfied: python-magic in /usr/local/lib/python3.10/dist-packages (0.4.15)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Ok.
Was ergibt ein dpkg -l | grep magic ?

Requirement already satisfied: python-magic in /usr/local/lib/python3.10/dist-packages (0.4.15)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@server:/var/log/ajenti# dpkg -l | grep magic
ii  libvariable-magic-perl                0.62-1build5                               amd64        module to associate user-defined magic to variables from Perl
ii  wakeonlan                             0.41-12.1                                  all          Sends 'magic packets' to wake-on-LAN enabled ethernet adapters

Ok, es fehlt ein Paket.
Probier mal bitte ein apt install libmagic1, und hoffentlich reicht es.

Gruß

Arnaud