Machine name error

Questions about WAPT Server / Requests and help related to the WAPT server
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Answer
gavit
Messages: 25
Registration: Apr 30, 2020 - 4:21 p.m.

October 22, 2025 - 2:43 PM

Good morning,

We are currently experiencing an issue with some Ubuntu 24.04 machines appearing twice in the WAPT console.

Our WAPT configuration uses the FQDN as the machine UUID (use_fqdn_as_uuid=1).
However, we observe that some posts initially appear with the correct UUID (corresponding to the machine name), then reappear with a different UUID or name.
Untitled.png
Untitled.png (119.6 KB) Viewed 19452 times
It appears that this behavior varies depending on the network used — for example, when the machines are connected via VPN or on another network.

Do you have any suggestions or recommendations to avoid these duplicates?

Sincerely,
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 22, 2025 - 8:39 PM

Hello,

the machine column is actually "computer_fqdn"

which uses the internal Python socket library, specifically the getfqdn function

(https://docs.python.org/3/library/socke ... et.getfqdn).

The function should return an FQDN, but apparently in this case it doesn't.

Wapt also reads the keytab; if /etc/krb5.keytab exists, it extracts the FQDN from the keytab.

So, if the machine is on the domain, there shouldn't be any problem.

In the hardware inventory, what value does "computer_name" return?

If there's a "." in /etc/hostname, it should take the value indicated there. Otherwise, getfqdn tries something else.
gavit
Messages: 25
Registration: Apr 30, 2020 - 4:21 p.m.

October 23, 2025 - 09:23

Good morning,

Our Ubuntu users are not on the domain.
Therefore, the file /etc/krb5.keytab does not exist.

The /etc/hostname file does indeed contain the machine name without the "."
On the WAPT side, the "computer_name" is correct!
Screenshot 2025-10-23 091322.png
Screenshot 2025-10-23 091322.png (33.72 KB) Viewed 19372 times
Screenshot 2025-10-23 091021.png
Screenshot 2025-10-23 091021.png (11.47 KB) Viewed 19372 times
Sincerely
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 23, 2025 - 2:27 PM

Hmm

. Since there's no period (.) in the hostname and no keytab, the function performs a reverse IP address resolution to find a fully qualified domain name (FQDN). And that's where it responds (apparently the SFR box).

In the code, we should reject the proposed FQDN if it doesn't start with the hostname. This could be a solution to avoid incorrect retrieval. And therefore, no FQDN.

Otherwise, on your end, you should add a period (.) to the hostname so it becomes an FQDN (at least a name like "Hello" mycomputer.local).
gavit
Messages: 25
Registration: Apr 30, 2020 - 4:21 p.m.

October 23, 2025 - 5:23 PM

Is there no way to use the computer_name?

Is there no way to use the /etc/hosts file to retrieve the machine name in WAPT?
Yet when we try the command dig -x PC-IP, we don't get the same information as in WAPT.

Why does it work for 95% of PCs and not for 10-15 PCs, even though all the configurations are identical?
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 23, 2025 - 5:49 PM

gavit wrote: Oct 23, 2025 - 5:23 PM Is there no way to use the computer_name?
If there is a "." in the hostname, it should indeed use hostname.

So /etc/hostname has a "." in your case?
gavit
Messages: 25
Registration: Apr 30, 2020 - 4:21 p.m.

October 24, 2025 - 09:22

There are no periods (.) in any of our /etc/hostname files on our Ubuntu PCs.
That's why I find it strange that it doesn't affect all PCs.

If I modify the hostname file, do I just need to restart the WAPT service on the PC and run `register` to get the new entry in the WAPT console?
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

October 24, 2025 - 10:27

Hi Gaëtan,

retrieving a hostname isn't as straightforward as it seems when you consider all the possible scenarios on each operating system, and even more so when you're dealing with multiple operating systems and Linux distributions. In the old days, we mainly relied on socket.getfqdn(), but the problem is that if things aren't configured correctly, you get a reverse DNS lookup, which in the case of reverse IPv6 gives the impression of having a GUID. :-)

We'll look into completely removing the calls to socket.getfqdn().

For now, as you suggested, changing /etc/hostname to a fully qualified domain name (FQDN) should do the trick.

Best regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Answer