Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown Error - 502 status code from client #13

Closed
spirodns opened this issue Sep 15, 2014 · 2 comments
Closed

Unknown Error - 502 status code from client #13

spirodns opened this issue Sep 15, 2014 · 2 comments

Comments

@spirodns
Copy link

I've read through issue #8 and I have realized that I am facing a similar problem even though I am using the lt syntax as per your instruction.
i.e. I am running the server at port 2530 by the following
DEBUG=localtunnel* ./server --port 2530
and I run the client by the following
lt --host "http://sub.example.org:2530" --port 2350 --subdomain testreq
At the client end I've added a long stack traces lib (https://github.com/mattinsler/longjohn) and the error I get there is the following:

Error: localtunnel server returned an error, please try again
    at Request._callback (/usr/lib/node_modules/localtunnel/client.js:215:27)
    at self.callback (/usr/lib/node_modules/localtunnel/node_modules/request/main.js:122:22)
    at EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/usr/lib/node_modules/localtunnel/node_modules/request/main.js:655:16)
    at EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/localtunnel/node_modules/request/main.js:617:14)
    at EventEmitter.emit (events.js:117:20)
---------------------------------------------
    at Request.init (/usr/lib/node_modules/localtunnel/node_modules/request/main.js:126:10)
    at new Request (/usr/lib/node_modules/localtunnel/node_modules/request/main.js:105:8)
    at request (/usr/lib/node_modules/localtunnel/node_modules/request/main.js:968:11)
    at get_url (/usr/lib/node_modules/localtunnel/client.js:204:9)
    at Tunnel._init (/usr/lib/node_modules/localtunnel/client.js:232:7)
    at Tunnel.open (/usr/lib/node_modules/localtunnel/client.js:291:10)
    at localtunnel (/usr/lib/node_modules/localtunnel/client.js:320:12)
    at Object.<anonymous> (/usr/lib/node_modules/localtunnel/bin/client:40:1)

while, at the server, all I get is the following:

localtunnel server listening on port: 2530 +0ms
  localtunnel-server request /testreq +0ms

Any thoughts?

Update:
After changing the hostname and DNS settings by removing the subdomain(e.g. change http://sub.example.com to http://example.com) I finally got it to work!

@jknight2014
Copy link

I am having the same issue. Does this mean LocalTunnel server cannot be hosted at a subdomain? Or did you just change the hostname?

@o0x2a
Copy link

o0x2a commented Feb 5, 2015

The problem still exists when using browser-sync.

Details:
Using localtunnel 1.5.0, the following request

_header: 'GET /?new HTTP/1.1\r\nhost: localtunnel.me\r\ncontent-type: application/json\r\naccept: application/json\r\nConnection: keep-alive\r\n\r\n'

returns

body: '<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.7.8</center>\r\n</body>\r\n</html>\r\n' }

Reason:
The website localtunnel.me is down, no problem with the localtunnel code, I think this issue can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants