12-07-2019, 11:36 AM
Looks to be like a systemd bug that basically affects various distributions using systemd (RHEL, CentOS, ArchLinux, etc...).
Take a look at this bug report on RHEL: https://bugzilla.redhat.com/show_bug.cgi?id=1501193
Exactly the same issue. I'm not entirely sure but you could try the attempt fix at comment 12: https://bugzilla.redhat.com/show_bug.cgi?id=1501193#c12
Alternatively if you want I can take a look. Shoot me a PM.
After getting access to the VPS I looked into the issue and it looks like SELinux was the issue. It wouldn't allow to change the hostname. When I disabled it temporarily I could change the hostname. After a reboot I tried again and got the same error. I disabled it permanently by setting SELINUX to disabled in /etc/selinux/config.
The hostname can now be changed properly without any errors.
Take a look at this bug report on RHEL: https://bugzilla.redhat.com/show_bug.cgi?id=1501193
Exactly the same issue. I'm not entirely sure but you could try the attempt fix at comment 12: https://bugzilla.redhat.com/show_bug.cgi?id=1501193#c12
Alternatively if you want I can take a look. Shoot me a PM.
After getting access to the VPS I looked into the issue and it looks like SELinux was the issue. It wouldn't allow to change the hostname. When I disabled it temporarily I could change the hostname. After a reboot I tried again and got the same error. I disabled it permanently by setting SELINUX to disabled in /etc/selinux/config.
The hostname can now be changed properly without any errors.
![[Image: zHHqO5Q.png]](https://i.imgur.com/zHHqO5Q.png)