No JSON object could be decoded

damien.leviet
Beiträge: 110
Registriert: 24 Feb 2014, 11:30

No JSON object could be decoded

Beitrag von damien.leviet »

Hallo,

habe heute morgen unseren OPSI Server aktualisiert und dabei u.a. auch den opsi-client-agent auf Version 4.0.5.6-6 gebracht.

Nachdem ich diesen auf diverse Clients installiert hatte musste ich feststellen, dass diese sich gar nicht mehr über den Config Editor steuern ließen. Als Fehlermeldung erhalte ich bei allen betroffenen Clients (z.b. feuern eines on_demand Events):

<hostname>: No JSON object could be decoded

Das Problem lässt sich erst lösen, nachdem man den Client zunächst manuell de- und anschließend manuell neuinstalliert - verdammt ärgerlich, da man die Depot Freigabe zunächst einbinden und anschließend das Installationsskript manuell anstoßen muss, und das einzeln auf jedem einzelnen Client!

Wieso erhalte ich diese Meldung? Führe ich z.b. doinstall64.cmd (on_shutdown) aus, erhalte ich im Log:

doinstall64.cmd started
Aktuelles Datum: 01.09.2015
Geben Sie das neue Datum ein: (TT-MM-JJ)
'ascii' codec can't decode byte 0xc3 in position 71: ordinal not in range(128)

Bitte um eine schnelle Lösung!

MfG Damien
damien.leviet
Beiträge: 110
Registriert: 24 Feb 2014, 11:30

Re: No JSON object could be decoded

Beitrag von damien.leviet »

Ich habe jetzt folgendes rausgefunden:

- Installiere ich den opsi-client-agent via on_demand: Alles OK!

- Installiere ich ihn beim hochfahren (gui_startup): Alles OK!

- Installiere ich ihn beim Runterfahren (on_shutdown): Nicht OK; Standardconfig; siehe hier:

Code: Alles auswählen

; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
; =     configuration file for opsiclientd                              =
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     global settings                                                 -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[global]

# Location of the log file.
log_file = c:\\opsi.org\\log\\opsiclientd.log

# Set the log (verbosity) level
# (0 <= log level <= 9)
# 0: nothing, 1: essential, 2: critical, 3: errors, 4: warnings, 5: notices
# 6: infos, 7: debug messages, 8: more debug messages, 9: passwords
log_level = 4

# Client id.
host_id = 

# Opsi host key.
opsi_host_key = 

# Verify opsi server certs
verify_server_cert = false

# Verify opsi server certs by ca
verify_server_cert_by_ca = false

# On every daemon startup the user login gets blocked
# If the gui starts up and no events are being processed the login gets unblocked
# If no gui startup is noticed after <wait_for_gui_timeout> the login gets unblocked
# Set to 0 to wait forever
wait_for_gui_timeout = 120

# Application to run while blocking login
block_login_notifier = %global.base_dir%\\notifier.exe -s notifier\\block_login.ini

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     config service settings                                         -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[config_service]
# Service url.
# http(s)://<opsi config server address>:<port>/rpc
url = https://opsi.uib.local:4447/rpc

# Conection timeout.
connection_timeout = 30

# The time in seconds after which the user can cancel the connection establishment
user_cancelable_after = 30

# If this option is set, the local system time will be synced with time from service
sync_time_from_service = false

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     depot server settings                                           -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[depot_server]

# Depot server id
depot_id =

# Depot url.
# smb://<depot address>/<share name>/<path to products>
url =

# Local depot drive
drive =

# Username that is used for network connection [domain\]<username>
username = pcpatch

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     cache service settings                                          -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[cache_service]
# Maximum product cache size in bytes
product_cache_max_size = 5000000000

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     control server settings                                         -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[control_server]

# The network interfaces to bind to.
# This must be the IP address of an network interface.
# Use 0.0.0.0 to listen to all interfaces
interface = 0.0.0.0

# The port where opsiclientd will listen for HTTPS rpc requests.
port = 4441

# The location of the server certificate.
ssl_server_cert_file = %global.base_dir%\\opsiclientd\\opsiclientd.pem

# The location of the server private key
ssl_server_key_file = %global.base_dir%\\opsiclientd\\opsiclientd.pem

# The location of the static files
static_dir = %global.base_dir%\\opsiclientd\\static_html

# The maximum number of authentication failures before a client ip
# is blocked for an amount of time.
max_authentication_failures = 5

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     notification server settings                                    -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[notification_server]

# The network interfaces to bind to.
# This must be the IP address of an network interface.
# Use 0.0.0.0 to listen to all interfaces
interface = 127.0.0.1

# The first port where opsiclientd will listen for notification clients.
start_port = 44000

# Port for popup notification server
popup_port = 45000

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     opsiclientd notifier settings                                   -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[opsiclientd_notifier]

# Notifier application command
command = %global.base_dir%\\notifier.exe -p %port% -i %id%

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     opsiclientd rpc tool settings                                   -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[opsiclientd_rpc]

# RPC tool command
command = %global.base_dir%\\opsiclientd_rpc.exe "%global.host_id%" "%global.opsi_host_key%" "%control_server.port%"

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     action processor settings                                       -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[action_processor]
# Locations of action processor
local_dir = %global.base_dir%\\opsi-winst
remote_dir = opsi-winst\\files\\opsi-winst
filename = winst32.exe

# Action processor command
command = "%action_processor.local_dir%\\%action_processor.filename%" /opsiservice "%service_url%" /clientid %global.host_id% /username %global.host_id% /password %global.opsi_host_key%

# Load profile / environment of %run_as_user%
create_environment = false

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     events                                                          -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[event_default]
; === Event configuration
# Type of the event (string)
type = template
# Interval for timer events in seconds (int)
interval = -1
# Maximum number of event repetitions after which the event will be deactivated (int, -1 = forever)
max_repetitions = -1
# Time in seconds to wait before event becomes active (int, 0 to disable delay)
activation_delay = 0
# Time in seconds to wait before an event will be fired (int, 0 to disable delay)
notification_delay = 0
# Event notifier command (string)
event_notifier_command = %opsiclientd_notifier.command% -s notifier\\event.ini
# The desktop on which the event notifier will be shown on (current/default/winlogon)
event_notifier_desktop = current
# Block login while event is been executed (bool)
block_login = false
# Lock workstation on event occurrence (bool)
lock_workstation = false
# Logoff the current logged in user on event occurrence (bool)
logoff_current_user = false
# Get config settings from service (bool)
get_config_from_service = true
# Store config settings in config file (bool)
update_config_file = true
# Transmit log file to opsi service after the event processing has finished (bool)
write_log_to_service = true
# Shutdown machine after action processing has finished (bool)
shutdown = false
# Reboot machine after action processing has finished (bool)
reboot = false

; === Sync/cache settings
# Sync configuration from local config cache to server (bool)
sync_config_to_server = false
# Sync configuration from server to local config cache (bool)
sync_config_from_server = false
# Sync configuration from local config cache to server after action processing (bool)
post_sync_config_to_server = false
# Sync configuration from server to local config cache after action processing (bool)
post_sync_config_from_server = false
# Work on local config cache
use_cached_config = false
# Cache products for which actions should be executed in local depot cache (bool)
cache_products = false
# Maximum transfer rate when caching products in byte/s (int, 0 = no limit)
cache_max_bandwidth = 0
# Dynamically adapt bandwith to other network traffic (bool)
cache_dynamic_bandwidth = false
# Work on local depot cache
use_cached_products = false

; === Action notification (if product actions should be processed)
# Time in seconds for how long the action notification is shown (int, 0 to disable)
action_warning_time = 0
# Action notifier command (string)
action_notifier_command = %opsiclientd_notifier.command% -s notifier\\action.ini
# The desktop on which the action notifier will be shown on (current/default/winlogon)
action_notifier_desktop = current
# Message shown in the action notifier window (string)
action_message = Starting to process product actions. You are allowed to cancel this event a total of %action_user_cancelable% time(s). The event was already canceled %state.action_processing_cancel_counter% time(s).
# German translation (string)
action_message[de] = Starte die Bearbeitung von Produkt-Aktionen. Sie können diese Aktion insgesamt %action_user_cancelable% mal abbrechen. Die Aktion wurde bereits %state.action_processing_cancel_counter% mal abgebrochen.
# French translation (string)
action_message[fr] = Traitement des actions du produit. Vous êtes autorisé à annuler cet événement un total de %action_user_cancelable% fois. L'événement a été déjà annulée %state.action_processing_cancel_counter% fois.
# Number of times the user is allowed to cancel the execution of actions (int)
action_user_cancelable = 0

; === Action processing
# Should action be processed by action processor (bool)
process_actions = true
# Type of action processing (default/login)
action_type = default
# Update the action processor from server before starting it (bool)
update_action_processor = true
# Command which should be executed before start of action processor
pre_action_processor_command =
# Action processor command (string)
action_processor_command = %action_processor.command%
# The desktop on which the action processor command will be started on (current/default/winlogon)
action_processor_desktop = current
# Action processor timout in seconds (int)
action_processor_timeout = 10800
# Command which should be executed before after action processor has ended
post_action_processor_command =

; === Shutdown notification (if machine should be shut down or rebooted)
# Process shutdown requests from action processor
process_shutdown_requests = true
# Time in seconds for how long the shutdown notification is shown (int, 0 to disable)
shutdown_warning_time = 0
# Shutdown notifier command (string)
shutdown_notifier_command = %opsiclientd_notifier.command% -s notifier\\shutdown.ini
# The desktop on which the action notifier will be shown on (current/default/winlogon)
shutdown_notifier_desktop = current
# Message shown in the shutdown notifier window (string)
shutdown_warning_message = A reboot is required to complete software installation tasks. You are allowed to delay this reboot a total of %shutdown_user_cancelable% time(s). The reboot was already delayed %state.shutdown_cancel_counter% time(s).
# German translation (string)
shutdown_warning_message[de] = Ein Neustart wird benötigt um die Software-Installationen abzuschliessen. Sie können diesen Neustart insgesamt %shutdown_user_cancelable% mal verschieben. Der Neustart wurde bereits %state.shutdown_cancel_counter% mal verschoben.
# French translation (string)
shutdown_warning_message[fr] = Un redémarrage est nécessaire pour terminer l'installation du logiciel. Vous êtes autorisé à retarder le redémarrage un total de %shutdown_user_cancelable% fois. Le redémarrage a été déjà retardé %state.shutdown_cancel_counter% fois.
# Number of times the user is allowed to cancel the shutdown (int)
shutdown_user_cancelable = 0
# Time in seconds after the shutdown notification will be shown again after the user has canceled the shutdown (int)
shutdown_warning_repetition_time = 3600

[event_gui_startup]
super = default
type = gui startup
name = gui_startup
block_login = true

[event_gui_startup{user_logged_in}]
name = gui_startup
shutdown_warning_time = 300
block_login = false

[event_gui_startup{cache_ready}]
use_cached_config = true
use_cached_products = true
action_user_cancelable = 3
action_warning_time = 60

[event_gui_startup{installation_pending}]
name = gui_startup
active = true

[event_on_demand]
super = default
type = custom
name = on_demand

[event_on_demand{user_logged_in}]
name = on_demand
shutdown_warning_time = 300

[event_software_on_demand]
super = default
type = sw on demand

[event_sync]
super = default
type = template
process_actions = false
event_notifier_command = 
sync_config_to_server = true
sync_config_from_server = true
cache_products = true
cache_dynamic_bandwidth = true

[event_timer]
super = sync
type = timer
active = false
interval = 3600

[event_net_connection]
super = sync
type = custom
active = false
wql = SELECT * FROM __InstanceModificationEvent WITHIN 2 WHERE TargetInstance ISA 'Win32_NetworkAdapter' AND TargetInstance.NetConnectionStatus = 2

[event_sync_completed]
super = default
type = sync completed
event_notifier_command = 
process_actions = false
get_config_from_service = false
write_log_to_service = false

[event_sync_completed{cache_ready_user_logged_in}]
reboot = true
shutdown_user_cancelable = 10
shutdown_warning_time = 300

[event_sync_completed{cache_ready}]
reboot = true

[event_user_login]
super = default
type = user login
action_type = login
active = false
action_message = Starting to process user login actions.
action_message[de] = Beginne mit der Verarbeitung der Benutzer-Anmeldungs-Aktionen.
action_message[fr] = Traitement des actions à la connexion de l'utilisateur.
block_login = false
process_shutdown_requests = false
get_config_from_service = false
update_config_file = false
write_log_to_service = false
update_action_processor = true
event_notifier_command = %opsiclientd_notifier.command% -s notifier\\userlogin.ini
event_notifier_desktop = default
action_processor_command = %action_processor.command% /sessionid %service_session% /allloginscripts /silent
action_processor_desktop = default
action_processor_timeout = 300

[event_on_shutdown]
super = default
type = custom
name = on_shutdown
active = False

[event_on_shutdown{installation_pending}]
name = on_shutdown
active = False

[event_silent_install]
super = default
type = custom
name = silent_install
event_notifier_command =
process_shutdown_requests = false
action_processor_productIds = swaudit,hwaudit
action_processor_command = %action_processor.command% /productlist %action_processor_productIds% /silent
action_processor_desktop = winlogon
action_processor_timeout = 300

[event_timer_silentinstall]
super = silent_install
type = timer
active = false
interval = 21600

[precondition_user_logged_in]
user_logged_in = true

[precondition_cache_ready]
config_cached = true
products_cached = true

[precondition_cache_ready_user_logged_in]
user_logged_in = true
config_cached = true
products_cached = true

[precondition_installation_pending]
installation_pending = true
Bemerkt habe ich das aber erst nachdem ich mal software on demand versucht habe zu öffnen - im Webbrowser kam dann nach ca 30 Sekunden die Meldung, dass https://opsi.uib.local:4447/rpc nicht gefunden werden konnte :shock:

Ich vermute jetzt also einfach mal, dass die Config nicht gepatcht worden ist mit opsi-client-agent/files/opsi/cfg/config.ini :(

Einzige Lösung wäre also, on_shutdown wieder zu deaktivieren und gui_startup zu reaktivieren - was ich aber vermeiden will, da es meine Kollegen so weniger stört.

Hoffe dass mir jemand sagen kann was da genau falsch gelaufen ist, weil die vorhandenen Logs bieten keinerlei Aufschluss...

Danke,
Damien
damien.leviet
Beiträge: 110
Registriert: 24 Feb 2014, 11:30

Re: No JSON object could be decoded

Beitrag von damien.leviet »

Sooo, ich habe jetzt die Bestätigung zu meiner Vermutung.
172.16.4.33 ist unser OPSI Server

Code: Alles auswählen

(3257)    [6] [Sep 02 09:25:29:047] [opsi-client-agent]   Patching: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf
(3258)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]     setEntry [config_service] url=https://172.16.4.33:4447/rpc
(3259)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       Entry      url = https://opsi.uib.local:4447/rpc
(3260)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       changed to url=https://172.16.4.33:4447/rpc
(3261)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]     setEntry [config_service] connection_timeout=30
(3262)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       Entry      connection_timeout = 30
(3263)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       changed to connection_timeout=30
(3264)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]     setEntry [control_server] port=4441
(3265)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       Entry      port = 4441
(3266)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       changed to port=4441
(3267)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]     setEntry [notification_server] port=4442
(3268)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       in section notification_server appended entry port=4442
(3269)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]     setEntry [global] log_level=6
(3270)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       Entry      log_level = 4
(3271)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]       changed to log_level=6
(3272)    [6] [Sep 02 09:25:29:048] [opsi-client-agent]     setEntry [depot_server] username=pcpatch
(3273)    [6] [Sep 02 09:25:29:049] [opsi-client-agent]       Entry      username = pcpatch
(3274)    [6] [Sep 02 09:25:29:049] [opsi-client-agent]       changed to username=pcpatch
(3275)    [6] [Sep 02 09:25:29:049] [opsi-client-agent]     --- 
(3276)    [4] [Sep 02 09:25:29:049] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(3277)    [4] [Sep 02 09:25:29:149] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(3278)    [4] [Sep 02 09:25:29:248] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(3279)    [4] [Sep 02 09:25:29:348] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(3280)    [4] [Sep 02 09:25:29:448] [opsi-client-agent]     Error: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will not retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
Error: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will not retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""

Das ist jedoch nur so bei install on shutdown! Jetzt müsste mir aber mal einer der Programmierer aushelfen, weil spätestens hier weiß ich nicht mehr weiter. Zu den Rechten: Skript wird wie immer als SYSTEM ausgeführt; im laufenden Betrieb und bei der Anmeldung funktioniert die Installation!

MfG Damien
r.kierspel
Beiträge: 1
Registriert: 03 Sep 2015, 16:38

Re: No JSON object could be decoded

Beitrag von r.kierspel »

Hallo,

kann ich bestätigen.
Wir installieren nur noch über install_on_shutdown. Nach der Installation des opsi-client-agent 4.0.5.5-6 beim shutdown erhalten wir auf dem Server den Fehler:

Code: Alles auswählen

4412)    [4] [Sep 03 16:18:01:042] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(4413)    [4] [Sep 03 16:18:01:143] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(4414)    [4] [Sep 03 16:18:01:244] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(4415)    [4] [Sep 03 16:18:01:345] [opsi-client-agent]     Warning: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(4416)    [4] [Sep 03 16:18:01:446] [opsi-client-agent]     Error: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf could not be saved back - will not retry, error message: "Unable to create file "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf""
(4417)
Auf Client ist die opsiclientd.conf quasi jungfräulich, d.h. Host_id und die ganzen anderen Einträge fehlen.
UAC_level auf dem Client ist auf 4 und wird auch so übernommen. Virenscanner hat keinerlei Dateien geblockt.
Die Installation ondemand des opsi-client-agent funktioniert ohne Probleme.

VG

Ralf
SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

Re: No JSON object could be decoded

Beitrag von SirTux »

Ich kann das Problem leider auch bestätigen.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: No JSON object could be decoded

Beitrag von n.wenselowski »

Hallo Damien,

danke für deine Analysearbeit! Hier übernehmen wir gerne ;)
Wir haben eine Vermutung woran es liegt. Wir melden uns, wenn wir hier was neues haben.


Gruß

Niko

Code: Alles auswählen

import OPSI
damien.leviet
Beiträge: 110
Registriert: 24 Feb 2014, 11:30

Re: No JSON object could be decoded

Beitrag von damien.leviet »

n.wenselowski hat geschrieben:Hallo Damien,

danke für deine Analysearbeit! Hier übernehmen wir gerne ;)
Wir haben eine Vermutung woran es liegt. Wir melden uns, wenn wir hier was neues haben.


Gruß

Niko
Kein Problem! ;)

Ich habe ebenfalls ein kleines Skript erstellt, welches automatisch zu einem entfernten Host verbindet und die alte (funktionierende) Config wiederherstellt & anschließend den Agenten neustartet. Es benutzt das Tool "volrest" aus dem Windows Server 2003 Ressource Kit sowie "PsExec" von SysInternals

Benutzung: fixopsi.bat <computername>

Skript muss unter demselben Benutzer ausgeführt werden, der auch auf dem entfernten Host dieselben Rechte besitzt; idealerweise der Domänenadministrator

Viel Erfolg :)

http://www.file-upload.net/download-108 ... i.zip.html

MfG Damien
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: No JSON object could be decoded

Beitrag von n.wenselowski »

Hallo,

Danke für das Script, Damien!
Zur Rettung muss tatsächlich "nur" die Config-Datei aktualisiert werden. Je nach Umgebung kann das auf unterschiedliche Art und Weise geschehen, sowas wie ein Redeploy mittels Deploy-Script sollte dabei auch klappen.

Falls sich meine Vermutung bewahrheitet, dann ist das Problem dass der shutdown starter die Config-Datei ausliest aber nicht wieder ordentlich schließt, bevor die durch ihn angestoßene Installation auf sie zugreifen will. Das ist bei allen anderen Produkten kein Problem, aber sobald er sich selbst aktualisiert haben wir den Salat.
Es gibt hier eine experimentelle Version des opsi-client-agent, bei welchem ein überarbeiteter shutdown starter integriert ist. Falls ihr eine Test-Umgebung zur Verfügung habt, würde ich euch bitten zu testen, ob damit das Problem auch bei euch gelöst ist.
Da, wie festgestellt, die Installation beim Shutdown bei der vorigen Version nicht ohne Probleme war, sollte die Installation über ein anderes Event (gui_startup, on_demand, ...) erfolgen. Anschließend sollte der opsi-client-agent auch ohne weitere Probleme beim Shutdown installiert werden können. Für weitere Analyse wird diese Version auch ein weiteres Logfile in C:\opsi.org\log ablegen - hoffentlich werde ich es nicht brauchen ;)
Ich würde mich über Feedback freuen!


Viele Grüße

Niko

Code: Alles auswählen

import OPSI
damien.leviet
Beiträge: 110
Registriert: 24 Feb 2014, 11:30

Re: No JSON object could be decoded

Beitrag von damien.leviet »

n.wenselowski hat geschrieben:Hallo,

Danke für das Script, Damien!
Zur Rettung muss tatsächlich "nur" die Config-Datei aktualisiert werden. Je nach Umgebung kann das auf unterschiedliche Art und Weise geschehen, sowas wie ein Redeploy mittels Deploy-Script sollte dabei auch klappen.

Falls sich meine Vermutung bewahrheitet, dann ist das Problem dass der shutdown starter die Config-Datei ausliest aber nicht wieder ordentlich schließt, bevor die durch ihn angestoßene Installation auf sie zugreifen will. Das ist bei allen anderen Produkten kein Problem, aber sobald er sich selbst aktualisiert haben wir den Salat.
Es gibt hier eine experimentelle Version des opsi-client-agent, bei welchem ein überarbeiteter shutdown starter integriert ist. Falls ihr eine Test-Umgebung zur Verfügung habt, würde ich euch bitten zu testen, ob damit das Problem auch bei euch gelöst ist.
Da, wie festgestellt, die Installation beim Shutdown bei der vorigen Version nicht ohne Probleme war, sollte die Installation über ein anderes Event (gui_startup, on_demand, ...) erfolgen. Anschließend sollte der opsi-client-agent auch ohne weitere Probleme beim Shutdown installiert werden können. Für weitere Analyse wird diese Version auch ein weiteres Logfile in C:\opsi.org\log ablegen - hoffentlich werde ich es nicht brauchen ;)
Ich würde mich über Feedback freuen!


Viele Grüße

Niko
Morgen Niko,

erstmal vielen Dank für deine Bemühungen :)

Ich habe den Agenten zunächst via on_demand auf einem Testclient installieren lassen und anschließend neugestartet.

Danach habe ich den Agenten nochmal via on_shutdown installieren lassen - Ergebnis:

ES FUNKTIONIERT :)

Aus reiner Neugier: was war jetzt passiert?


MfG Damien
Zuletzt geändert von damien.leviet am 08 Sep 2015, 10:56, insgesamt 1-mal geändert.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: No JSON object could be decoded

Beitrag von n.wenselowski »

Hi Damien,

dann hat beim Packen irgendwas nicht geklappt. Melde mich gleich noch mal!


Gruß

Niko

Code: Alles auswählen

import OPSI
Antworten