How To Fix: Could Not Determine The Server's Fully Qualified Domain Name



How To Fix: Could Not Determine The Server's Fully Qualified Domain Name
How To Fix: Could Not Determine The Server's Fully Qualified Domain Name
Post Description:
Post Tags: how, to, fix, could, not, determine, the, servers, fully, qualified, domain, name
This Post Has Been Viewed 24277 Times Since Thu Jul 20, 2006 9:44 am Posted By toyer with 17 replies
Next Post »» How To Find What Apache Version Is Installed In My Server
How To Fix: Could Not Determine The Server's Fully Qualified Domain Name
I am getting this error everytime I try to restart my apache server. i have a dedicated server for my wallpaper website and im able to login to my fedora/redhat server through my ssh shell, but i get this when i try to restart my server for some reason i can't figure and my wallpaper website is down. this is what i get when i execute the commnad:


     Code:
Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName


how can i fix this?

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About How To Fix: Could Not Determine The Server's Fully Qualified Domain Name




:: 1 :: #9 - Reply By toyer On Thu Jul 20, 2006 9:51 am
Loging to your Redhat server with the SSH account that was provided by our staff. Make sure you are logged in as root. If you don't have your password or forgot, please contact our support team. otherwise, execute these commands if you have your root password:


     Code:
echo HOST.DOMAIN.com > /etc/hostname

HOST = Your host name
DOMAIN = Your Domain Name

Now execute the next command in the shell:

     Code:
/bin/hostname -F /etc/hostname


Now that your server has a hostname and a domain name, restart your server with the following command:

     Code:
/etc/init.d/httpd restart


After you have restarted your server, you shouldn't see the error.
:: 2 :: #255 - Reply By piwi On Thu Feb 08, 2007 3:27 am
does this work on other linux distributions like Mandrake Mandriva Red Hat Fedora Core SuSE Linux Debian Woody Sarge Ubuntu Hoary Hedgehog Breezy Badger Dapper DrakeEdgy Eft CentOS
:: 3 :: #467 - Reply By Nithin, On Mon Feb 19, 2007 6:08 pm
I am also facing the same prob but the above reply dint worked for me plz can anyone help me
:: 4 :: #473 - Reply By piwe On Mon Feb 19, 2007 8:03 pm
hey Nithin, send this command:

cat /etc/hostname
if you don't have a hostname, you need to give your server a good hostname and a domain name. for example: hostname.domainname.com
make sure you only have one entry, its possible that you have a corupted hostname file, so i would clear it all and run the command on this post
MAKE SURE TO RESTART YOUR SERVER
:: 5 :: #4449 - Reply By Kike On Mon May 28, 2007 1:39 am
you have to edit the /etc/apache2/apache2.conf and, at the end of the file, add:

# added servername to avoid the could not determine fqdn error
servername myserver

place your server name in place of myserver.

it worked for me.
:: 6 :: #11794 - Reply By MerlinGuy On Fri Jul 20, 2007 11:37 am
thanks.

that worked great.
:: 7 :: #18409 - Reply By nihat On Sun Sep 02, 2007 4:14 am
it's a verry good
it work !!!
thanks
:: 8 :: #32081 - Reply By burf On Tue Dec 18, 2007 12:12 am
thanks kike, it worked for me too
:: 9 :: #43986 - Reply By helper On Mon Mar 03, 2008 12:22 am
also check this file:

/etc/hosts

make sure it matches your hostname

i was getting this error

starting httpd: httpd: apr_sockaddr_info_get() failed for hostname.domain

httpd: could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for servername

:: 10 :: #43988 - Reply By var On Mon Mar 03, 2008 12:39 am
http://tgrove.com/2007/12/02/httpd-apr_sockaddr_info_get-failed-for-hostname/
:: 11 :: #44285 - Reply By Boomer On Wed Mar 05, 2008 6:58 am
ah it was /etc/hosts.
thanks
:: 12 :: #44354 - Reply By Hoddi On Wed Mar 05, 2008 3:37 pm
thanks, it works
:: 13 :: #53139 - Reply By Jim SE Texas On Thu May 08, 2008 10:35 pm
/etc/apache2/apache2.conf and, at the end of the file, add:

# added servername to avoid the could not determine fqdn error
servername myserver

place your server name in place of myserver.

it worked for me.


and for me, clean shutdown & startup.

thanks
jim
:: 14 :: #53448 - Reply By lsfamily On Sun May 11, 2008 7:21 pm
my god!! it worked for me.
thanks
:: 15 :: #54332 - Reply By tl On Mon May 19, 2008 1:51 am
set "servername xxx" in your apache configures.
in the command line "hostname xxx.domainname "
restart apache
:: 16 :: #56945 - Reply By nombre On Sun Jun 08, 2008 3:50 am
looks like that fixed worked for all of you, however just encountered an issue with some sites being hosted as virtual machines with esx.

the website was hosted on a load balancer so if mahcine fails 2 would take over. for some reason apache had no route to the servername. it had to start at the vm, go through the host, and then out to the network.

did not have enough time to dig into the issue, however a soft reboot fixed it right up.
:: 17 :: #58533 - Reply By allgarbage On Fri Jun 20, 2008 6:24 am
just add or change the servername option in your apache config file. on my debian/apache2 system the file i had to modify is /etc/apache2/apache2.conf. i added this line:

servername thugone

and then restarted apache, which started without the error.

if that doesn’t work, make sure that whatever you defined as the servername is specified in your /etc/hosts file:

127.0.0.1 thugone localhost