I have downloaded NetBeans-8.0.1-windows and MySQL 5.0 setup and tomcat 8.5 and successfully installed on win 7 OS.
Now I am trying to start Apache Tomcat but it always shows error like
Starting of Tomcat failed, the server port 8080 is already in use.
Please help to solve this issue. I have downloaded mysql-connector-java-8.0.17.zip and unzipped it.
First, try to check if the port 8080 is on use:
Run command-line as an Administrator. Then run the below mention command.
netstat -ano | findstr :8080
The red-colored circled area shows the PID (process identifier). If you are getting something like the above image, kill the running processes on that port.
Then you execute this command after identifying the PID.
taskkill /PID <typeyourPIDhere> /F
P.S. Run the first command again to check if the process is still available or not. You'll get an empty line if the process is successfully ended.
The answer is taken from the following link: http://www.callstack.in/tech/blog/windows-kill-process-by-port-number-157
Related
When i start any web project in netbeans it start tomcat in xammp by dfault but when tomcat is in running state Mysql(php admin) page not open i think there is some kind of port issue please guide me about this issue
change pot mo in config files
Find out what ever the port that error cause and you can kill that usage by following theses steps. Here I take 3325 as my port.
Open cmd and type netstat -ano | findstr 3325.
Then type this code with what ever the output that you gets. Here I get 10360 as my output for the 1st one. taskkill /F /pid 10360
Using this method you can kill the process of port that already in use. Kill the relevant process that is not needed if there are multiple processes hang on this port. This might be helpful to fix your issue.
I am new to Coding and Computer Science, and i was working with React-native on Android Studio. Whenever i start to use the simulator on the machine it asks me this:
ERROR Packager can't listen on port 8081
Most likely another process is already using this port
Run the following command to find out which process:
Tough i have killed the process listening to Port 8081 the previous time i have started the simulator but it asks me agaain. Wants to understand what port 8081 is assigned to once it is killed using the taskkill /f /pid $$$$
Hey even i had the same issue,i solved it by the following:
1.) lsof -i :8081
2.) kill -9 <PID> kill the process that is running on the port 8081 by specifing the PID that you get as a result of step 1.
OR
You can try running it on another port by using the command 'react-native start --port=8088'
If you get an error stating "Could not connect to development server" then try npm start,it should work.
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
I am trying to get the Selenium server up and running. However, when I type:
java -jar selenium-server-standalone-2.0b3.jar
I get an Exception:
Selenium is already running on port 4444. Or some other service is.
I have tried to stop it, just in case it really is running:
http://localhost:4444/selenium-server/driver/?cmd=shutDown
That gets me the message:
ERROR Server Exception: sessionId should not be null; has this session been started yet?
If I just write:
http://localhost:4444/
I get:
HTTP ERROR: 403
Forbidden for Proxy
Ideas?
This worked for me:
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
If selenium server is already running on port 4444 then it will shut down the server and says
OKOK
if selenium is not running on this port 4444 then by hitting above url will give you
"Unable to connect"
try this:
lsof -i -n -P | grep 4444
and kill the process it says is on :4444
One-liner:
kill -9 $(lsof -ti tcp:4444)
The error message Selenium offers up is a little confusing. It really should be telling you you're making a syntax error. I had this problem as well. Make sure the cmd string is PRECISELY like this:
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
That means using the full command shutDownSeleniumServer, and make sure the s in shut is lower-case (That was my mistake).
Hope this helps.
To shut down the server you can use:
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
It will give message OKOK , means it got shutdown. If the server is not running then it will show "This web page not available"
To check the selenium server status , use this
http://localhost:4444/selenium-server/driver/?cmd=getLogMessages
It will give OK if server is running , if not running then it will show webpage not available
If you are using Windows, you can open the task manager and locate the java.exe or javaw.exe process and kill it. This will release port 4444 and you should be able to restart the Selenium server.
I had the same error but no server was running.
Tuned out the java version was in cause. Make sure you are running java 7 or higher:
java -version
lsof returned no results in my case.
On a Ubuntu machine I had to do the following:
sudo netstat -tapen | grep ":4444 "
Reply was like:
tcp6 0 0 XXXXXXXXX:4444 :::* LISTEN 107 31526 **10479**/java
And to kill the Selenium server process identified (in my case) with 10479
sudo kill 10479
In OSX if you follow the command from #HaloWebMaster (lsof -i -n -P | grep 4444) the next step is to take the PID (usually a 4 - 5 digit number indicating the process ID) and run the following command:
kill -9 <PID>
You shouldn't need sudo unless the process was started by another user or root.
If you started Selenium using Java (instead of via whatever testing framework you may or may not be using), you can kill all leftover Selenium instances with:
pkill java
That's guaranteed to kill any java relics (including selenium if started this way) - but be careful here - caveat is that you might be killing other procs too (due to the way pkill works). In my case, I want to kill anything running in the JVM, so this solved it for me.
As per the comment from Goldberg below, note that this will not kill any driver services or browsers running on your system!
I had the same problem , I started my Jboss AP where i have my application deployed and after that tried to run the selenium server and couldn t start. The problem was that Jboss uses the same port that Selenium server uses, so what I did is to start selenium server on a different port
Solution:
java -jar selenium-server-standalone-2.0b3.jar -port 1234 -htmlSuite "*firefox" "http://localhost:8080/" "path to the suite" "path to the results"
For Windows, try this:
taskkill /PID <ProcessID> /F
If you get a 403 error on 127.0.01:4444 and not a 404 one, something is running there. (You're positive it cannot be a previous instance Selenium ? It'd be the most logical.)
Sometimes Selenium continue running in the background after an unexpected exit. I'd suggest checking the running processes, or rebooting the machine if everything else fails.
It happens to me frequently when Hudson asks Selenium-Server to run some tests and it fails in the middle for some reasons. Killing the process solves the problem.
That ERROR Server Exception: sessionId should not be null; has this session been started yet? message comes from Selenium. If you're seeing it, there's a Selenium server running on that port number.
If all the above is not working, please save your work and reboot your system. It will solve the problem
Thanks,
The link of Andre works fine for me.
As 4444 is the default port of Selenium check this as well.
I'm working on my OS X with the default installation of Apache. For some reason, when I run the "apachectl" command without the "sudo" I get "no listening sockets available / unable to open logs." I'm guessing this is a permissioning thing, so can someone help me out? I'm using Apache 2.2.
Also, side question, where the the Apache script file that is basically the "exe" that linux executes? I'm trying to intergrate my server with Aptana Studio, and it requires the path to the Apache install. I know in Windows, this would be "C:\path\to\httpd.exe", but I don't know how this works in linux.
Is your server listening on port 80? (Usually) only root is allowed to open ports below 1024. Hence the need for sudo.
As you can see, lots of people wonder how to get around this. One possible solution is to perform port-forwarding on your router. (I'm assuming here that you are behind a router...). Then incoming connections on port 80 can be forwarded to e.g. port 8080. Thus only locally does one need to connect to port 8080. (There may be more elegant solutions... somebody else will post them.)
I think generally (on both OS X and Linux - I'm not sure which one you're referring to) the httpd binary is located at: /usr/sbin/httpd
If you need to be able to restart Apache, and you can't do so as root (for whatever reason..), then you may have to settle for a non 'well known' port.
try this
(with php)
$a = shell_exec('sudo -u root -S /etc/init.d/apache2 restart < /home/$user/passfile');
password should stored in passfile