arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change hostname error
#1
Hello guys
While setting the hostname, i.e., on issuing: 

hostnamectl set-hostname example.com 

it says: 
Could not set property: Message recipient disconnected from message bus without replying

and on running: 

systemctl status systemd-hostnamed

I got this in the logs:

Dec 07 05:56:04 kvm-Post4VPS-Atlanta systemd-hostnamed[16352]: Failed to read hostname and machine information: Permi...nied
which I feel is basically 'Permission denied'. 

Never experienced this when my VPS was on OVZ...Could anyone help me? Thanks in advance.

Regards,
Sayan Bhattacharyya,

Heartiest thanks to Post4VPS and Virmach for my wonderful VPS 9!
#2
Could you try to run the command below and after that try again to set your hostname.

restorecon /etc/machine-info

What is restorecon: https://linux.die.net/man/8/restorecon

Report back please.
[Image: zHHqO5Q.png]
#3
When I run that command, this is what I get -

Quote:[root@kvm-Post4VPS-Atlanta ~]# restorecon /etc/machine-info
restorecon: lstat(/etc/machine-info) failed: No such file or directory

Thanks for the quick reply.

Regards,
Sayan Bhattacharyya,

Heartiest thanks to Post4VPS and Virmach for my wonderful VPS 9!
#4
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.
[Image: zHHqO5Q.png]
#5
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. Big Grin

Regards,
Sayan Bhattacharyya,

Heartiest thanks to Post4VPS and Virmach for my wonderful VPS 9!
#6
Agreed with @Sohamb03  I also think this should be stickied for future use by other mortals like me. Wink
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  
lockThread Closed 


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
8,794
02-24-2021, 07:17 AM
Last Post: Pacific Spirit
2,139
11-27-2020, 02:53 AM
Last Post: Rehan
11,311
06-17-2020, 04:32 PM
Last Post: Mashiro
2,466
06-11-2020, 06:31 PM
Last Post: rudra

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting