question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't connect to server on port XXXXX

See original GitHub issue

I’m having a problem when trying to access one of the projects through the .dev domain. The output that appears in the browser is as follows:

Can't connect to server on port 45355. Server crashed or timeout of 5000ms exceeded. Retry or check logs.
sh -c npm start


> pomodoro-app@0.0.0 start /home/julianorafael/Development/projects/pomodoro-app
> cross-env NODE_ENV=development node server.dev.js

Starting server...

Server started
Listening at localhost:3000

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
typicodecommented, Apr 18, 2016

Just in case others encounter the same issue, @jalada has found a workaround. You need to bind to 127.0.0.1. There’s usually an option for that, for example with Rails it looks like this:

hotel add 'rails s -p $PORT -b 127.0.0.1'

However, feel free to report issues with other servers.

0reactions
dominikmuellercommented, Apr 6, 2016

I can confirm this problem. I’m using ruby with sinatra. Everything worked/works fine when i’m using the WEBrick server but as soon as i install the rubygem ‘thin’ i’m getting the same problem (-> after installing thin, sinatra starts the thin webserver).

Console output when running with WEBrick (working):

2016-04-06 14:35:13] INFO  WEBrick 1.3.1
[2016-04-06 14:35:13] INFO  ruby 2.2.3 (2015-08-18) [x86_64-darwin14]
== Sinatra (v1.4.7) has taken the stage on 4567 for development with backup from WEBrick
[2016-04-06 14:35:13] INFO  WEBrick::HTTPServer#start: pid=52759 port=4567
^C== Sinatra has ended his set (crowd applauds)

vs.

Console output when running with thin (not working)

== Sinatra (v1.4.7) has taken the stage on 4567 for development with backup from Thin
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on localhost:4567, CTRL+C to stop
WARN: tilt autoloading 'tilt/haml' in a non thread-safe way; explicit require 'tilt/haml' suggested.
^CStopping ...

Maybe it helps in the debugging process 😉

I’m using WEBrick for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

network error: could not connect to server.. xxx.xxx.xx.xxx:port
This can be resolved by following the below steps - 1. Login to your SolusVM admin portal. 2. List the causing VPS. 3....
Read more >
Unable to connect to the MKS: Failed to connect to server ...
Unable to connect to the MKS: Failed to connect to server XXXXXX:903 ... the most possible cause is firewall configuration that blocks traffic...
Read more >
Can`t connect to mysql server on X.X.X.X on Windows
The detailed problem can be from two different causes: First option: MySQL is binded to 127.0.0.1 or no ip at all. Check netstat...
Read more >
How to fix the problem “can't connect to server, check internet ...
Check if your local dns server is working. It might have crashed. If you have internet connection but can't browse, it's probably that,...
Read more >
Can't connect to server from certain machines
You probably have a router between the VLANs, right? I'd start from the router and establish that you can ping from there both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found