After system reboot the system hostname is no longer displayed a FQDN

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.1
Webmin version 2.001
Virtualmin version 7.2-1
Perl version 5.034000
Path to Perl /usr/bin/perl
Python version 3.10.6
Path to Python /bin/python3
BIND version 9.18
Postfix version 3.6.4
Mail injection command /usr/lib/sendmail -t
Apache version 2.4.52
PHP versions 8.1.2
Logrotate version 3.19.0
MariaDB version 10.6.7
SpamAssassin version 3.4.6

On installation and reboots, the System hostname FQDN of the system shows as
“host…”
instead of
“host.domain.tld”

What I thought was the issue since doing this fixed it was since the installer did not add the 127.0.0.1 to the List of DNS servers (in front of the other public DNS servers or course) upon installation, but the issue comes back when rebooting the server. I have 4 servers that I am setting up at the same time and they all do the same thing.

Upon reboot editing the DNS servers, and removing and re-adding the loopback address fixes the issue, but it is a bit of a hassle having to do this on reboot, and I wanted to post this here since this might be causing other issues.

The first issue I noticed related to this was a part of the installer, one of the last steps set to create the FQDN, only pre-fills “host…” instead of the entire FQDN.

Another issue I had to correct was in Webmin > Servers > Postfix Mail Server > General Options > What domains to receive mail for. I had to remove the “…” in “Host…”

I do not know if there are any other issues this could be causing but wanted to let you know.

The above issue happens on a clean-up to date minimal install with only Open-SSH server installed outside of the base Ubuntu 22.04 clean install, all up to date, static IP address, set hosts file as I have always done.

I have done this 3 times and it has happened each time. I thought on the last time adding the missing loopback would fix the issue [before beginning the instillation of Virtualmin] (in front of the other public DNS servers or course), but it appears to be a deeper issue.

Another issue, in Virtualmin > Server Configuration > DNS Records, If I need to change IP addresses and I uncheck the Validate Records, it still gives me an error due to validation error. So it is not ignoring validation like I am asking.

In other news, I would love to know what happened to Virtualmin > Limits and Validation > FTP Directory Restrictions.

I cannot find it anywhere.

I do hope this is enough information, please let me know if you need any more information.

Hello,

Before rebooting the server what is the output of hostnamectl | grep hostname command? Also, what is the output of the same command after rebooting the server?

For all other issues please create separate tickets. The rule is – one subject one ticket.

before:
root@host:/# hostnamectl | grep hostname
Static hostname: host

after:
root@host:/# hostnamectl | grep hostname
Static hostname: host

Something I just noticed this editor “helping” with.

The wrong host has two .'s after it, not 3 like the editor is editing my post to show.
“host. .” (without the spaces between the dots) not “host…” Please re-look at the opening post in raw to see my intent.

The forum uses markdown. So, you can put backticks (`) around text that should appear unformatted. Or, for multiline sections, use (```) at the top and bottom.

It makes it easier to differentiate interactions in the shell versus commentary, too, as it appears in a different font, and for triple-backtick sections, it also has a slightly different background color.

@Jamie, do you mind if net::save_hostname sub for Debian library would also use hostnamectl set-hostname command to set hostname?

@a10sth You can manually set the hostname using hostnamectl set-hostname fqdn command.

This is not only on reboot it was after a fresh install as well, I started this since there were underlying issues from this issue. The postfix configuration is one of them along with when rebooting the FQDN not sticking, I wanted to be sure there were no other issues due to this one. I was hoping that host.. would have given you the information you needed. I am more than happy to give you access to any of the servers I have running, they are on their own test network, outside of my production network right now.

I wanted to bring this to your attention in case it was breaking anything else besides postfix. I have not gone live with this server until I am aware if there are any further issues this issue is causing.

and thank you Joe for pointing out how to keep text from being changed.

Thanks,

I looked at this on my existing production 20.04 server and the value you are asking me to change is set to only the hostname on the production server, not the FQDN

I am not having, nor have I had any issues with the FQDN on my existing install.

@a10sth If you set the hostname using using hostnamectl set-hostname fqdn command and reboot the server – does it get reset to non FQDM?

Yes, that seems to fix the FQDN shown on the dashboard, but please answer this, why would this hostname need to be changed from the hostname of the system to the FQDN when it did not have to be in the past? The further question still remains, any configurations that have been set (like the postfix) how will I know what needs to be updated at this point?

Speaking of the postfix issue that this caused, the postfix had the correct FQDN already set, but the hostname had the extra 2 dots at the end of it.

I am sorry, I don’t quite understand what is happening wrong on your system. Are you assuming that Virtualmin changes the hostname on its own after the reboot? If so, Virtualmin doesn’t do it.

The further question still remains, any configurations that have been set (like the postfix) how will I know what needs to be updated at this point?

It could be quickly checked by running the following command:

grep -Rs oldhostname /etc

You should provide the screenshots, command and/or error outputs, as it isn’t very clear what you’re referring to, and what the actual problem is.

I will do that, but it will be a little later, the rest of my day is packed, and will not be able to get back to this until Wednesday at the earliest.

I will create a video of the issues and post it on Youtube as a fresh install (not the whole install process mind you, unless that is what you want.) since I actually have 3 more of these to create anyway.

Thank you,

Sure, that sounds good to me!

This will be fixed on the next Webmin release.

https://github.com/webmin/webmin/commit/7c301848cbc097d299bcb0f551fe27de2fecac28

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.