how to solve Apache Error i already changes the ports but couldn't what the Error is? - apache

03:32:35[Apache]Problem detected!
03:32:35[Apache]Port 80 in use by "Unable to open process" with PID 4!
03:32:35[Apache]Apache WILL NOT start without the configured ports free!
03:32:35[Apache]You need to uninstall/disable/reconfigure the blocking application
03:32:35[Apache]or reconfigure Apache and the Control Panel to listen on a different port
03:32:35[Apache]Attempting to start Apache app...
03:32:35[Apache]Status change detected: running

As log said, Port 80 is already used by another process
to check wich process use port :
WINDOWS: netstat -a -b
LINUX : sudo netstat -tulpn (must run with root)
To change the port of Apache, you have to modify this file:
APACHE_INSTALLATION_PATH/conf/httpd.conf and change this configuration Listen 80 to the port you want to use, example : Listen 8085
N.B: in your browser you must type this url http://www.mywebsite.com:8085 instead of http://www.mywebsite.com ( == http://www.mywebsite.com:80)
You must restart your apache server
I think that skype is using port 80, but i'm not sure

Related

I have a problem when start apache on windows

When I click start I get this error
2:30:55 PM [Apache] Problem detected!
2:30:55 PM [Apache] Port 80 in use by "Unable to open process" with PID 4!
2:30:55 PM [Apache] Apache WILL NOT start without the configured ports free!
2:30:55 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
2:30:55 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
open cmd in administrator mode and type this line
netstat -aon | findstr "80"
you will find pid of apps that use this port take that pid suppose we find pid 4 then type this line in cmd
tasklist /fi "pid eq 4"
you will get application name you can unistall this app or close
you can type in cmd
taskkill /PID 4 /F
also mostly 'Workstation' Services make trouble for port
you can stop through Services.msc and stopp 'Workstation' Services
Your port 80 is probably busy. What you can do is closing the service running on this port as Akram answered or, if you have to keep the port 80 free for something like node.js for exemple in my case or any other program, you can change the listening port in the Apache config files.
Go to XAMPP panel > Apache config button > httpd.conf
Then search for Listen 80 and edit it to Listen 8080 or Listen 8008.
/!\ Don't assign any other port than HTTP provided ones, you could have conflict between your services /!\
Remember that you'll have to change the address in the browser to access the server, for exemple http://localhost:8080 if you switched port to 8080.

Apache configured to listen on port 80 only but instead listening on port 8080 as well

I was not able to use port 8080 because it was apparently already used.
In order to see which program was using it, I typed the following command in my terminal (on MacOS):
sudo lsof -n -i :8080
Here's the result:
httpd is also listening on port 80, which I found out by using the following command:
sudo lsof -n -i :80 | grep LISTEN
Here's the result:
So I went to find out what this "httpd"-process was. Apparently it is basically the web server installed on my machine. The web server installed on my machine is Apache2.
Given this fact I concluded that Apache2 was apparently configured to listen on port 80 AND on port 8080.
BUT: Here's the crazy thing: I went to the folder /etc/apache2 and opened the file "httpd.conf". In the file Apache is configured to listen on port 80 only !!!
Why the hell is it also listening on port 8080 ?!
How can I make it listen on port 80 only ?

RethinkDB: Port 8080 does not start after setting up system startup

I followed the guide on RethinkDB Documentation
After setting up RethinkDB on system startup on Ubuntu 14.04 server, port 8080 does not start.
I checked rethinkdb log.
2015-10-29T18:28:53.207447805 0.086002s notice: Listening for administrative HTTP on 127.0.1.1, 10.17.0.6, 159.203.115.29, 10.132.204.34
What am I doing wrong?
Maybe you already had something listen on port 8080 but only for 127.0.0.1, from your log, the server did listen on 127.0.1.1, 10.17.0.6, 159.203.115.29, 10.132.204.34.
Try to check your /etc/hosts to see if you assign something to 127.0.1.1 and check the binding
lsof -i :8080
Once you found out the program that listen on, try to remove/stop it from binding to that.
Also, you can try to run this command directly:
rethinkdb --bind all
to ensure that RethinkDB will bind to all ips.

Getting the error "Apache port:443 is being used by another application" after installing AMPPS

After installing AMPPS for Windows, while trying to launch Apache I get an error saying,
Apache port:443 is being used by another application.
I do not have any other programs (that I know of) such as Skype that are currently running. How can I monitor my 443 port or change the port for Apache?
By the way, I have McAfee as an anti-virus.
Open command prompt(start -> run -> cmd) and type the following command :
C:\> netstat -aon | findstr 0.0:443
Last column of the output is the PID of the application using port 443.
You can find the application name in Task Manager. Go to Process Tab then in Menu Bar of Task Manager go to View -> Select Column -> Check "PID" and press Ok. Search for the PID in the list(Click Below "Show processes from all users" in case if you don't find the PID), corresponding process is the application which is using port 443. Stop or Uninstall it to make your AMPPS Apache work.
For terminate any process:
open cmd as administrator
netstat -aon | findstr 0.0:443
shows: TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 4876, NOTE THE PID 4876
taskkill /pid 4876 /f
For disable port of other program(vmware):
open VMware Workstation
Edit->Preferences...->Shared VMs->Change Settings->Yes->Disable Sharing
You can change the port. -> Ok
I was facing the same issue as on port 443, vmware service was running, i went to task manager and stopped the service and then started apache and it worked fine.
After getting the pid number using netstat -aon | findstr 0.0:443, if you are having trouble finding pid 443 in Task Manager then:
Kill the process 443 by using the cmd: taskkill /pid 443.
You will avoid downloading any software or any other headache.
Here is the more elaborated way to solve this issue based on comments from Jigar and Daniel Dropik(Thank You guys),
So check with which service you are getting this port issue, in my case it was with Apache and MySQL.
Starting with Apache, either click on "Logs" in XAMPP control panel and open error log to see the problem or go to XAMPP installation directory and run "apache_start.bat" batch file, this will also give to the problem cause.
Now you have got the Port number which causing trouble,
Now follow Jigar's comment and run
netstat -aon | findstr 0.0:443
Remember 443 is the port number so enter the port number causing the issue.
This command will give the PID of the process using the port like below,
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 4996
So 4996 is the process ID(PID) that you want to stop.
Now using Task Manager you could see and kill the process but some processes could not displayed by Task Manager, in this case you have to download Mycrosoft's Process Explorer, unzip the downloaded package and run the ".exe" file as an Administrator.
You will find a bunch of processes running, sort them using PIDs and you will find your service.
Select that service and stop it.
Then go to the XAMPP control panel and run Apache and you will be able to start it this time.
Follow same process for MySQL as well.
Enjoy :)
First off you must find the process using that port. we can find it with below command.
netstat -aon | findstr 443
then we might finish finded process either below command:
taskkill /PID PORTNUMBER /F
OR
you can go to taskmanager and find the process from process bar ( with swiching PID column) and click on end task.
go to Ampps\apache\conf\extra
open file httpd-ssl.conf with note++
change the port
Listen 443--->change port
VirtualHost default:443--->"change port **>
DocumentRoot "D:/Ampps/www"
ServerName localhost:443--->**change port
and saved

Is it good to release these ports?

When I am trying to start Apache server from Eclipse, I am getting message as:
Several ports (8085, 8009) required by Tomcat v6.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
I find the ports are opened by any process by the OS using "netstat -an"
I found below data as listening.
TCP 0.0.0.0:8009 0.0.0.0:0 LISTENING
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING
TCP 0.0.0.0:8085 0.0.0.0:0 LISTENING
TCP [::]:8009 [::]:0 LISTENING
TCP [::]:8080 [::]:0 LISTENING
TCP [::]:8085 [::]:0 LISTENING
I don't know whether this are useful process, or can I release this ports.
If tomcat is already running eclipse will report this. This could happen if eclipse crashed.
If you only have one instance of tomcat on your machine
Try stopping it
bin/shutdown.sh
or on windows
bin/shutdown.bat
and then restarting tomcat from eclipse.
On linux
You can verify those ports are in use by another tomcat (or the same one that is already running) with
netstat -anp #running as the superuser the -p option will say what the process is
You can then check the process table to cross reference the ports
ps aux | grep java
or
ps aux | grep 1234 #replacing 1234 with the PID reported by netstat
If it is tomcat and it won't shutdown after running bin/shutdown.sh then you can kill it using the kill commmand.
If you do have something else that is using those ports
edit conf/server.xml
change the ports that tomcat will use, try 6080, 6005, etc
start tomcat from eclipse again