Windows could not start the Apache2 on Local Computer - problem - windows

During the installation of Apache2 I got the following message into cmd window:
Installing the Apache2.2 service The
Apache2.2 service is successfully
installed. Testing httpd.conf....
Errors reported here must be corrected
before the service can be started.
httpd.exe: Could not reliably
determine the server's fully qualified
domain name , using 192.168.1.3 for
ServerName (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 no listening sockets available, shutting down Unable to
open logs Note the errors or messages
above, and press the key to
exit. 24...
and after installing everything look fine, but it isn't. If I try to start service I got the following message:
Windows could not start the Apache2 on
Local Computer. For more information,
review the System Event Log. If this
is a non-Micorsoft service, contact
the service vendor, and refer to
service-specific error code 1.
Apach2 version is 2.2.9
Does anyone have the same problem, or could help me.

There is some other program listening on port 80, usual suspects are
Skype (Listens on port 80)
NOD32 (Add Apache to the IMON exceptions' list for it to allow apache to bind)
Some other antivirus (Same as above)
Way to correct it is either shutting down the program that's using the port 80 or configure it to use a different port or configure Apache to listen on a different port with the Listen directive in httpd.conf. In the case of antivirus configure the antivirus to allow Apache to bind on the port you have chosen.
Way to diagnose which app, if any, has bound to port 80 is run the netstat with those options, look for :80 next to the local IP address (second column) and find the PID (last column). Then, on the task manager you can find which process has the PID you got in the previous step. (You might need to add the PID column on the task manager)
C:\Users\vinko>netstat -ao -p tcp
Conexiones activas
Proto Dirección local Dirección remota Estado PID
TCP 127.0.0.1:1110 127.0.0.1:51373 TIME_WAIT 0
TCP 127.0.0.1:1110 127.0.0.1:51379 TIME_WAIT 0
TCP 127.0.0.1:1110 127.0.0.1:51381 ESTABLISHED 388
TCP 127.0.0.1:1110 127.0.0.1:51382 TIME_WAIT 0
TCP 127.0.0.1:1110 127.0.0.1:51479 TIME_WAIT 0
TCP 127.0.0.1:1110 127.0.0.1:51481 TIME_WAIT 0
TCP 127.0.0.1:1110 127.0.0.1:51483 TIME_WAIT 0
TCP 127.0.0.1:1110 127.0.0.1:51485 ESTABLISHED 388
TCP 127.0.0.1:1110 127.0.0.1:51487 TIME_WAIT 0
TCP 127.0.0.1:1110 127.0.0.1:51489 ESTABLISHED 388
TCP 127.0.0.1:51381 127.0.0.1:1110 ESTABLISHED 5168
TCP 127.0.0.1:51485 127.0.0.1:1110 ESTABLISHED 5168
TCP 127.0.0.1:51489 127.0.0.1:1110 ESTABLISHED 5168
TCP 127.0.0.1:59264 127.0.0.1:59265 ESTABLISHED 5168
TCP 127.0.0.1:59265 127.0.0.1:59264 ESTABLISHED 5168
TCP 127.0.0.1:59268 127.0.0.1:59269 ESTABLISHED 5168
TCP 127.0.0.1:59269 127.0.0.1:59268 ESTABLISHED 5168
TCP 192.168.1.34:51278 192.168.1.33:445 ESTABLISHED 4
TCP 192.168.1.34:51383 67.199.15.132:80 ESTABLISHED 388
TCP 192.168.1.34:51486 66.102.9.18:80 ESTABLISHED 388
TCP 192.168.1.34:51490 74.125.4.20:80 ESTABLISHED 388
If you want to Disable Skype from listening on port 80 and 443, you can follow the link http://www.mydigitallife.info/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/

Run the httpd.exe from the command line to get an accurate description of the problem.
I had the same error message and it turned out to be a miss configured ServerRoot path. Even after running setup_xampp.bat the httpd.conf had the wrong path.
My error.log was empty and starting the service does not give an informative error message.

the better way to resolve the issue is change the port number in Apache2\conf\httpd.conf . Change the port number as fallows::: Listen 8888 and ServerName machinename:8888 .Restart the Apache server after changing the port number.

I had the same problem. I checked netstat, other processes running, firewall and changed httpd.conf, stopped antivirus, But all my efforts were in vain. :(
So finally the solution was to stop the IIS. And it worked :)
I guess IIS and apache cant work together. If anybody know any work around let us know.

Run the httpd.exe from the command line, as Tim mentioned. The path to PostgreSQL changed, nothing else was running on Port 80 and I didn't see anything in the error.log file.
I clone my boot drive/partition once the base is setup so I don't have to spend three days installing and retweaking everything. Turns I had reinstalled my WAPP stack and used very specific names/versions for PostgreSQL. Windows will not return a specific error message unless you run the command from the command line.

Follow this step it will works fine.
Go to Control panel-->Programs and features-->click Turn Windows features on and off--> see IIS is Checked Or Not If checked please unckeck IIS and restart the computer.After that Open services see Web Deployement Agent Service status if its started please stop.And also see WampAppache and WampSqlID if its not started please start manually. it will works for me.

Hi i also meet this problem today.
And the log error in the Event viewer is as following
The Apache service named reported the following error:
1.Wrapper php-cgi.exe cannot be accessed: (720005)Access is denied.
2.apache service monitor:the requested operation has failed
It is actual the access problem.So the solution as flowing is help me
change the php-cgi.exe security properties
not inheit from parent the permission...
please add the everyone user

if appache and IIS both are running at a time then there is a posibility to hang the apache service,,,,
when i stopped all IIS websites once and then restarted apache service and it works for me....Jai...

Windows Vista Home Premium operating system issue: The easiest way to resolve the issue is to change the port number in Apache2\conf\httpd.conf.
Change the port number at the following lines. 'Listen' from 80 to 8888 and 'ServerName' machinename (ex:localhost) from 80 to 8888. Save then close. Open up Apache Service Monitor and restart service or go to Computer Management > Services and locate Apache 2.2 and start or restart.

Remove apache from Control Panel and delete the apache folder from Program Files and restart the machine, then install apache again. This will solve the problem; if not do the following: Install IIS if not installed, then start IIS and stop it ... Using services start apache service... enjoy apache.

I've had this problem twice. The first problem was fixed using the marked answer on this page (thank you for that). However, the second time proved a bit more difficult.
I found that in my httpd-vhosts.conf file that I made a mistake when assigning the document root to a domain name. Fixing this solved my problem. It is well worth checking (or even reverting to a blank copy) your httpd-vhosts.conf file for any errors and typo's.

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.

Yes , i had to change the port :80 to :90 as port :80 was busy by some other system resource.
You can see the logs in the folder of Apache2.2\logs
Thanks,

Always double check httpd.conf to see if document root is correctly pointing to an existing folder
#if you have c:\your-main-folder\www\
DocumentRoot "c:/your-main-folder/www/"
#if you have c:\your-main-folder\www\sub-folder\
DocumentRoot "c:/your-main-folder/www/sub-folder/"
DocumentRoot points to a folder that must exist in your drive.

I had the same issue. when i restarted my wamp it turns to Yellow color icon but not green.
In services i stop all sql server services. after that it works for me..
Two thinks that should must be take care.
1 ) port should be different
2 ) stop those services which can be on port 80

i faced the same issue, in my case i needed to add module in httpd.conf
the file was incomplete with incorrect keywords ( like LoadModule )
go to command line, go to C:\Apache24\bin
C:\Apache24\bin > httpd.exe
the reason for the error can be known from the output of the above command

Thanks for the help guys. I found another culprit. Recently SimplifyMedia added a photo sharing option. Apparently it too uses port 80 and prevented Apache from starting up. I hope this helps someone out.

Me also coming the same problem. The solution is goto add or remove programes then click the turn windows features on or off. Turn off the IIS. That is turn off the 'Internet information services' and 'Internet information service removable web core'. I chosed the remaining features are on. Computer will ask to restart the system. Restart ur computer and then install the apache http server. I got it. Server succesfully working...

For me, this was the result of having set the document root (in httpd.conf) to a directory that did not exist (I had just emptied htdocs of a previous project).

Windows 10 - administrator account
I needed to switch the account to an admin type account, in windows services
httpd.exe -k install
fails to add setup with enough user rights.

Related

Why does Privoxy constantly listen 1087 port after updating macOS?

Environment
macOS - 10.15.4 (19E266)
V2rayU - 2.1.0
Description
After updating macOS to 10.15.4, when I try to turn V2ray on, it says
http error - listen tcp 127.0.0.1:1087: bind: address already in use
With lsof -i :1087, I find that it is privoxy listening 1087 port. However, even I try privoxy kill it or restart, it will still appear soon and continue using 1087.
There is no similar circumstance before system update, I used to use 1087 for V2ray.
Expectation
V2ray run successfully on 1087.
(Although change the port to another is a possible solution, it is still a strange thing for privoxy itself running in the system)
The kernel_task thread will use port 1087.
lsof -i:1087 and use kill PID, and this process cannot be terminated.
I was troubled by this problem for a long time, and finally I found out that I was using ITunes to backup my IPhone data Will occupy port 1087, and finally wait for the backup to end, successfully solve the problem.
1087 is a system and network alarm logging service. It is an IANA registered port.
Well Known Ports: 0 through 1023.
Registered Ports: 1024 through 49151.
Dynamic/Private : 49152 through 65535

Running wamp 3.1.3 Apache 2.4.33 fails with make_sock: could not bind to address [::]:80 NT Kernel and System has taken it

I have done a fresh installation of wamp server, checked all distributable dependencies, killed skype, ran as Administrator...
It fails to start Apache...
In event log it fails with following 4 messages:
The Apache service named reported the following error:
AH00015: Unable to open logs .
The Apache service named reported the following error:
AH00451: no listening sockets available, shutting down .
The Apache service named reported the following error:
(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 0.0.0.0:80 .
The Apache service named reported the following error:
(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 [::]:80
So port 80 is taken, and whatever is using it has to be killed...
Here's the twist, it is used by NT Kernel and System which the way I read this is Windows core. Now obviously I can't just kill windows and begone with it...
I am not sure how to debug this further... How to figure out which system service (or whatever) I need to disable to free up the port 80 when it is marked as used by NT Kernel and System?
Figured out by myself by running cmd as admin and using netstat -bano
My mistake was that I had disabled IIS and Skype so I thought I was safe, turns out it was SQL Server Reporting Services (MSSQLSERVER) that had to be also killed.
After this wamp turned green.

Unable to connect to the remote server - No connection could be made because the target machine actively refused it 127.0.0.1

Running into the subject issue trying to update the proxies with nswag... funny enough, the app that this came with is preconfigured to use a specific port for that service, but I don't see anything on that port using netstat -ano in the command line. Does anyone have any thoughts?
Before running nswag/refresh.bat the host needs to be up and running.
To start host, copy the below lines and create a batch file (bat).
CD "D:\Github\MySolution\src\MyProject.Web.Host"
SET ASPNETCORE_ENVIRONMENT=Development
SET ASPNETCORE_URLS=http://*:22742
dotnet run
It was some settings on the server (so a corporate guy told me), so nothing on my end, but thank you everyone for your help!

How to start opennms?

I installed opennms on RHEL6 operating....i have installed all dependencies and when i am running this command
/sbin/service opennms start
then the opennms is running but i am not able to open the opennms page on my web the adress that I have been using is:
http://192.168.1.15:8980/opennms/
can any one please help me regarding this.
I have already edited iptables and the id that i have given there is 192.168.1.00/24
I have also edited discovery-configuration.xml with the same ip.
Firstly, check that the OpenNMS service is bound to either all interfaces, or the interface you expect it to be bound to:
netstat -na | grep 8980
You should see something similar to the following, assuming a wildcard bind:
tcp 0 0 0.0.0.0:8980 0.0.0.0:* LISTEN 13504/java
Next, make sure that IPtables really isn't the culprit by checking the relevant logs (if you've configured IPtables to log, that is), or by temporarily disabling IPtables (after you've considered the security ramifications of doing so, i.e. whether or not you can accept the risk of being without a firewall for a minute or two).
I don't believe that OpenNMS Discovery has anything to do with your access problem, so ignore discovery-configuration.xml for the moment.

Apache 2.4.3 (with XAMPP 1.8.1) not starting in windows 8

Just got XAMPP 1.8.1 installed on my Windows 8 PC, this version includes packages mentioned below:
Apache 2.4.3
MySQL 5.5.27
PHP 5.4.7
phpMyAdmin 3.5.2.2
FileZilla FTP Server 0.9.41
Tomcat 7.0.30 (with mod_proxy_ajp as connector)
Strawberry Perl 5.16.1.1 Portable
XAMPP Control Panel 3.1.0 (from hackattack142)
When I launched and tried to start Apache, it gave following error:
12:04:41 PM [Apache] Attempting to start Apache app...
12:04:41 PM [Apache] Status change detected: running
12:04:42 PM [Apache] Status change detected: stopped
12:04:42 PM [Apache] Error: Apache shutdown unexpectedly.
12:04:42 PM [Apache] This may be due to a blocked port, missing dependencies,
12:04:42 PM [Apache] improper privileges, a crash, or a shutdown by another method.
12:04:42 PM [Apache] Check the "/xampp/apache/logs/error.log" file
12:04:42 PM [Apache] and the Windows Event Viewer for more clues
After that I checked error.log, it was empty so no help from there.
So here is the solution for this:
I check port 80 used by Skype, after that I changes port to 81 and also along with that somewhere i read this error may be because of SSL Port then I changed SSL port to 444. However this got resolved easily.
One most important thing to notice here, all the port changes should be done inside config files, for http port change: httpd.conf for SSL httpd-ssl.conf. Otherwise changes will not replicate to Apache, Sometime PC reboot is also required.
Edit: Make Apache use port 80 and make Skype communicate on other Port
For those who are struggling with Skype, want to change its port and to make Apache to use port 80.
No need to Re-Install, Here is simply how to change Skype Port
Goto: Tools > Options > Advanced > Connection
There you need to uncheck Use port 80 and 443 as alternative for incoming connections.
That's it, here is screen shot of it.
I had the exact same error.
It was because i didn't run setup_xampp.bat
This is a better solution than going through config files and changing ports.
This problem may occur due to apache not getting required port (default is 80).
The port may be being used by other services.
For example: Skype also has default port 80.
Installing Skype and Apache both on same machine will cause conflict and hence Apache will not start.
Either, you change Skype port or change Apache port as described in following steps:
Change the ports of Apache and it will work for you.
Go to httpd.conf
How to change port for Apache:
Search for:
ServerName localhost:80
Change it to:
ServerName localhost:81
Also Search For:
Listen 80
Change it to:
Listen 81
If you have created any virtual hosts, change the ports there also.
Then restart your apache.
I had the same problem, but I understand the VMware service is the problem. VMware host service and Apache service conflict together.
To Solve it »
Run your task manager » in services tab find VMwareHostd » then right click and stop it » every thing have been solved.
Enter services.msc and shutdown anything SQL you have running.
The SQL server might be taking over the port.
I had the same problem and error, I tried changing the ports for http port from 80 to 81 and ssl port from 443 to 444 but still received the same error so I reverted the ports to default and ran setup_xampp.bat which solve the problem in seconds.
Skype is usually the culprit because it uses port 80 by default. Just close it or uncheck "Use port 80 and 443 as alternatives for incoming connections" under tools > options... > advanced > connection and then restart Skype.
I had to manually edit the 2 text files (httpd.conf and httpd-ssl.conf) using the Config button for Apache to run and change in notepad from 80 > 81 and 443 > 444
Using the Xampp UI config manager doesn't save the changes into Apache.
change 80 to 81 and 443 to 444 by clicking config button and editing httpd.conf and httpd-ssl.congf. Now you can Access XAMPP from 127.0.0.1:81
An error in your httpd.conf or other Apache config files will cause this. Revert httpd.conf et al to the pristine, installer versions and see if Apache runs again.
(I tried Skype and other suggestions here, no luck, but logs [XAMPP > Apache > Logs button] showed that it ran once when first installed. That was the giveaway.)
Likely errors:
Did you edit with a Windows text editor that changes line endings to non-Unix? (Solution here.)
Missing or invalid DSO files (.so)
I had this problem and then I ran "apache_start.bat" the error in german told me there was a problem with line 51 in httpd-ssl.conf which is
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
What I did was comment lines 163 (ssl module) and 522 (httpd-ssl.conf include) in httpd.conf;
I don't need ssl for development, so that solved it for me.

Resources