The cloud may have different credentials already registered for this agent ID and it cannot be reclaimed under different credentials for security reasons. If you are unable to connect use -id=$(uuidgen) to overwrite this agent ID with a fresh value if the original credentials cannot be restored.
Failed to claim node with the following error message:“already claimed”
FAILED
I deleted cloud.d directory from /var/lib/netdata/
and I did launch command with -id=$(uuidgen) like this:
Could you please share the logs of your latest attempt? Does the “already claimed” message still appear after you deleted the /var/lib/netdata/cloud.d/ directory?
Yes I deleted cloud.d directory but still I got the same message.
I got this from error.log
2021-10-19 12:20:53: netdata INFO : MAIN : COMMAND: Reloading Agent Claiming configuration.
2021-10-19 12:20:53: netdata INFO : MAIN : File '/var/lib/netdata/cloud.d/claimed_id' was found. Setting state to AGENT_CLAIMED.
2021-10-19 12:20:53: netdata INFO : MAIN : COMMAND: Sending reply: "X0"
2021-10-19 12:20:53: netdata INFO : MAIN : Command Clients = 0
2021-10-19 12:20:59: netdata INFO : ACLK_Main : Wait before attempting to reconnect in 0.000 seconds
2021-10-19 12:20:59: netdata INFO : ACLK_Main : Attempting connection now
2021-10-19 12:20:59: netdata INFO : ACLK_Stats : thread created with task id 19752
2021-10-19 12:20:59: netdata INFO : ACLK_Stats : set name of thread 19752 to ACLK_Stats
2021-10-19 12:20:59: netdata INFO : ACLK_Main : HTTPS "GET" request to "app.netdata.cloud" finished with HTTP code: 200
2021-10-19 12:20:59: netdata INFO : ACLK_Main : Getting Cloud /env successful
2021-10-19 12:20:59: netdata INFO : ACLK_Main : HTTPS "GET" request to "app.netdata.cloud" finished with HTTP code: 409
2021-10-19 12:20:59: netdata ERROR : ACLK_Main : ACLK_OTP Challenge HTTP code not 200 OK (got 409)
2021-10-19 12:20:59: netdata ERROR : ACLK_Main : Cloud returned EC="TODO trace-id", Msg-Key:"ErrAlreadyConnected", Msg:"node already connected", BlockRetry:false, Backoff:0s (-1 unset by cloud)
2021-10-19 12:20:59: netdata ERROR : ACLK_Main : Error passing Challenge/Response to get OTP
2021-10-19 12:20:59: netdata INFO : ACLK_Main : Wait before attempting to reconnect in 1.237 seconds
Could you please run an “ls -l” command on /var/lib/netdata/cloud.d after deleting the claimed_id file to verify it is actually deleted and send us the output before attempting to run the script again?
Also, please try to make sure that there are no running netdata agent process when attempting to delete this file.