Hi, When I start apache it fails , and in the file:/var/log/httpd/error_log there is the next error : [Wed Oct 30 22:48:42 2002] [alert] mod_unique_id: unable to gethostbyname("unit0") If I type hostname on console I get unit0 . More , in /var/log/boot.msg I see the next message : Setting up hostname 'linux' done but after that , I can read : eth0 (DHCP) <notice>startproc: execve (/sbin/dhcpcd) [ /sbin/dhcpcd -H -D -N -Y -t 999999 -h linux eth0 ], [ CONSOLE=/dev/console TERM=linux SHELL=/bin/sh OLDPWD=/etc/sysconfig/network INIT_VERSION=sysvinit-2.82 RUN_FROM_RC=yes REDIRECT=/dev/tty1 COLUMNS=82 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/etc/sysconfig/network/scripts vga=788 RUNLEVEL=5 PWD=/etc/sysconfig/network PREVLEVEL=N LINES=26 HOME=/ SHLVL=4 _=/sbin/startproc DAEMON=/sbin/dhcpcd ] . . . . <notice>pidofproc: dhcpcd 400 IP/Netmask: 192.168.1.2 / 255.255.255.0 ('unit0') And last , in the file /etc/hosts I have the next line : 127.0.0.2 linux.local linux I suppose something is changing the hostname two times during the boot ... I'm quite new to Linux , that's too much for me , Anyone could tell me whats happening? and please , How can I let everything rigth? Thanks in advance. Suse 8.1 Apache 1.3
On Wednesday 30 October 2002 23:05, Bombadil wrote:
I suppose something is changing the hostname two times during the boot ... I'm quite new to Linux , that's too much for me , Anyone could tell me whats happening?
YaST2 > Network/Advanced > Host name and DNS There's a checkbox "Change host name via DHCP" - this is checked by default in 8.1 for some reason. Uncheck it. And make sure the host name you want is entered there while you're at it. Later, Joe
Well , I don't konw why but I had to left it checked , anyway I had to adjust the host name as you told me. Thanks a lot. Bombadil. El Jue 31 Oct 2002 00:37, Joe Sullivan escribió:
On Wednesday 30 October 2002 23:05, Bombadil wrote:
I suppose something is changing the hostname two times during the boot ... I'm quite new to Linux , that's too much for me , Anyone could tell me whats happening?
YaST2 > Network/Advanced > Host name and DNS
There's a checkbox "Change host name via DHCP" - this is checked by default in 8.1 for some reason. Uncheck it. And make sure the host name you want is entered there while you're at it.
Later, Joe
On Wed, Oct 30, 2002 at 11:05:18PM +0100, Bombadil wrote:
When I start apache it fails , and in the file:/var/log/httpd/error_log there is the next error : [Wed Oct 30 22:48:42 2002] [alert] mod_unique_id: unable to gethostbyname("unit0")
Short answer: you should disable the mod_unique_id apache module because you most likely don't need it anyway. It is difficult to use it on a machine that is configured for DHCP. Alternatively, you could get along by commenting out the ServerName directive in /etc/httpd/httpd.conf, but only if a nameserver is available.
If I type hostname on console I get unit0 .
More , in /var/log/boot.msg I see the next message : Setting up hostname 'linux' done
but after that , I can read : eth0 (DHCP) <notice>startproc: execve (/sbin/dhcpcd) [ /sbin/dhcpcd -H -D -N -Y -t 999999 -h linux eth0 ], [ CONSOLE=/dev/console TERM=linux SHELL=/bin/sh OLDPWD=/etc/sysconfig/network INIT_VERSION=sysvinit-2.82 RUN_FROM_RC=yes REDIRECT=/dev/tty1 COLUMNS=82 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/etc/sysconfig/network/scripts vga=788 RUNLEVEL=5 PWD=/etc/sysconfig/network PREVLEVEL=N LINES=26 HOME=/ SHLVL=4 _=/sbin/startproc DAEMON=/sbin/dhcpcd ] . . . . <notice>pidofproc: dhcpcd 400 IP/Netmask: 192.168.1.2 / 255.255.255.0 ('unit0')
As apache is started after dhcpcd has acquired an address and set the hostname, the fact that the hostname is set twice is not a problem. What needs to work is the reverse name resolution. Apparently, mod_unique_id cannot resolve 'unit0' to an address. It seems you have no nameserver available. Try 'host unit0' to verify.
And last , in the file /etc/hosts I have the next line : 127.0.0.2 linux.local linux
This line is used only in cases where no name resolution over the network is available. To avoid stalls it helps to have some reverse resolution of your hostname here -- however if set to linux.local it will only be usefull if your machine is actually called linux.local. So if your hostname is _not_ changed dynamically this line would help with mod_unique_id.
I suppose something is changing the hostname two times during the boot ... I'm quite new to Linux , that's too much for me , Anyone could tell me whats happening?
The hostname is set from /etc/HOSTNAME early at boot time, and set once again if dhcpcd is used and configured to change the hostname. Peter
participants (3)
-
Bombadil
-
Joe Sullivan
-
poeml@cmdline.net