You are not logged in.

#1 2016-12-13 16:22:06

nfortier
Member
Registered: 2011-09-18
Posts: 49

[SOLVED] Local network no longer recognizes host name

After yesterday's update (output from pacman / packer below), ping [hostname] returns "Name or service not known".
(I realized this because I have a java application that calls java.net.InetAddress.getLocalHost()).

The hostname is set in /etc/hostname and reported correctly by hostnamectl status under "Static hostname".
Connection to the Internet (browser, email) works fine. My network and host names configuration have not changed in months.

I have solved the problem by adding my hostname to the first line in /etc/hosts, from

127.0.0.1 localhost.localdomain localhost

to

127.0.0.1 localhost.localdomain localhost hostname

So my questions are mostly to help others who might run into the same issue, and out of curiosity:
- what change in yesterday's upgrade could have caused this?
- is the solution I applied correct?
Thank you!

[2016-12-12 16:48] [PACMAN] Running 'pacman -Syyu'
[2016-12-12 16:48] [PACMAN] synchronizing package lists
[2016-12-12 16:48] [PACMAN] starting full system upgrade
[2016-12-12 16:49] [ALPM] transaction started
[2016-12-12 16:49] [ALPM] upgraded filesystem (2015.09-1 -> 2016.12-2)
[2016-12-12 16:49] [ALPM] upgraded ncurses (6.0+20161112-1 -> 6.0+20161203-1)
[2016-12-12 16:49] [ALPM] upgraded readline (7.0-1 -> 7.0.001-1)
[2016-12-12 16:49] [ALPM] upgraded libsystemd (232-4 -> 232-6)
[2016-12-12 16:49] [ALPM] upgraded coreutils (8.25-2 -> 8.26-1)
[2016-12-12 16:49] [ALPM] upgraded systemd (232-4 -> 232-6)
[2016-12-12 16:49] [ALPM] upgraded cairo (1.14.6-2 -> 1.14.8-1)
[2016-12-12 16:49] [ALPM] upgraded icu (58.1-2 -> 58.2-1)
[2016-12-12 16:49] [ALPM] upgraded gtk-update-icon-cache (3.22.4-1 -> 3.22.5-1)
[2016-12-12 16:49] [ALPM] upgraded openjpeg2 (2.1.2-1 -> 2.1.2-2)
[2016-12-12 16:49] [ALPM] upgraded python2-setuptools (1:28.8.0-1 -> 1:30.4.0-1)
[2016-12-12 16:49] [ALPM] upgraded libinput (1.5.2-1 -> 1.5.3-1)
[2016-12-12 16:49] [ALPM] upgraded gnutls (3.4.16-1 -> 3.4.17-1)
[2016-12-12 16:49] [ALPM] upgraded qt5-base (5.7.0-7 -> 5.7.0-9)
[2016-12-12 16:49] [ALPM] upgraded calibre (2.73.0-2 -> 2.74.0-1)
[2016-12-12 16:49] [ALPM] upgraded cargo (0.14.0-2 -> 0.14.0-3)
[2016-12-12 16:49] [ALPM] upgraded imagemagick (6.9.6.6-2 -> 6.9.6.7-1)
[2016-12-12 16:49] [ALPM] upgraded cups-filters (1.12.0-1 -> 1.13.0-1)
[2016-12-12 16:49] [ALPM] upgraded ffmpeg2.8 (2.8.8-1 -> 2.8.9-1)
[2016-12-12 16:49] [ALPM] upgraded gtk3 (3.22.4-1 -> 3.22.5-1)
[2016-12-12 16:49] [ALPM] upgraded hugin (2016.2.0-2 -> 2016.2.0-3)
[2016-12-12 16:49] [ALPM] upgraded linux (4.8.12-2 -> 4.8.13-1)
[2016-12-12 16:49] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
[2016-12-12 16:49] [ALPM] warning: /etc/pacman.d/mirrorlist installed as /etc/pacman.d/mirrorlist.pacnew
[2016-12-12 16:49] [ALPM] upgraded pacman-mirrorlist (20161203-1 -> 20161211-1)
[2016-12-12 16:49] [ALPM] upgraded python-setuptools (1:28.8.0-1 -> 1:30.4.0-1)
[2016-12-12 16:49] [ALPM] installed python2-webencodings (0.5-1)
[2016-12-12 16:49] [ALPM] upgraded python2-html5lib (0.9999999-2 -> 0.999999999-1)
[2016-12-12 16:49] [ALPM] upgraded systemd-sysvcompat (232-4 -> 232-6)
[2016-12-12 16:49] [ALPM] upgraded udisks2 (2.1.7-1 -> 2.1.8-1)
[2016-12-12 16:50] [ALPM] upgraded vtk (7.0.0-3 -> 7.1.0-1)
[2016-12-12 16:50] [ALPM] transaction completed
[2016-12-12 16:50] [ALPM] running '99-linux.hook'...
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Starting build: 4.8.13-1-ARCH
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Image generation successful
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Starting build: 4.8.13-1-ARCH
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: wd719x
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2016-12-12 16:50] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
[2016-12-12 16:50] [ALPM-SCRIPTLET] ==> Image generation successful
[2016-12-12 16:50] [ALPM] running 'glib-compile-schemas.hook'...
[2016-12-12 16:50] [ALPM] running 'gtk-query-immodules-3.0.hook'...
[2016-12-12 16:50] [ALPM] running 'gtk-update-icon-cache.hook'...
[2016-12-12 16:50] [ALPM] running 'texinfo-install.hook'...
[2016-12-12 16:50] [ALPM] running 'udev-hwdb.hook'...
[2016-12-12 16:50] [ALPM] running 'update-desktop-database.hook'...
[2016-12-12 16:50] [ALPM] running 'update-mime-database.hook'...
[2016-12-12 16:50] [ALPM-SCRIPTLET] Unknown media type in type 'all/all'
[2016-12-12 16:50] [ALPM-SCRIPTLET] Unknown media type in type 'all/allfiles'
[2016-12-12 16:50] [PACMAN] Running 'pacman -Syu'
[2016-12-12 16:50] [PACMAN] synchronizing package lists
[2016-12-12 16:50] [PACMAN] starting full system upgrade
[2016-12-12 16:51] [PACMAN] Running 'pacman -U google-chrome-55.0.2883.87-1-x86_64.pkg.tar.xz'
[2016-12-12 16:51] [ALPM] transaction started
[2016-12-12 16:52] [ALPM] upgraded google-chrome (55.0.2883.75-1 -> 55.0.2883.87-1)
[2016-12-12 16:52] [ALPM-SCRIPTLET] (B[m[1m[34m==>(B[m[1m[33m NOTE:(B[m[1m Custom flags should be put directly in: ~/.config/chrome-flags.conf(B[m
[2016-12-12 16:52] [ALPM-SCRIPTLET] (B[m[1m[34m==>(B[m[1m[33m NOTE:(B[m[1m The launcher is called: 'google-chrome-stable'(B[m
[2016-12-12 16:52] [ALPM] transaction completed
[2016-12-12 16:52] [ALPM] running 'gtk-update-icon-cache.hook'...
[2016-12-12 16:52] [ALPM] running 'update-desktop-database.hook'...
[2016-12-12 16:52] [PACMAN] Running 'pacman -U libmypaint-git-1.3.0-1-x86_64.pkg.tar.xz'
[2016-12-12 16:52] [ALPM] transaction started
[2016-12-12 16:52] [ALPM] reinstalled libmypaint-git (1.3.0-1)
[2016-12-12 16:52] [ALPM] transaction completed

Last edited by nfortier (2016-12-13 17:16:10)

Offline

#2 2016-12-13 16:39:42

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Local network no longer recognizes host name

nfortier wrote:

- what change in yesterday's upgrade could have caused this?

Probably this one: https://git.archlinux.org/svntogit/pack … 2733f9c67a

Someone else notes a change for `hostname -i` (in the first of the bug reports said to be fixed by this change).

- is the solution I applied correct?

There's nothing wrong with it (in fact, this used to be a standard configuration step), except that now you need to change two files if you ever want to change your hostname.

Offline

#3 2016-12-13 17:16:22

nfortier
Member
Registered: 2011-09-18
Posts: 49

Re: [SOLVED] Local network no longer recognizes host name

Thank you!

Offline

Board footer

Powered by FluxBB