localtunnel / server

server for localtunnel.me
https://localtunnel.me
MIT License
3.02k stars 979 forks source link

404 and client crashes after a few seconds after connect #120

Open iiko1c opened 4 years ago

iiko1c commented 4 years ago

"When I use my own localtunnel server it shows "404". But when I use the default localtunnel.me it works perfectly.

Also i noticed. If i access my LT server, i'm able to access http://my-lt-server.example.com:47777/api/status but http://my-lt-server.example.com:47777/api/tunnels/[tunnel-id]/status will return a Not Found page.

I just found out after running tunnel from my dev machine.

lt --host http://my-lt-server.example.com:47777 --port 80

It crashes after a few seconds. But it doesnt show any error. Is there a way to find the error?"

guillermojmc commented 4 years ago

I have the same problem. I tried as a dependency and it doesn't show errors either.

bogdanrn commented 4 years ago

same issue here

nvthuong1996 commented 4 years ago

same issue

Fatflo commented 4 years ago

same

mquekel commented 4 years ago

Same issue for me as well

mikericks80 commented 4 years ago

Likely your server doesn't have high TCP ports open on the firewall for the tunnel connections. Start the server with debug enabled to see more info:

DEBUG=* node -r esm bin/server --host http://myhosthere.com --port xxxx

knockshore commented 3 years ago

After running this:

DEBUG=* node -r esm bin/server --port 9000 --domain <sub.domain.tld>

Got this

  koa-router defined route HEAD,GET /api/status +0ms
  koa-router defined route HEAD,GET /api/tunnels/:id/status +3ms
  koa:application use dispatch +0ms
  koa:application use allowedMethods +0ms
  koa:application use - +1ms
  koa:application use - +0ms
  localtunnel server listening on port: 9000 +0ms
  koa-router GET / +0ms
  koa-router test /api/status /^\/api\/status(?:\/(?=$))?$/i +0ms
  koa-router test /api/tunnels/:id/status /^\/api\/tunnels\/((?:[^\/]+?))\/status(?:\/(?=$))?$/i +1ms
  localtunnel:server making new client with id spotty-chipmunk-40 +0ms
  lt:TunnelAgent[spotty-chipmunk-40] tcp server listening on port: 42659 +0ms
  lt:ClientManager removing client: spotty-chipmunk-40 +0ms
  lt:TunnelAgent[spotty-chipmunk-40] closed tcp socket +1s
  lt:TunnelAgent[spotty-chipmunk-40] closed tcp socket +0ms
knockshore commented 3 years ago

Thanks for the suggestion. It seems the host server is behind the firewall and the lt client was not able to connect to the lt server created randomly port.

WINOFFRG commented 2 years ago

Hello! Anyone found the solution to this problem?