Troubleshoot "agent not connected"
Follow the steps below to trouble shoot an agent that doesn't connect.

Check the log file

If you have installed the agent but you don't get data from your host on my.cloudradar.io first check the log file for errors.
    On Windows inspect C:\Program Files\cagent\cagent.log.
    On Linux look at /var/log/cagent/cagent.log.
If you get authorization errors (401/403) the hub_user and the hub_password settings are not correct. See below how to fix it.

Check your connectivity

If you get errors during the installation about the agent being unable to connect, check you connectivity to our servers.
On Windows execute this lines in a PowerShell
1
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
2
$url="https://hub.cloudradar.io/ctrapper/"
3
Invoke-WebRequest -Uri $url
Copied!
Getting Invoke-WebRequest : {"error":"Unauthorized. "} is expected and correct. Getting Invoke-WebRequest : The remote name could not be resolved is not expected and not correct. Check your DNS settings or the proxies you might use.
On Linux use curl
1
$ curl https://hub.cloudradar.io/ctrapper/
2
{"error":"Unauthorized. "}
Copied!

Check the process

Is the agent process cagent running? On windows open the task manager and look for cagent.exe. On Linux look at the process list for example ps aux|grep cagent.
If the process is not running, start the agent using the Windows Service manager or Systemd on Linux systemctl start cagent. For old CentOS6 systems, follow this instructions. Check again the process is running. If not proceed with the next steps.
Agent restart on Windows

On Linux

On Linux use systemctl status cagent. This might give a hint why the process is not starting. Also check the log of the agent with cat /var/log/cagent/cagent.log. If this is not helpful or the log file doesn't exist, the installation has failed completely. Start the installation again. Pay attention to errors during the installation process. If the installation fails on Ubuntu, follow these steps.

On Windows

Open the log file C:\Program Files\cagent\cagent.log with a text editor, like notepad++ . (Do not use a text processor like MS Word.) This might give you a hint, why the process is not starting.
If you don't have a folder C:\Program Files\cagent the installation has failed completely. Install the agent again. If the MSI package installs but the first start of the agent hangs, follow these steps to solve it.

Check your configuration

We provide a copy and paste installer that creates the configuration automatically for you. But rarely it fails and you end up with a default configuration not suitable for your server. Open the configuration file with an editor, /etc/cagent/cagent.conf on Linux, C:\Program Files\cagent\cagent.conf on Windows. Compare the content with the configuration generated for that specific host on my.cloudradar.io. If it doesn't match, change your configuration manually with the editor.
Compare the generated configuration ...
... with the local running version.
Always restart the agent after any change to the configuration file.

Start the agent manually from a console

If all the above has not give a hint, and if the configuration file is correct, start the agent manually from a console to inspect potential error messages.

On Windows

Open a cmd.exe console as Administrator. Change the directory with cd "C:\Program Files\cagent" and execute cagent.exe. Inspect the messages on the console.
Starting the agent from a Windows console.
If nothing happens and the console seems to be blocked, the agent runs. Leave the console open and check the log file. If you don't get errors there and if the agent is now connected on my.cloudradar.io there is a problem with the windows service and not with the agent itself. Please contact the support.

On Linux

Do not run the agent manually from a root-shell!
The agent runs under an unprivileged user called cagent. Switch to this user first by executing
su - cagent -s /bin/bash. Ignore messages about a missing home directory. Execute cagent now.
Starting the agent from a Linux console
If this doesn't throw errors and your agent is now connected, the Systemd service is failing. Please contact the support.

Contact Support

If all the above couldn't help to connect the agent, contact our support team. Login to my.cloudradar.io, click on "Learn and Support" on the main menu and file a support request. Please specify which operating system is affected.
Last modified 1yr ago