Getting connection refused on built in web server

I just enabled the checkbox "Debugger/JavaScript/Can accept external connections" and still, I can only connect to port 63342 from localhost.  External connection attemts get the "Connection refiused" transport error.  Any ideas?



external connections to this port are blocked for security reasons, to avoid possible vulnerabilities



not sure what's wrong, but here are instruction for connecting from different host:
- on a remote host, make sure to install JetBrains IDE Support extension into Chrome
- in extension options  (chrome-extension://hmhgeddbohgjknpmjagkdomcpobmllji/options.html),  specify the IP and port of the target machine
- on a target computer, start WebStorm, make sure that the port  specified in Settings/JavaScript/Debugger is the same as above and 'Can  accept external connections' is on. Open your project and run your  application. This should do the thing


I am not sure I made the problem clear.  Let me try again. When I run PHPStorm and work on an HTML page in a project (my project is called "test"), I can float the mouse arount the top right of the editor window and get a small pop-up which alows me to launch the page I am editing into a browser for test and preview. When I do this, it launches the following URL:


and I can browse the site I am working on - looking at the URL this the server that is built into PHPStorm editor. So this all works absolutely fine.  

Now here is the problem. I want to test that same site on an iPad which is connected to the same network as my computer.  My computers IP address is so from the iPad I browse to the following URL:

and I would expect to see the test site, but instead I get a "Connection Refused" message which means that the web server built into PHPStorm is explicitly refusing the connection from the external host, and this is despite me turning on the option to allow external connections.

Does this make sense?



I see:) Please try changing the default port to something else. 63342 is default port number for all IDE services
See also



Thanks that worked - very odd that the actial port number should matter. In any case I found tghe internal HTTP server to be really unstable so I have since configured Apache and thats working much better. Its really confusing trying to configure PHPStorm, there are about 1000x more options than would appear necassery IMHO. Anyway, I seem to be uop and running now...




I have to ask why would you use a default port that is not accessible to other computers on the local network. Glad I came across this article as I have spent time on this same problem, very frustrating.



At this time, there does not seem to be an JetBrains IDE Support extension.


Instead, I was able to solve the problem by following these steps.
- Open Preferences > Build, Execution, Deployment > Debugger and change the "Built-in server" port to an appropriate value (such as 8080 or 8081).
- Check the "Can accept external connections" checkbox.
- Check the "Allow unsigned requests" checkbox.
- You can access the site from an external browser.


It took a lot of time to figure out why the "Can accept external connections" checkbox was disabled for me (screenshot 1).

Turns out it is not allowed to open the default port for external connections. Changing the port to 8080 helped me (screenshot 2). You can also set it to 8081 or any other to not conflict with other software on your machine that may serve HTTP-requests.


Please sign in to leave a comment.