Could not determine the server's fully qualified domain name

Hello all, Just wondering if anyone might be able to give me some clues here. I started Apache on my system and the following error was returned. Apache seems to operate okay but I was getting a similar kind of error in the log files when I was running Privoxy, an advertisment and cookie crunching proxy server. When the proxy server was operating it was this error that kept slowing the response of the server. /etc/init.d/apache2 start returned 0 (success): Starting httpd2 (prefork) ..done httpd2-prefork: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName Any clues? DNS, host file problem. Running Suse 9.2 on PIII on a company lan. No firewall running on machine. Cheers Chris -- http://homepages.maxnet.co.nz/dusky/ ICQ: 213449133 Jabber: cmoman1(a)jabber.org Jabber: cmoman1(a)jabber.meta.net.nz Yahoo: cmoman1

I started Apache on my system and the following error was returned. Apache seems to operate okay but I was getting a similar kind of error in the log files when I was running Privoxy, an advertisment and cookie crunching proxy server.
When the proxy server was operating it was this error that kept slowing the response of the server.
/etc/init.d/apache2 start returned 0 (success): Starting httpd2 (prefork) ..done httpd2-prefork: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Any clues? DNS, host file problem.
From what I understand (this is how I fixed the problem), you need to have the <VirtualHost> entry in /etc/apache2/sites-enabled/default matching the hostname of your computer.
In my case, /etc/hosts reads:
127.0.0.1 bnonn.ath.cx violet localhost localhost.localdomain
And the first few lines of /etc/apache2/sites-enabled/default read:
NameVirtualHost violet <VirtualHost violet> ServerAdmin bnonn(a)orcon.net.nz ServerName bnonn.ath.cx
Whether this is the correct way to do it or not I'm afraid I'm not sure. I did some brief research a couple of weeks ago to see if I could figure out why I was getting the same error, and altering the ServerName setting in Apache resolved this. However, I don't really understand how FQDN works, and how DNS really factors into it, so I'd also be grateful for the technical wisdom of others who do. If I'm doing something howwbly wrong it would be good to know (: Regards, Bnonn

First off, sorry if this comes out wrong but writing these things while still drunk usually isn't a good idea. I will, however, proceed anyway :P The process for resolving machine names, FQDN's etc is controlled by a number of files on your machine. It starts with the file: /etc/host.conf That file tells your machine where to goto. Mine looks like: order hosts, bind multi on The first line tells my system to look in the hosts file, which in *nix is /etc/hosts (so that's why matching the name in hosts and your apache conf works). If it doesn't find an entry in the hosts file then the "bind" option is tried next. "bind" actually means to use dns rather than the "bind" dns server in particular. So, if your servername in apache isn't in the /etc/hosts file, the OS will look to dns to figure out its own name. So then it will look to the file: /etc/resolv.conf to figure out where to look up the name. Mine looks like: domain trousers.lan nameserver 192.168.1.1 nameserver 192.168.1.254 nameserver 202.49.46.2 The first line lets you use short machine names (not FQDN's but actual hostnames) and that will get tacked on the end before the lookup is done. So, if I were to try: dig pants a my machine will actually look up the ip for: pants.trousers.lan The 2nd, 3rd and 4th lines are ips of dns servers that my machine should query starting at the top and moving down in order. If it finds a match then sweet, otherwise it will let you know that the name can't be found. The ips are: 192.168.1.1 is my machine as I run a dns server on it. It's a static ip because that machine is also the DHCP server 192.168.1.254 is my adsl modem. If dns queries are passed to it then it will forward them on to whatever servers my ISP supply when I connect (I'm not running it in bridged mode) 202.49.46.2 is Waves dns. I know that exists and always will as long as Wave exist, so it's the last resort (NOTE I use trousers.lan as my local domain because there isn't a root server for that top level domain, so it guarantees I'll never get an ip that for that domain that isn't servered up by me) What was happening (to Bnonn not Chris) is there wasn't an entry in either the hosts file nor in any dns server that matched, so apache would spit the error: httpd2-prefork: Could not determine the server's fully qualified Have a look at this page to find out why the servername setting is important: http://httpd.apache.org/docs/2.0/mod/core.html#servername I'm going cross eyed and therefore back to bed to try and recover. Someone tell me if that was utter crap and I'll have another go .... sometime. man host.conf man hosts man resolv.conf Shane. ----- Original Message ----- From: "Bnonn" <bnonn(a)orcon.net.nz> To: "Waikato Linux Users Group" <wlug(a)list.waikato.ac.nz> Sent: Friday, October 28, 2005 11:09 PM Subject: Re: [wlug] Could not determine the server's fully qualifieddomain name
I started Apache on my system and the following error was returned. Apache seems to operate okay but I was getting a similar kind of error in the log files when I was running Privoxy, an advertisment and cookie crunching proxy server.
When the proxy server was operating it was this error that kept slowing the response of the server.
/etc/init.d/apache2 start returned 0 (success): Starting httpd2 (prefork) ..done httpd2-prefork: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Any clues? DNS, host file problem.
From what I understand (this is how I fixed the problem), you need to have the <VirtualHost> entry in /etc/apache2/sites-enabled/default matching the hostname of your computer.
In my case, /etc/hosts reads:
127.0.0.1 bnonn.ath.cx violet localhost localhost.localdomain
And the first few lines of /etc/apache2/sites-enabled/default read:
NameVirtualHost violet <VirtualHost violet> ServerAdmin bnonn(a)orcon.net.nz ServerName bnonn.ath.cx
Whether this is the correct way to do it or not I'm afraid I'm not sure. I did some brief research a couple of weeks ago to see if I could figure out why I was getting the same error, and altering the ServerName setting in Apache resolved this. However, I don't really understand how FQDN works, and how DNS really factors into it, so I'd also be grateful for the technical wisdom of others who do. If I'm doing something howwbly wrong it would be good to know (:
Regards, Bnonn
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug

Thanks for the responses. I think I've solved it twice. Although YAST2 (Suse setup tool) was appearing like if was adding my host name to the /etc/hosts, it wasn't and I suspect this was to do with the DHCP configuration expecting to be given a host name from the DHCP server. I forced it by manually editing /etc/hosts And to kill it twice I then asked our IT admin to add my computers name to the DNS server on the company LAN so now there's no excuse. While we are on DHCP, if the computer is turn on at least once a week it gets the same ip address. Now privoxy and apache run without complaint and in the case of privoxy a wee bit quicker. Thanks for your help guys, Chris BTW, seeing as you guys (WLUG) run Ubuntu and I am a KDE fan, I was wondering if someone could post me a copy of Kubuntu or point me in the right direction. Happy to meet your costs. Thanks. On Sunday 30 October 2005 09:41, Shane Taylor wrote:
First off, sorry if this comes out wrong but writing these things while still drunk usually isn't a good idea. I will, however, proceed anyway :P
The process for resolving machine names, FQDN's etc is controlled by a number of files on your machine. It starts with the file: /etc/host.conf
That file tells your machine where to goto. Mine looks like: order hosts, bind multi on
The first line tells my system to look in the hosts file, which in *nix is /etc/hosts (so that's why matching the name in hosts and your apache conf works). If it doesn't find an entry in the hosts file then the "bind" option is tried next. "bind" actually means to use dns rather than the "bind" dns server in particular.
So, if your servername in apache isn't in the /etc/hosts file, the OS will look to dns to figure out its own name. So then it will look to the file: /etc/resolv.conf
to figure out where to look up the name. Mine looks like: domain trousers.lan nameserver 192.168.1.1 nameserver 192.168.1.254 nameserver 202.49.46.2
The first line lets you use short machine names (not FQDN's but actual hostnames) and that will get tacked on the end before the lookup is done. So, if I were to try: dig pants a
my machine will actually look up the ip for: pants.trousers.lan
The 2nd, 3rd and 4th lines are ips of dns servers that my machine should query starting at the top and moving down in order. If it finds a match then sweet, otherwise it will let you know that the name can't be found. The ips are: 192.168.1.1 is my machine as I run a dns server on it. It's a static ip because that machine is also the DHCP server 192.168.1.254 is my adsl modem. If dns queries are passed to it then it will forward them on to whatever servers my ISP supply when I connect (I'm not running it in bridged mode) 202.49.46.2 is Waves dns. I know that exists and always will as long as Wave exist, so it's the last resort
(NOTE I use trousers.lan as my local domain because there isn't a root server for that top level domain, so it guarantees I'll never get an ip that for that domain that isn't servered up by me)
What was happening (to Bnonn not Chris) is there wasn't an entry in either the hosts file nor in any dns server that matched, so apache would spit the error: httpd2-prefork: Could not determine the server's fully qualified
Have a look at this page to find out why the servername setting is important: http://httpd.apache.org/docs/2.0/mod/core.html#servername
I'm going cross eyed and therefore back to bed to try and recover. Someone tell me if that was utter crap and I'll have another go .... sometime.
man host.conf man hosts man resolv.conf
Shane.
----- Original Message ----- From: "Bnonn" <bnonn(a)orcon.net.nz> To: "Waikato Linux Users Group" <wlug(a)list.waikato.ac.nz> Sent: Friday, October 28, 2005 11:09 PM Subject: Re: [wlug] Could not determine the server's fully qualifieddomain name
I started Apache on my system and the following error was returned. Apache seems to operate okay but I was getting a similar kind of error in the log files when I was running Privoxy, an advertisment and cookie crunching proxy server.
When the proxy server was operating it was this error that kept slowing the response of the server.
/etc/init.d/apache2 start returned 0 (success): Starting httpd2 (prefork) ..done httpd2-prefork: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Any clues? DNS, host file problem.
From what I understand (this is how I fixed the problem), you need to
have the <VirtualHost> entry in /etc/apache2/sites-enabled/default matching the hostname of your computer.
In my case, /etc/hosts reads:
127.0.0.1 bnonn.ath.cx violet localhost localhost.localdomain
And the first few lines of /etc/apache2/sites-enabled/default read:
NameVirtualHost violet <VirtualHost violet> ServerAdmin bnonn(a)orcon.net.nz ServerName bnonn.ath.cx
Whether this is the correct way to do it or not I'm afraid I'm not sure. I did some brief research a couple of weeks ago to see if I could figure out why I was getting the same error, and altering the ServerName setting in Apache resolved this. However, I don't really understand how FQDN works, and how DNS really factors into it, so I'd also be grateful for the technical wisdom of others who do. If I'm doing something howwbly wrong it would be good to know (:
Regards, Bnonn
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
-- http://homepages.maxnet.co.nz/dusky/ ICQ: 213449133 Jabber: cmoman1(a)jabber.org Jabber: cmoman1(a)jabber.meta.net.nz Yahoo: cmoman1
participants (3)
-
Bnonn
-
Chris O'Halloran
-
Shane Taylor