Cannot bind to port 8080. It is probably taken by another application or you don't have enough privileges - apache

I deleted my XAMPP from the applications folder(without uninstalling) and installed it again then I tried to change my apache port 8080 after that this problem showed up 'Cannot bind to port 8080. It is probably taken by another application or you don't have enough privileges'
I tried to fix it by uninstalling and installing again it didn't work then I deleted cache files of XAMMP with some sudo code but it didn't work anyway

in windows to check what ports applications are running on, open command prompt as admin and type "netstat -a -b"
stop whatever application is running on port 8080

Related

WAMP crashed after computer shutted down

Wamp doesn't work since my computer suddenly shutted down (having run Wamp), yet before that it was working fine. The system is Win7 64-bit.
I'd installed again Wamp x64, problem hadn't been solved. I did the same with Wamp x32 but problem still was current.
When I select Apache->Service->Test Port 80, I get Your port 80 is not actually used. When it is Apache->Service->Install service, I get Your port 80 is available, Install will proceed. After restart nothing gets turn to the better.
Moreover, when I get in Apache->Modules, there is exclamation mark in red triangle next to 4 Apache modules: auth_form_module, cache_socache_module, macro_module, proxy_wstunnel_module. In the past, about 1 installation back, I couldn't connect to MySQL.
Port 80 is NOT used by Skype, IIS or whatever else - I've checked it by various methods. No firewall or antivirus hits the spot - before it was running with no problem.
Doings in httpd.conf, including changing port number to 8080 or 81, brings no progression.
I walked through half of internet but no solution solves the problem.
Wamp icon is still red, when i hit localhost, NOT FOUND is printed.
WAMP wasn't working because of a virus app named YAC (Yet Another Cleaner). It's next to impossible to uninstall it, yet it's possible: one must run Windows in safe mode and then delete its directory by hand (Shift + Del).
uninstall wampserver completely, then restart your computer, then reinstall again, do following this video maybe help you
https://www.youtube.com/watch?v=u5qkfXB2c3I
note: you don't need to change port 80, if it available.
It sounds like your network stack may have got corrupted try these commands from a windows terminal that you have started using the "Run as Administrator" menu option
netsh winsock reset
netsh winsock reset catalog
netsh int ip reset reset.log
netsh int ipv4 reset reset.log
netsh int ipv6 reset reset.log
ipconfig /flushdns
Reboot if necessary
Try WAMPServer again

How to run glassfish 4 on port 80 instead of 8080? root access is not an issue

Did some google on it and the solution was to redirect using iptables or mod in apache? Since my application uses websockets the above solution breaks my websocket connectivity and I again have to connect to my websockets using port 8080. Is there any way that I can run the glassfish itself on port 80 so that my websockets also run on port 80 making easier for users behind corporate firewall to access the app since corparates may block 8080.
I have root access as well.
To run GlassFish on port 80 you need to :
Connect to the administration interface (by default on port :4848)
In the left menu go to Configurations
Then select the appropriate configuration you need to change eg server-config
Then go to Network Config
Then go to Network Listeners
Select the appropriate listener, probably http-listener-1
Change the Port value to 80
Save and reboot your GlassFish server/instance/cluster according to your needs
Using the command line utility
asadmin set configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.port=80
you may need to replace server-config and/or http-listener-1
Go to glassfish4\glassfish\domains\domain1\config folder and here open domain.xml file
and find tag
<network-listeners>
<network-listener port="9999" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
</network-listeners>
in port attribute of <network-listeners> you can specify your port address whichever you want.
Here's another approach.
You can go to the admin console under port 4848 (I am using Glassfish 4.1.2) and navigate to "Configuration" > "server-config" > "HTTP Service" > "Http Listeners" > "http-listener-1" in the left hand navigation.
Click on the "http-listener-1" link in the main content window.
Change the port to desired number and save.
Restart Glassfish and run your application.
in some cases you have to change port before glassfish is started (in my case port 8080 is already in use by another instance) so answer 4 worked for me.
Following are simple steps to change the port number of Glassfish server (GlassFish runs by default on port number 8080):
Go to the folder where Glassfish is installed.
Locate config folder which is as follows (Windows):
C:\Program Files\glassfish-3.0.1\glassfish\domains\domain1\config
Open domain.xml using any text editor.
Look for 8080 and change it to some other port number that doesn’t conflict with other port numbers (e.g. 8081).
Save domain.xml.
Additional step if necessary:
Now remove GlassFish from IDE and add it again so that IDE understands the new port number.
Restart GlassFish, if it was already running.
Soruce Link

Port 443 in use by "Unable to open process" with PID 4

I have a very strange problem with my Apache 2.4 working with Xampp 1.8.2 on Windows Server 2008 R2.
When I tried to start Apache server in XAMPP, an error message is shown:
[Apache] Problem detected!
[Apache] Port 443 in use by "Unable to open process" with PID 4!
[Apache] Apache WILL NOT start without the configured ports free!
[Apache] You need to uninstall/disable/reconfigure the blocking application
[Apache] or reconfigure Apache and the Control Panel to listen on a different port
However, the process with PID 4 is system! I've tried to restart my computer and it doesn't work.
I have installed Apache 2.4 via a tar.gz file sereral days ago, and uninstalled it. So, I don't think this behavior will cause the problem.
And here's the result using commond netstat -a -n -o | findstr 443
C:\Users\Administrator>netstat -a -n -o | findstr 443
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 4
TCP [::]:443 [::]:0 LISTENING 4
Can you tell me what to do?
Just change the sll port in httpd-ssl.conf file. It would be under C:\xampp\apache\conf\extra.
Find "443" and replace it with other values(e.g 8181), then start your apache again
I had the same problem: port-443-in-use-by-unable-to-open-process-with-pid-4
First I disabled the weather tile in Win* that apparently phones home to Redmond for updates after this showed on netstat list.
This didn't solve the problem. I looked at the post already here which mentioned VPNs, so
I went to Control Panel\Network and Internet\Network and Sharing Center and clicked on Change adapter settings
I clicked on Incoming Connections and right clicked on properties
The VPN click box at the bottom of the General tab was on, so I unchecked it
Under Users, I also unchecked a previous user I had allowed to copy some data weeks before
Then I clicked okay
Closed the control panel and restarted the XAMPP control panel
It fired right up without a problem.
Similarly, I experienced this:
Port 443 in use by "Unable to open process" with PID 6012!
When starting XAMPP Control Panel v3.2.1 for the first time.
In Task Manager I found that PID 6012 was Apache web server.
A copy of it was running in the background without the GUI,
and when I invoked the GUI it was trying to start another copy.
Killed the phantom copy and then XAMPP started up fine.
I didn't have to change any port settings.
Modify this
LocalDisk **>>** xampp **>>** apache **>>** conf **>>** httpd.conf
Line 58: Listen **80**
for this
Line 58: Listen **8080**
Modify this:
Line 220: ServerName localhost: **80**
for this
Line 220: ServerName localhost: **8080**
Modify this:
LocalDisk **>>** xampp **>>** apache **>>** conf >> extra **>>** httpd-ssl.conf
Line 36: Listen **443**
for this
Line 36: Listen **444**
Modify this:
Line 121: <VirtualHost _default_:**443**>
Line 125: ServerName www.example.com:**443**
For this
Line 121: <VirtualHost _default_:**444**>
Line 125: ServerName www.example.com:**444**
Simply run as Administrtor "xampp-control.exe"
I had the same problem. Another way to solve this problem when running XAMPP on Windows:
Open a CMD prompt and type in command:
net stop was /y
Run Dialog Box (press keys Win+R)
.. then type: services.msc
I then scrolled down to:
World Wide Web Publishing Service
Double clicked on it and clicked STOP (if this service status is Started)
3.Start Apache again with XAMPP :)
Link Ref: http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
Some process is using this port, so you can change the port that is used by xampp, to be able to use it.
For this job you have to do this:
1- Open httpd-ssl.conf in xampp\apache\conf\extra
2- Look for the line containing Listen 443
3- Change port number to anything you want. I use 4430. ex. Listen 4430.
4- Replace every 443 strings in that file with 4430.
5- Save the file.
Probably some process is using that port, i would guess you have another webserver running with ssl/tls already. You must trac down what process is using the port and shut it down. The fact that it does not help to restart your computer makes me think that you may find what you are looking for in msconfig. Try to have a look there, open prompt and write msconfig
post 443 is normaly used by secure http, => https
I have never used windows server but there could be some built in webserver that autostarts, have you ever installed another webserver?
Try use the command Netstat -a -n -o to see what process that is blocking. you can the process pid from the output.
The
Routing and RAS - service is your problem i guess look at this post
it does this, thats why its blocking:
SSTP tunneling protocol
Secure Socket Tunneling Protocol (SSTP) is a new form of virtual private networking (VPN) tunnel with features that allow traffic to pass through firewalls that block PPTP and L2TP/IPsec traffic. SSTP provides a mechanism to encapsulate PPP traffic over the SSL channel of the HTTPS protocol. The use of PPP allows support for strong authentication methods, such as EAP-TLS. The use of HTTPS means traffic will flow through TCP port 443, a port commonly used for Web access. Secure Sockets Layer (SSL) provides transport-level security with enhanced key negotiation, encryption, and integrity checking.
from tecsupport.ms
Below steps by sztupy worked for me
I went to Control Panel\Network and Internet\Network and Sharing Center and clicked on Change adapter settings
I clicked on Incoming Connections and right clicked on properties
The VPN click box at the bottom of the General tab was on, so I unchecked it
Under Users, I also unchecked a previous user I had allowed to copy some data weeks before
Then I clicked okay
Closed the control panel and restarted the XAMPP control panel
I simply went to the XAMMP config button in the XAMPP control panel GUI and clicked on Server and Port settings and I changed the SSL port value.
I had the same problem when I installed xampp on Windows 7. I installed Windows server and Web Deployment Agent Service (MsDepSvc.exe) which uses port 80. So I had an error PID 4 listening to port 80 when I ran apache.
Solution
Open task manager: (Ctrl+Shift+Esc) then find "MsDepSvc.exe" and disable it. Finally restart xampp
ref: http://www.honk.com.au/index.php/2010/10/20/windows-7-pid-4-listening-port-80-apache-cannot-star/
Here it was the "Work Folders" feature having been added on a Server 2012 R2. By default it is listening for HTTPS client requests on port 443 via the "System" process.
There is a Technet blog post explaining how to change that port number. Don't forget to add a corresponding firewall rule for your custom port and disable the existing one for port 443 though.
I got this same error and managed to fix it by closing Skype and running XAMP as Administrator, works perfectly now. So right click THE XAMP icon and click run as admin.
The port is being used by another process,
PID 4 means it is Windows System, you can open a cmd window with "super user/administrator" priviledges and write "net stop http", it will stop all the web services. Then check if it freed the port.
I had the same problem and it happened to be the "Routing and Remote Access Service". You open Services in the windows search, and then look for the specific service name. Change the startup of it to manual or automatic (whatever you decide).
Use some app like TCPView to help what port each App PID is using.
The origin of the problem seems to be Microsoft not knowing what the word disable Microsoft VPN means...
I ran task manager and looked for httpd.exe in process. Their were two of them running. I stopped one of them gone back to xampp control pannel and started apache. It worked.
I had the same problem and solved by doing following.
Go to Task Manager, click on services tab, order by pid's than if you find the related process, kill it otherwise, right click and click on show details, the process should be shown now. order by pid's than kill the related process.
I had this same problem with port 443, process id 4 and everything. For me it was not the VPN using the port, it was IIS. To fix this I opened up IIS and right clicked on my instance and stopped it. Then IIS Express(Or apache if you're using that) was able to use port 443. Hope this helps someone else.
I had a similar issue where port 443 was blocked by PID 4. After breaking my head for several hours I found the command netsh show urlacl which gave me an idea of the system process blocking the port.
To run command run cmd or windows shell in administrator mode.
netsh
http
show urlacl
I got response a which showed 443 was blocked by NT Service SSTPSvc Reserved URL
Response
https://+:443/sra_{BA195980-CD49-458b-9E23-C84EE0ADCD75}/
User: NT SERVICE\SstpSvc
Listen: Yes
Delegate: Yes
User: BUILTIN\Administrators
Listen: No
Delegate: No
User: NT AUTHORITY\SYSTEM
Listen: Yes
Delegate: Yes
With this information I followed the microsoft link to change the listening port for SSTP based vpn. https://support.microsoft.com/en-in/kb/947032
This resolved my port issue.
A simple way to fix this is to change the XAMP port to a random number.
The solution by "Mark Seagoe" worked for me too.
I got a message that "Port 443 in use by Unable to open process with PID 14508".
So i opened task manager and killed this process 14508. This was used by my previous xampp version and it was orphaned.
so no need to change any ports or anything, this is a simple two step process and it worked .
STEPS
Un-install apache(xampp) software from your windows.
Delete the xampp folder from c folder.
Delete the folder from recycle-bin to permanently delete the xampp folder
Restart your computer.
Finally install a clean copy of apache(xampp) software.
(By Engineer Rafiq Ahmad Qureshi)
qureshi.rafiq111#gmail.com

errors attempting to start Apache through XAMPP

This is what shows up when I attempt to run Apache without Apache service being activated:
>Status change detected: running
>Status change detected: stopped
>Error: Apache shutdown unexpectedly.
>This may be due to a blocked port, missing dependencies,
>improper privileges, a crash, or a shutdown by another method.
>Check the "/xampp/apache/logs/error.log" file
>and the Windows Event Viewer for more clues
This is what happens when I attempt to install the Apache service:
>Installing service...
>Apache Service detected with wrong path
>Change XAMPP Apache settings or
>Uninstall/disable the other service manually first
>Found Path: ERROR: Not Able To Open Service Manager
>Expected Path: "c:\xampp\apache\bin\httpd.exe" -k run service
>Successful!
...followed by attempting to start Apache after the service (failed) attempt:
>Attempting to start Apache service...
>System Error. Code: 5.
>Access is denied
Does anyone know what's going on here and/or are able to help troubleshoot?
I've already uninstalled and reinstalled with and without (zip file extraction) the installer.
It sounds like something may be running on port 80 already. What happens when you run
netstat -an |find /i "listening"
from the command line?
I had those messages as well. You probably have IIS and XAMPP clashing at port 80. You can either:
disable IIS (if you are not going to run the server regularly).
change XAMPP default ports.
change IIS default ports.
To change XAMPP default ports
Open your XAMPP\apache\conf\httpd.conf file and change the "80" ports to something else, people like "8080".
Open your XAMPP\apache\conf\extra\httpd-ssl.conf file and change the "443" ports to another number.
It should make both services run without conflicts.

SelfSSL7 custom CN with a local development domain

I have my site mydomain.local on my local development machine, which uses a local hosts file entry to point to 127.0.0.1. The directory is my working git copy and it works like a charm. It always points to whatever I have checked out.
I want to setup SSL but of course need to test locally and with my code before I go implementing it elsewhere. This is my Win7 Ultimate machine and this dev environment uses full-blown IIS 7.5 and not any built-in IIS express or localhost:port# auto-config.
Through multiple experiments, I've resorted to SelfSSL7 for greater control and setup of a self-signed SSL certificate. It has a great set of options and seems to work well.
Accordingly to the limited docs, I generate my SelfSSL cert with this command:
SelfSSL7 /Q /T /I "mydomain.local" /S "MyDomain IIS Name" /N cn=pc_name;cn=localhost;cn=mydomain.local
It does properly bind to my IIS setup with the right domain. BUT when I try to start the Site,I get this error:
The process cannot access the file because it is being used by another process. (Exception 0x80070020)
I look up these errors and am instructed to check which services are listening on port 443 for SSL. This is a snippet of the output from my netstat -ano output (where port==443) (I've trimmed all else)
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 5800
TCP [::]:443 [::]:0 LISTENING 5800
Problem is that the documentation sucks (surprise) and I'm not sure where to go from here. The registry path they've specified does not actually exit on my machine (no ListenOnlyList folder in Regedit). Also, I have 0 other IIS sites setup and definitely none setup on SSL over 443.
SUMMARY: the SSL cert can be generated, looks right, but I cannot Start the site in IIS once it's binding is in place. Again, SSL looks right - maybe it's more about my machine config with regard to port 443 and "socket pooling" (???)
I had the same problem, in my case I just stoped the iss server, closed skype, and restarted the server and skype, it worked, it seems that skype was using port 443.
Looks like you already have a program listening on port 443. Use Task Manager or Process Explorer to check what program is running with Process ID 5800 and then kill that.