Suddenly, my server is down without any conf or something - apache

I did not do anything on my server (vps account on linode.com) such as configuration or something. But, suddenly my server is down. When i try to start apache, i saw this error message:
(
Starting web server: apache2(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
failed!
)
I did try to start apache with some way and i face now "Starting web server: apache2 failed!"
Thanks for your help,
Erman

This probably means another server (probably apache itself) is running on same port. If you have shell access to server, try to determine which process is using port 80. (netstat --listen perhaps, do some google) and then kill the process by kill command.

Have you tried linode.com support? This is probably your best bet.
You could also try restarting all of your services (not just Apache, but everything that is available to you to restart).

Related

cKan Failed installation on restarting Apache service

I have installed ckan from this tutorial http://docs.ckan.org/en/latest/maintaining/installing/install-from-package.html
until I came to part 4. Restart Apache and Nginx, I run "sudo service apache2 restart" and got this error:
Restarting web server apache2 (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
Can anyone help me with this out.
Regards,
Sounay
You're telling Apache to serve on port 8080 but get error 'Address already in use'. Sounds like you are running another server on your machine - port 8080 is a pretty common port to use for web apps.
You can see what is running on port 8080 like this:
sudo netstat -plnt | grep :8080
Now you need to move a server to another port number (e.g. 8081) - either the service you discover, or ckan.
To change CKAN's port, edit ckan's apache & nginx config files and replace '8080' everywhere with the new port number.

Error during Apache Installation

I am just integration all the three as mentioned here
While installing apache,
Listen 127.0.0.1:80
is added in httpd.conf It says
(OS 10013)An attempt was made to access a socket in a way forbidden by its
access permissions. : AH00072: make_sock: could not bind to address
127.0.0.1:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
I just checked what process is using port 80
netstat -tna
shows pid 4 is using
When i check
tasklist
it says SYSTEM process is using.
How do i make use of system port 80 for apache? How do i resolve this error?
Open a CMD prompt (as Admin) and type this iisreset /stop

Succeeded installing but could not start apache 2.4 on my windows 7 system

I am attempting to install and run apache 2.4 on my windows 7 system
I went to the apache 2.4 bin directory and ran the following:
Note: I opened the cmd window as administrator.
C:\Apache24\bin>httpd.exe -k install
Its output was as follows:
Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open log
So it installed apache 2.4 as a service but it could not be started. It seems like the localhost port 80 is being used. Is this what "[::]:80" means?
I then stopped both the the apache 2.0 service which I had left running and the mysql service, hoping stopping one of them might free up localhost port 80.
I also run netstat -o to see if port 80 is being used. It was not.
But, I then found that a process was using the above socket it is a process that is listening on the above socket
TCP [::]:80 User-PC:0 LISTENING 4
I then ran tasklist and found out that System is using pid 4. 4 is under the pid column
System 4 Services 0 544 K
Finally, from the failed attempt to start the service
I got an error which was recorded in windows systems events.
Log Name: System
Source: Service Control Manager
Date: 2/21/2013 1:58:03 PM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: User-PC
Description:
The Apache2.4 service terminated with service-specific error Incorrect function.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7024</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-02-21T18:58:03.723988900Z" />
<EventRecordID>87756</EventRecordID>
<Correlation />
<Execution ProcessID="560" ThreadID="7596" />
<Channel>System</Channel>
<Computer>User-PC</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">Apache2.4</Data>
<Data Name="param2">%%1</Data>
</EventData>
</Event>
The error from the attempt to start says that beacause of lack of access, make-sock could not bind to sockets which to me looked like localhost port 80. For example,
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
Can anyone tell what I am doing wrong?
Sorry for the belabored question. To solve my problem I just told apache 2.4 to listen to a different port in httpd.conf. Since System was using pid 4 which was listening on port 80, I did not want to explore this any further.
I put the following into httpd.conf.
Listen 127.0.0.1:122
The most likely culprit is Microsoft Internet Information Server. You can stop the service from the command line on Windows 7/Vista:
net stop was /y
or XP:
net stop iisadmin /y
read this
http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
I have the same problem too, after upgrading win7 to win10.
then I check services.msc and found "World Wide Web Publishing Service" was running automatically by default.
So then I disabled it, and running the Apache service again.
Port 80 maybe used by Microsoft HTTPAPI
Try to stop the following service:
Web Deployment Agent Service
SQL Server Reporting Service
SQL Server VSS Writer
I solved this issue finally, it was because of some systems like skype and system processes take that port 80, you can make check using netstat -ao for port 80
Kindly find the following steps
After installing your Apache HTTP go to the bin folder using cmd
Install it as a service using httpd.exe -k install even when you see the error never mind
Now make sure the service is installed (even if not started) according to your os
Restart the system, then you will find the Apache service will be the first one to take the 80 port,
Congratulations the issue is solved.
In my case, it was due to an IP address that Apache is listening to. Previously I have set it to 192.168.10.6 and recently Apache service is not running. I noticed that due to My laptop wifi changed recently and new IP is different. After fixing the wifi IP to laptop previous IP, Apache service is running again without any error.
Also if you don't want to change wifi IP then remove/comment that hardcode IP in httpd.conf file to resolve conflict.
if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.
So, that is why i do a two (or more) post.
I was having the same problem when starting the service (logs can not be opened).
I thought it was because i was trying to have htdocs inside a VeraCrypt encripted container, absurd since i hace such contained mounted and i use a juntion to not affect paths.
The i read the cause could be low ram: after some tests i get to the next conclusion.
Windows is not sending pages to virtual ram to free enough ram if it is a service, for applications it is doing it, i have more than 200GiB of pagefile ready to be used as virtual ram in a 4GiB 64 Bit windows 10.
My solution:
Run a free utility that free ram (512MiB in my test)
Inmediatly after start the service, it starts with no errors
Real Cause:
I was using a virtual machine that uses 1/2 physical free ram (1.5GiB)
Hope this help others.
I was also facing the same issue, then i tried restarting my system after every change and it worked for me:
Uninstall Apache2.4 in cmd prompt (run administrator) with the command:
httpd -k uninstall.
Restart the system.
open cmd prompt (run administrator) with the command:
httpd -k install.
Then httpd -k install.
Hope you find useful.
you can solve it
sudo nano /etc/apache2/ports.conf
and changed Listen to 8080
This may be because of shortage in physical RAM.
Check minimum system requirements in the docs and try to close unnecessary programs if possible.

Apache on Windows not releasing port 80 on service stop, and will not restart

When I try to restart Apache it throws the following error:
============================================
Apache 2 is starting ...
(OS 10048)Normalerweise darf jede Socketadresse (Protokoll, Netzwerkadresse oder Anschluss) nur jeweils einmal verwendet werden.
: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
=============================================
I used netstat, and found that the PID holding port 80 was the same PID that Apache was previously using. This PID does not show up in task manager, and it is not found when taskkill is attempted on it.
It seems that Apache is somehow holding onto the port on exit. The only way I can restart the Apache service is by changing the Listen port each time, or by restarting the server itself.
Has anyone come across this before, and if so, is there anything I can do to fix it?
If this is a windows machine then apps like apache usually are lanuched as a service.
You can close it with
CMD+R -> services.msc , search for
apache and press stop
or
cmd -> net stop apache
or
cmd -> net stop apache2

Apache installation on Windows 7

I am a newbie with Apache. I am learning .. after the installation when I tried to start the service I got the following errors.
The Apache service named reported the following error:
Unable to open logs .
The Apache service named reported the following error:
no listening sockets available, shutting down .
The Apache service named reported the following error:
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 .
The Apache service named reported the following error:
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.6 for ServerName .
The following error usually means that some other program is listening on the HTTP port (80).
(OS 10048)Only one usage of each
socket address (protocol/network
address/port) is normally permitted. :
make_sock: could not bind to address
0.0.0.0:80 .
In my experience, IM (chat) clients like to connect to port 80.
From a command prompt, (cmd.exe) run the command:
netstat -an
See if there is a listener on port 80 (Look for a line that says:
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
=== ====
the important thing being TCP and 80. If you find something, you'll need to track it down using something like TcpView
If Skype is your problem and it seems it usually is, alter Skype's port usage.
Click on Tools in Skype,
click on Options,
click Advanced,
click Connections.
In Connection is the option to use another port, I use a high numbered port such as 65432, then un-click the alternative use of port 80 and 443.
Close and restart Skype.
modifying C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd sloved the problem.
If you had installation problems, note that you might experience some errors such “ no services installed ”
if Apache is trying to share port 80 with another web server or application, such as a locally installed
firewall application. To fix this, you can tell Apache to use a different port. Open your httpd.conf file
in the conf subdirectory ( C:\Program Files\Apache Software Foundation\Apache2.2\conf by
default) and locate the following lines:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the < VirtualHost >
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
Change the last line of this block to read:
Listen 8080
skype uses port 80, try logout and shut down the program...
now run apache
if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.
Changing in the config file every occurrence of the path to apache (eg: "C:/Users/xxxx/Desktop/Apache Software Foundation/") to the new location (in case you shifted directory of apache installation by copy paste) solved my problem. Hope it helps you too..
Please note that, not only http port 80, may your ssl port 443 is being used by any other service or software.
I have installed vmware workstation on my PC, so a process which was initiated by Vmware Workstation was using ssl port 443.
In my case, it was vmware-hostd.exe which was utilizing ssl port 443.
Try shutting down vmware-hostd.exe or simply change your ssl-httpd.conf and modify Listen from 443 to 8080 or something else.
While choosing the port number please be sure that you don't enter any port which can be used by any other software on your PC.
just provide the listen address and port in httpd.conf file. that will not show IP related error as
Listen IP_ADDRESS:PORT
If you change port ( not port 80) then port conflict will not occur and server comes up.
Below blog may help you :-
http://apache2-4-9-webserver-installation.blogspot.com/2014/06/how-to-install-apache-http-server.html
Port 80 conflict. There are a number of well-known Windows programs which use
port 80:
IIS
The most likely culprit is Microsoft Internet Information Server. Stop the
service with the command from the command line on Windows 7/Vista:
net stop was /y
If needed start the services again with the command from the command line on
windows /Vista:
net start was /y