![]() |
Change hostname error - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion) +--- Forum: VPS Support (https://post4vps.com/Forum-VPS-Support) +--- Thread: Change hostname error (/Thread-Change-hostname-error) |
Change hostname error - Sn1F3rt - 12-07-2019 Hello guys While setting the hostname, i.e., on issuing: Code: hostnamectl set-hostname example.com it says: Code: Could not set property: Message recipient disconnected from message bus without replying and on running: Code: systemctl status systemd-hostnamed I got this in the logs: Code: Dec 07 05:56:04 kvm-Post4VPS-Atlanta systemd-hostnamed[16352]: Failed to read hostname and machine information: Permi...nied Never experienced this when my VPS was on OVZ...Could anyone help me? Thanks in advance. Regards, RE: Change hostname error - Mashiro - 12-07-2019 Could you try to run the command below and after that try again to set your hostname. Code: restorecon /etc/machine-info What is restorecon: https://linux.die.net/man/8/restorecon Report back please. RE: Change hostname error - Sn1F3rt - 12-07-2019 When I run that command, this is what I get - Quote:[root@kvm-Post4VPS-Atlanta ~]# restorecon /etc/machine-info Thanks for the quick reply. Regards, RE: Change hostname error - Mashiro - 12-07-2019 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. RE: Change hostname error - Sn1F3rt - 12-07-2019 Well this guy is the real problem solver. Amazing work. He magically fixed my VPS when I was confused on even how to proceed. Thanks a ton @"Hidden Refuge". Your help is much appreciated. Also, as he's posted the fix it'll help anyone facing the same problem in the future. Thanks again HR. ![]() Regards, RE: Change hostname error - deanhills - 12-08-2019 Agreed with @Sohamb03 I also think this should be stickied for future use by other mortals like me. ![]() |