Bug 914992
Summary: | Problems setting hostname via hostnamectl after fresh install of F18 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tim Wegener <twegener> |
Component: | systemd | Assignee: | systemd-maint |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 18 | CC: | alick9188, chaitu2k6, johannbg, lnykryn, metherid, msekleta, notting, plautrba, systemd-maint, vpavlin, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | systemd-201-2.fc18.6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-05-16 02:56:25 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tim Wegener
2013-02-23 22:34:46 UTC
BTW, hostnamectl worked fine on another machine after installing F18 there. In both cases I installed from the LXDE LiveCD spin. (In reply to comment #0) ... > [root@unknown001f3c05ec2b ~]# hostnamectl set-hostname abc > Failed to issue method call: Did not receive a reply. Possible causes > include: the remote application did not send a reply, the message bus > security policy blocked the reply, the reply timeout expired, or the network > connection was broken. > > (Again, there is a long pause before that message is displayed.) Note that despite that message it does create /etc/machine-info with the contents 'PRETTY_HOSTNAME=abc'. [root@unknown001f3c05ec2b ~]# ls -Z /etc/machine-info -rw-r--r--. root root system_u:object_r:etc_t:s0 /etc/machine-info Similarly, with the '--static' option: [root@unknown001f3c05ec2b ~]# hostnamectl set-hostname --static abc Failed to issue method call: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. ...but it does update /etc/hostname with contents 'abc'. this should be fixed in systemd git, where we explicitly relabel the files we create from hostnamed. systemd-201-2.fc18.1 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/systemd-201-2.fc18.1 Package systemd-201-2.fc18.2: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.2' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.2 then log in and leave karma (feedback). Package systemd-201-2.fc18.4: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.4' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.3 then log in and leave karma (feedback). Package systemd-201-2.fc18.5: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.5' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.5 then log in and leave karma (feedback). systemd-201-2.fc18.6 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.6 Package systemd-201-2.fc18.6: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.6 then log in and leave karma (feedback). systemd-201-2.fc18.6 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. Folks, these answers are not helpful and there are multiple other bugs opened for the same issue. Below is the fix that worked for me. from the below output of systemctl status command, I noticed that /tmp was not mounted with proper acls. sudo-sh[root@myhost]# hostnamectl set-hostname --static $dnsname Could not set property: Connection timed out sudo-sh[root@myhost]# hostnamectl set-hostname poc-rhel-cassandra-b1 Could not set property: Failed to activate service 'org.freedesktop.hostname1': timed out sudo-sh[root@myhost]# systemctl status systemd-hostnamed ● systemd-hostnamed.service - Hostname Service Loaded: loaded (/usr/lib/systemd/system/systemd-hostnamed.service; static; vendor preset: disabled) Active: inactive (dead) Docs: man:systemd-hostnamed.service(8) man:hostname(5) man:machine-info(5) http://www.freedesktop.org/wiki/Software/systemd/hostnamed Sep 19 13:52:53 myhost systemd[1]: Dependency failed for Hostname Service. Sep 19 13:52:53 myhost systemd[1]: Job systemd-hostnamed.service/start failed with result 'dependency'. Sep 19 13:54:02 myhost systemd[1]: Dependency failed for Hostname Service. Sep 19 13:54:02 myhost systemd[1]: Job systemd-hostnamed.service/start failed with result 'dependency'. Sep 19 13:55:18 myhost systemd[1]: Dependency failed for Hostname Service. Sep 19 13:55:18 myhost systemd[1]: Job systemd-hostnamed.service/start failed with result 'dependency'. sudo-sh[root@myhost]# systemctl restart systemd-hostnamed A dependency job for systemd-hostnamed.service failed. See 'journalctl -xe' for details. sudo-sh[root@myhost]# journalctl -xe -- Unit user-0.slice has finished shutting down. Sep 19 13:56:01 myhost systemd[1]: Stopping User Slice of root. -- Subject: Unit user-0.slice has begun shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit user-0.slice has begun shutting down. Sep 19 13:56:03 sudo-sh[12198]: ec2-user : HOST=myhost : TTY=pts/0 ; PWD=/home/ec2-user ; USER=root ; SUDO-SH-COMMAND=systemctl Sep 19 13:56:29 sudo-sh[12199]: ec2-user : HOST=myhost : TTY=pts/0 ; PWD=/home/ec2-user ; USER=root ; SUDO-SH-COMMAND=systemctl Sep 19 13:56:29 polkitd[624]: Registered Authentication Agent for unix-process:12199:22680 (system bus name :1.39 [/usr/bin/pkttyagent -- Sep 19 13:56:29 systemd[1]: Mounting /var/tmp... -- Subject: Unit var-tmp.mount has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit var-tmp.mount has begun starting up. Sep 19 13:56:29 mount[12205]: mount: /tmp is not a block device Sep 19 13:56:29 systemd[1]: var-tmp.mount mount process exited, code=exited status=32 Sep 19 13:56:29 systemd[1]: Failed to mount /var/tmp. -- Subject: Unit var-tmp.mount has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit var-tmp.mount has failed. -- -- The result is failed. Sep 19 13:56:29 systemd[1]: Dependency failed for Hostname Service. -- Subject: Unit systemd-hostnamed.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit systemd-hostnamed.service has failed. -- -- The result is dependency. Sep 19 13:56:29 systemd[1]: Job systemd-hostnamed.service/start failed with result 'dependency'. Sep 19 13:56:29 systemd[1]: Unit var-tmp.mount entered failed state. Sep 19 13:56:29 polkitd[624]: Unregistered Authentication Agent for unix-process:12199:22680 (system bus name :1.39, object path /org/fre Sep 19 13:56:36 sudo-sh[12207]: ec2-user : HOST=myhost : TTY=pts/0 ; PWD=/home/ec2-user ; USER=root ; SUDO-SH-COMMAND=journalctl to resolve this issue, I edited /etc/fstab and changed the /tmp acls. Before #/tmp /var/tmp auto rw,nodev,nofail,nosuid,relatime 0 0 After /tmp /var/tmp auto bind 0 0 make sure to make a copy of your original fstab file before editing, then restart the server. Now hostname service started fine. sudo-sh[root@myhost]# systemctl status systemd-hostnamed ● systemd-hostnamed.service - Hostname Service Loaded: loaded (/usr/lib/systemd/system/systemd-hostnamed.service; static; vendor preset: disabled) Active: inactive (dead) Docs: man:systemd-hostnamed.service(8) man:hostname(5) man:machine-info(5) http://www.freedesktop.org/wiki/Software/systemd/hostnamed Sep 19 14:16:45 systemd[1]: Starting Hostname Service... Sep 19 14:16:45 systemd[1]: Started Hostname Service. Also hostnamectl set-hostname command worked as expected. sudo-sh[root@myhost]# dnsname=`ifconfig eth0|grep netmask|awk '{print $2}'|while read addr; do host $addr|awk '{print $NF}'|sed 's/.$//'; done` sudo-sh[root@myhost]# hostnamectl set-hostname --static $dnsname sudo-sh[root@myhost]# hostnamectl status|grep Static Static hostname: poc-rhel-cassandra-b1 |