# Id is already in use

### What is the "id" and why must it be unique?

All clients are identified by an id. During the client installation, the id is written to the `rport.conf` file. This id can be any string. Operating system create a worldwide unique id for each system during the installation process.

The rport pairing script takes the id of the operating system and inserts it to the `rport.conf` file.

On Linux the id is taken from `/etc/machine-id` or a hash of all mac addresses is created, if the machine-id file is missing.&#x20;

On Windows the computer system UUID is used. `Get-CimInstance -Class Win32_ComputerSystemProduct).UUID`

Re-using existing identifiers creates a consistent view of your inventory. But you can use other identifiers if you want.

![Id of the rport client](/files/MREcXE0vCMa4zHsVnc7X)

### What causes duplicate ids?

Duplicate ids are almost always caused by system cloning. Either you have cloned a system with the rport client already installed, or after cloning, you have not created a new machine-id.&#x20;

You will get an error like the below in the `rport.log`.

`client: Connection error: client id "1234abc" is already in use`

☝️ The problem is largely limited to Linux because Windows identifies it has been cloned, and a new UUID is created automatically.

### How to solve the issue?

#### 😬 Quick and dirty

You can edit the `rport.conf` with an editor and insert a [randomly created UUID](https://www.uuidgenerator.net/). Restart the client and it will connect flawlessly.

#### 🧡 Properly

Having systems with duplicate machine-ids on a local network is not a good idea. It can cause other issues. First reset the machine id of the operating system, reboot and copy the new id from `/etc/machine-id` and insert it into the `rport.conf`.&#x20;

📖 [Reset machine id on Ubuntu](https://manpages.ubuntu.com/manpages/xenial/man1/systemd-machine-id-setup.1.html)\
📖 [Reset machine id on Debia](https://wiki.debian.org/MachineId)[n](https://wiki.debian.org/MachineId)\
📖 [Reset machine id on RHEL, CentOS, Rocky etc.](https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/)

{% hint style="info" %}
Starting with rport 0.6.0 the client can dynamically read the systemd id on start. That eliminates the need of copying `/etc/machine-id` to `rport.conf`. But it doesn't liberate you from the duty of creating unique machine ids on your network.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.rport.io/need-help/troubleshoot-common-problems/id-is-already-in-use.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
