Httpd: cocould not reliably determine the server & #39; s fully qualified domain name, httpdreliably

Source: Internet
Author: User
Tags fully qualified domain name

Httpd: cocould not reliably determine the server's fully qualified domain name, httpdreliably
[Root @ luozhonghua sbin] # service httpd start
Starting httpd: apr_sockaddr_info_get () failed for luozhonghua
Httpd: cocould not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98) Address already in use: make_sock: cocould not bind to address [:]: 80
(98) Address already in use: make_sock: cocould not bind to address 0.0.0.0: 80
No listening sockets available, shutting down
Unable to open logs

[FAILED]



In this case, port 80 is occupied, that is, your system has a temporary port 80. What should I do?


First check:



[Root @ luozhonghua sbin] # netstat-lnp | grep 80
Tcp 0 0 0.0.0.0: 80 0.0.0.0: * LISTEN 5619/nginx
Unix 2 [ACC] stream listening 12380 1759/abrtd/var/run/AB rt/abrt. socket
Unix 2 [ACC] stream listening 16831 2143/nautilus/tmp/orbit-root/linc-85f-0-3e753e8283a80


The method is to close the occupied program, which is generally another container.

For example, if nginx is occupied on my machine,./usr/local/nginx-s stop

Then start service httpd start

You can.

Of course, another method is to modify the default httpd port 80, but it is not recommended




Why is there httpd: cocould not reliably determine the server's fully qualified?

Although apachecan run, it can be seen that httpd.exe: cocould not reliably determine the server's fully qualified domain name, using 192.168. x. x for ServerName is incorrect in error.log. check whether other port 80 is occupied.
Start -- run -- cmd enter the command prompt and enter netstat-ano. Then you can see all connected PIDs and find the program corresponding to the PID in the task manager. If no PID exists in the task manager, you can select "View"-"Select column" in the task manager"

Often, when we start an application, we find that the ports required by the system are occupied by other programs. How do we know who owns the ports we need, next we will introduce a very simple method and hope it will be useful to you.

If we need to determine who is using port 80

1. Windows Platform
Run the following command in the windows command line window:
C: \> netstat-aon | findstr "80"
TCP 127.0.0.1: 80 0.0.0.0: 0 LISTENING 2448
As you can see, the port is occupied by a process with the process number 2448. Continue to execute the following command:
C: \> tasklist | findstr "2448"
Thread.exe 2016 Console 0 16,064 K
Well, thread occupies your port and Kill it.
If you cannot find the process in step 2, open the task manager, check which process is 2448, and then kill it.

If you want to view other ports. Change 80.

Supplement: the original cause is: httpd.exe: cocould not reliably determine the server's fully qualified domain name, using 192.168.1.111 for ServerName. if you do not want to configure DNS, go to httpd. conf, add ServerName localhost: 80 at the beginning.

When I enable the httpd service, the cocould not reliably determine the server's fully qualified domain name is displayed,

Vi/etc/httpd/conf/httpd. conf
Add ServerName localhost: 80

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.