Description of problem: After upgrade from F17 to F18, hostnamectl failed to add existing hostname to localhost inside /etc/hosts Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Upgrade from F17 to F18 2. 3. Actual results: When restarting httpd # tail /var/log/httpd/error_log [Mon Dec 10 10:48:36.809250 2012] [unique_id:alert] [pid 6371] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "kwetu.TELUS1603" AH00016: Configuration Failed [Mon Dec 10 10:49:46.923515 2012] [core:notice] [pid 6393] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0 [Mon Dec 10 10:49:46.926343 2012] [suexec:notice] [pid 6393] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Mon Dec 10 10:49:46.948561 2012] [unique_id:alert] [pid 6393] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "kwetu.TELUS1603" AH00016: Configuration Failed [Mon Dec 10 11:03:48.657513 2012] [core:notice] [pid 6670] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0 [Mon Dec 10 11:03:48.658666 2012] [suexec:notice] [pid 6670] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Mon Dec 10 11:03:48.682028 2012] [unique_id:alert] [pid 6670] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "kwetu.TELUS1603" AH00016: Configuration Failed Expected results: hostname should be added in localhost Additional info:
We do not want to edit /etc/hosts for hostname changes. I guess that's what nss-myhostname is for. You don't have that installed?
Yes, nss-myhostname is installed. Installed Packages nss-myhostname.x86_64 0.3-3.fc18 installed In that case, would it be nice to provide a better documentation about the change or handle the upgrade in graceful manner during upgrade? Prior to F17, httpd did not encounter the issue until recently hence error_log.
Could you attach your /etc/nsswitch.conf ?
Created attachment 661631 [details] nsswitch Here is the file. Apparently, according to the document via yum info, 'myhostname' should be added in hosts: line. It still does not explain why that did not happen during upgrade.
In addition, when restarting httpd as local server, # journalctl -n Dec 11 11:58:05 kwetu.TELUS1603 httpd[11446]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress thi Dec 11 11:58:05 kwetu.TELUS1603 systemd[1]: Starting The Apache HTTP Server... Dec 11 11:58:05 kwetu.TELUS1603 httpd[11449]: AH00557: httpd: apr_sockaddr_info_get() failed for kwetu.TELUS1603 Dec 11 11:58:05 kwetu.TELUS1603 httpd[11449]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress thi Dec 11 11:58:05 kwetu.TELUS1603 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Dec 11 11:58:05 kwetu.TELUS1603 httpd[11451]: AH00557: httpd: apr_sockaddr_info_get() failed for kwetu.TELUS1603 Dec 11 11:58:05 kwetu.TELUS1603 httpd[11451]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress thi Dec 11 11:58:05 kwetu.TELUS1603 httpd[11451]: httpd (no pid file) not running Dec 11 11:58:06 kwetu.TELUS1603 systemd[1]: Failed to start The Apache HTTP Server. Dec 11 11:58:06 kwetu.TELUS1603 systemd[1]: Unit httpd.service entered failed state
(In reply to comment #4) > Here is the file. Apparently, according to the document via > yum info, 'myhostname' should be added in hosts: line. Yes, it should. There's scriptlet in the package to do that. Do you have "yum history info ..." for the upgrade transaction? Are there any scriptlet errors recorded?
Created attachment 661746 [details] fedup debug # yum history package nss-myhostname Loaded plugins: keys, langpacks, merge-conf, presto, refresh-packagekit, remove- : with-leaves, upgrade-helper ID | Action(s) | Package ------------------------------------------------------------------------------- 1 | Dep-Install | nss-myhostname-0.3-2.fc17.x86_64 history package I attached the fedup log file.
On a clean new installation of FC18 it doesn't get added either. I had to manually add "myhostname" to the host: line in /etc/nsswitch.conf also.
Is it possible that authconfig is discarding "myhostname" when it overwrites /etc/nsswitch.conf? I'm not sure but I think Anaconda runs authconfig internally too, so that might explain why it is missing on fresh installations.
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug still exists on Fedora 20. After a fresh installation using netinst, /etc/nsswitch.conf does not contain myhostname in the hosts line. I changed my hostname using hostnamectl right after the installation and was then unable to resolve my local hostname; after adding myhostname, everything works fine. My /etc directory contains nsswitch.conf.bak which does indeed contain myhostname. There is also a file /var/lib/authconfig/last/nsswitch.conf that also contains myhostname. Judging by the timestamps, these were created during the installation and then overwritten in a later part of it. After a quick check of the authconfig code, it indeed looks like it simply does not handle myhostname and thus discards it when rewriting the nsswitch.conf file. Looks like this actually a bug in authconfig.
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
I can reproduce this on RHEL7.1