# Querying the Collector TCP connection status

## Windows Collector <a href="#queryingthecollectortcpconnectionstatus-windowscollector" id="queryingthecollectortcpconnectionstatus-windowscollector"></a>

To query the status of the TCP connection between the Collector and the Nexthink instance for a particular device, run the Collector Configuration Tool on the device as follows:

`nxtcfg.exe /g tcp_status`

The Collector Configuration Tool queries the Nexthink Coordinator service, which is the [component of the Collector](https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/deploying-nexthink-in-non-vdi-environment/installing-collector/managing-collector-agents/broken-reference) that is responsible for the TCP connection.

## Mac Collector <a href="#queryingthecollectortcpconnectionstatus-maccollectormac-collector" id="queryingthecollectortcpconnectionstatus-maccollectormac-collector"></a>

To query the status of the TCP connection between the Mac Collector and the Nexthink instance, open the command-line interface on your macOS device and type in:

`grep -i "tcp-status" /Library/Application\ Support/Nexthink/config.json`

## Error messages <a href="#queryingthecollectortcpconnectionstatus-errormessages" id="queryingthecollectortcpconnectionstatus-errormessages"></a>

The following table shows the possible output messages along with their description. The messages that start with a timestamp are retrieved from the Coordinator service. On the other hand, messages that start without a date come directly from the Collector Configuration Tool:

<table data-full-width="true"><thead><tr><th>Message</th><th>Definition</th></tr></thead><tbody><tr><td><strong>[ERROR] Nexthink Coordinator service is not installed</strong></td><td>The Coordinator is not found in the device. No TCP connection is established.</td></tr><tr><td><strong>[ERROR] Nexthink Coordinator service can not be queried</strong></td><td>The Coordinator is momentarily not able to respond to the query.</td></tr><tr><td><strong>[ERROR] Unknown</strong></td><td>There was an unknown error while trying to get the status of the TCP connection from the Coordinator.</td></tr><tr><td><strong>[INFO] Nexthink Coordinator service is stopped</strong></td><td>The Coordinator service is installed but not running. No TCP connection is established.</td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [INFO] Initializing connection</strong></td><td>The Coordinator is starting and attempting to establish a TCP connection with the Nexthink instance.</td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [INFO] Connected</strong></td><td>The Coordinator established a TCP connection with the Nexthink instance.</td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [INFO] Disconnected</strong></td><td>The Coordinator was disconnected from the Nexthink instance and is actively waiting for a new assignment.</td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [ERROR] Protocol failure</strong></td><td>There is a version mismatch between the Collector and the Nexthink instance.</td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [ERROR] Customer Key issue</strong></td><td>There is a mismatch between the Customer Key in the Collector and that of the Nexthink instance.</td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [ERROR] Certificate issue</strong></td><td><p>There is an issue with the certificate validation. Probable causes:</p><ul><li>The root CA used to sign the certificate was not deployed with the Collector installer or the root CA was not added to the Windows <em>Trusted root certification authorities</em>.</li><li>The address of the Nexthink instance that is configured in Collector does not match the address defined in the subject of the certificate.</li></ul></td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [ERROR] Host not found</strong></td><td>The DNS name or IP address of the Nexthink instance configured in the Collector designates a host that is not found in the network.</td></tr><tr><td><strong>[MM/DD/YY hh:mm:ss] [ERROR] TCP connection failure:&#x3C;number></strong></td><td><p>Returns an</p><p><a href="https://doc.qt.io/qt-6/qabstractsocket.html#errorOccurred">error code from the underlying implementation</a> that indicates the reason for the failure.</p><p>The most common error is <em>[ERROR] TCP connection failure: 0</em>. It indicates that the host exists, but the Collector cannot connect to the indicated TCP port.</p></td></tr></tbody></table>
