(Ich weiss, das Thema wurde schon woanders besprochen, aber ich muss das nochmal neu aufs Tablett legen, weil sich da mit keiner neueren Version des opsi-client-agent eine Verbesserung ergeben hat.)
Seit opsi 4.2 haben wir das Problem, dass sich der Client Agent nicht mehr sauber im ersten Anlauf installieren lässt.
Die Installation beginnt, läuft aber bei dem Aufruf
Code: Alles auswählen
ShellCall('"'+ $BaseDir$ + '\opsiclientd_bin\opsiclientd.exe" setup --client-id "' + $ClientId$ + '" --service-address "' + $ServiceAddress$ + '" --service-username "' + $ServiceUsername$ + '" --service-password "' + $ServicePassword$ + '"')
Im Log steht an der Stelle:
Code: Alles auswählen
[5] [2022-05-05 10:48:29.369] [opsi-client-agent] comment: Run opsiclientd setup
[6] [2022-05-05 10:48:29.369] [opsi-client-agent] DisableWow64FsRedirection succeeded
[5] [2022-05-05 10:48:29.369] [opsi-client-agent] ShellCall Executing: "C:\Windows\system32\\cmd.exe" /C ""C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd_bin\opsiclientd.exe" setup --client-id "<clientfqdn>" --service-address "https://10.YYY.XX.237:4447" --service-username "<clientfqdn>" --service-password "***(confidential)***""
[6] [2022-05-05 10:48:32.391] [opsi-client-agent] ExitCode 1
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] output:
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] --------------
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:30.659] [ ] Running opsiclientd setup (setup.py:427)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:30.659] [ ] Trying to read config from file: 'C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf' (Config.py:485)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.664] [ ] Refusing to set empty value config global.host_id (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.664] [ ] Refusing to set empty value config global.opsi_host_key (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.664] [ ] Refusing to set empty value config config_service.url (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.664] [ ] Refusing to set empty value config depot_server.depot_id (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.664] [ ] Refusing to set empty value config depot_server.url (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.664] [ ] Refusing to set empty value config depot_server.drive (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.664] [ ] Refusing to set empty value config event_default.depot_protocol (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:30.665] [ ] Refusing to set empty value config depot_server.master_depot_id (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:30.665] [ ] Config read (Config.py:514)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:30.665] [ ] Connecting to 'https://10.YYY.XX.237:4447' as '<clientfqdn>' (setup.py:282)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:30.911] [ ] Getting config from service (Config.py:797)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:30.985] [ ] Got config from service (Config.py:846)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:30.995] [ ] Config file 'C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf' written (Config.py:575)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:31.035] [ ] Installing windows service (setup.py:217)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:31.068] [ ] Fetching tls server certificate from config service (setup.py:96)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:31.068] [ ] Trying to read config from file: 'C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf' (Config.py:485)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:31.075] [ ] Refusing to set empty value config depot_server.url (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [4] [2022-05-05 10:48:31.075] [ ] Refusing to set empty value config depot_server.master_depot_id (Config.py:384)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:31.076] [ ] Config read (Config.py:514)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:31.863] [ ] Cleanup registry uninstall information (setup.py:305)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:31.864] [ ] Configure Windows firewall (setup.py:183)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent]
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] Keine Regeln stimmen mit den angegebenen Kriterien überein.
[7] [2022-05-05 10:48:32.392] [opsi-client-agent]
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] OK.
[7] [2022-05-05 10:48:32.392] [opsi-client-agent]
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:32.304] [ ] Creating opsi shutdown install policy (setup.py:347)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] [5] [2022-05-05 10:48:32.312] [ ] Setup completed with 0 errors (setup.py:468)
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] Installing service opsiclientd
[7] [2022-05-05 10:48:32.392] [opsi-client-agent] Service installed
[7] [2022-05-05 10:48:32.392] [opsi-client-agent]
[6] [2022-05-05 10:48:32.392] [opsi-client-agent] RevertWow64FsRedirection succeeded
[6] [2022-05-05 10:48:32.393] [opsi-client-agent] If
[7] [2022-05-05 10:48:32.395] [opsi-client-agent] GetLastExitcode = "0" <<< result false
[6] [2022-05-05 10:48:32.395] [opsi-client-agent] not(GetLastExitcode = "0") <<< result true
[6] [2022-05-05 10:48:32.395] [opsi-client-agent] Then
[3] [2022-05-05 10:48:32.395] [opsi-client-agent] Error: opsiclientd setup failed
[2] [2022-05-05 10:48:32.395] [opsi-client-agent] Error level set to fatal
[6] [2022-05-05 10:48:32.395] [opsi-client-agent] Process aborted
[6] [2022-05-05 10:48:32.395] [opsi-client-agent]
[6] [2022-05-05 10:48:32.395] [opsi-client-agent] ~~~~~~~ End Sub ~~~~~~~ Sub_install_opsiclientd
[6] [2022-05-05 10:48:32.395] [opsi-client-agent]
[6] [2022-05-05 10:48:32.395] [opsi-client-agent] Process aborted
[1] [2022-05-05 10:48:32.396] [opsi-client-agent] ___________________
[1] [2022-05-05 10:48:32.396] [opsi-client-agent] script finished: failed
- der Client am Konfigserver angelegt
- das Log zurück an den Server geschrieben
- der Produktstatus von opsi-winst auf success und von opsi-client-agent auf failed gesetzt
D.h. im Grunde hat alles geklappt, nur der ShellCall versteht da was falsch.
Da wir AppLocker im Einsatz haben, habe ich auch mal das WIndows Eventlog gecheckt. Dort taucht zum Zeitpunkt der Installation ein Powershell Skript auf, was vor die Pumpe läuft, weil es aus dem Temp Ordner des angemeldeten Users ausgeführt werden soll, was bei uns AUCH FÜR ADMINS verboten ist.
Könnte es sein, dass der opsiclientd Installationsvorgang da irgendeinen Test vollzieht, der nicht sauber laufen konnte?
Jedenfalls, wenn ich jetzt im opsi-configed bei diesem Client den opsi-client-agent nochmals auf setup setze und die Kiste boote, installiert er den Client tatsächlich selbstständig erneut und danach ist alles fein.
Ich versteh's nicht...
Gruß
Holger