localtunnel: Error: connection refused: localtunnel.me:44972 (check your firewall settings)
Rubber ducking this here. Latest version from npm, 1.9.0.
lt --port 80 --subdomain elijah --local-host "local.example.com"
your url is: https://elijah.localtunnel.me
/home/elijah/.config/fnm/lib/node_modules/localtunnel/bin/client:65
throw err;
^
Error: connection refused: localtunnel.me:44972 (check your firewall settings) at Socket.<anonymous> (/home/elijah/.config/fnm/lib/node_modules/localtunnel/lib/TunnelCluster.js:47:32) at Socket.emit (events.js:182:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 26
- Comments: 42 (2 by maintainers)
@BerndErnst You may not have meant your comment to sound this way but it sounds unappreciative to me. This is a free service, the code is open source and we can spin up our own servers if we like and @defunctzombie doesn’t really owe anyone a high availability server or bandwidth.
That being said, I think the action item for this particular issue is to make the error message a bit better. I propose the message to simply be changed from > to:
And maybe distinguish between an external connection refusal vs a firewall issue for isolated error messages.
I just used
sudo
and it is workingSo the problem is that your antivirus firewall is blocking the connection, try temporary disabling it!
If you pass a subdomain name in then it will use the same one, e.g.
lt --subdomain yellowtruck
.Getting the same error. Here’s an example log:
localtunnel.sh:
Example of how I use it in a project: https://github.com/AMGAVentures/monorepo-starter/blob/46d393a02033f325862c8e95451059d7efd3f34d/packages/api/package.json#L6
https://github.com/localtunnel/localtunnel/issues/261#issuecomment-407550521
tldr; The issue is that the server is overloaded, it is a side project, what community needs is someone who wants to step up and maintain a new server, and pay for it.
Same issue here. Why is the issue closed although the problem still exists?
Same issue on mac.
Retying several times helps, with request like:
lt --port 80 --subdomain cool-api-project --local-host "localhost" -o --print-requests
Here’s a workaround with bash:
At the terminal, run npm install --save-dev forever
In your root project directory, create a new file called sendgrid_webhook.js . Add the following to that file:
var localtunnel = require(‘localtunnel’); localtunnel(5000, { subdomain: <YOUR_SUBDOMAIN> }, function(err, tunnel) { console.log(‘LT running’) }); Replace <YOUR_SUBDOMAIN> with the subdomain name you picked, so it should look something like
{ subdomain: ‘asdfasdf’ } In the package.json file, replace the “webhook” script with the following:
“webhook”: “forever sendgrid_webhook.js”
@pierrebonbon If you wait a minute and try again, repeat. You should eventually get a connection established.
The localtunnel server experiences times of high load and instability because it is a free public service. Often retrying (as suggested in the comments) helps.
If you need a reliable test server you can setup your own localtunnel server backed (see the server repo).
I reverted to localhost@1.8.3 and it started working again. 2.0 did not work for me.