Management Agent -Agent upgrade stuck forever, restart service still same error
Symptom
Upgrade Management Agent, from client log we see upgrade success, but starting service seems stuck front end, log has following:
"msg":"failed to wait for task configuration","appName":"management-agent","ConnectorId":"ManagementAgent_xxx","err":"timeout waiting for task configuration"}
"msg":"failed starting managementEngine","appName":"management-agent","err":"timeout waiting for task configuration"}
Environment
Privilege Cloud Connector Management Connector Management Agent Upgrade
Cause
session seems get stuck.
Resolution
First restart: try to restart the agent without adding clean_session.
If after the restart the agent becomes active again, great, no further action is needed.
If the agent remains in status INITIALIZING - please restart it again, this time with a clean session:
Go to the ManagementAgent directory.
Open the file client_id.json.
Do not overwrite the existing content, simply add the clean_session field to the existing JSON.
For example, if the file currently looks like this:
{
"thing_id": "ManagementAgent_[UUID4]",
"iot_endpoint": "X"
}
You should modify it to:
{
"thing_id": "ManagementAgent_[UUID4]",
"iot_endpoint": "X",
"clean_session": true
}
Restart the agent.
Once it starts properly, remove the clean_session entry from the file and restart the agent again to restore the original configuration.