Can't make it work #21

Closed
opened 2015-02-26 16:08:27 +00:00 by vvo · 26 comments
vvo commented 2015-02-26 16:08:27 +00:00 (Migrated from github.com)

Hi, here's what I did:

  • setup *.localtunnel.function.fr CNAME function.fr.
  • ping localtunnel.function.fr works
  • ping dsadsa.localtunnel.function.fr works
  • using lt --host http://localtunnel.function.fr --port 8080 fails

It fails because maybe_bounce() does not find any client and so return true; and respond 502 to client.

I wonder how this could work, I know it does, but can you help on this? Everything is up and running if you want to test.

Also, I am setting this up because I get "Not running" errors most of the time while testing with zuul/saucelabs.

Hi, here's what I did: - setup *.localtunnel.function.fr CNAME function.fr. - ping localtunnel.function.fr works - ping dsadsa.localtunnel.function.fr works - using `lt --host http://localtunnel.function.fr --port 8080` fails It fails because maybe_bounce() does not find any client and so `return true;` and respond 502 to client. I wonder how this could work, I know it does, but can you help on this? Everything is up and running if you want to test. Also, I am setting this up because I get "Not running" errors most of the time while testing with zuul/saucelabs.
vvo commented 2015-02-26 20:29:35 +00:00 (Migrated from github.com)

I removed the last comment, not relevant. I only really want to make localtunnel-server work.. Can you help @defunctzombie?

I removed the last comment, not relevant. I only really want to make localtunnel-server work.. Can you help @defunctzombie?
defunctzombie commented 2015-02-26 20:42:22 +00:00 (Migrated from github.com)

How does ping dsadsa.localtunnel.function.fr works work if no tunnel has yet been established?

How does `ping dsadsa.localtunnel.function.fr works` work if no tunnel has yet been established?
vvo commented 2015-02-26 20:45:22 +00:00 (Migrated from github.com)

Because there's a wildcard DNS set on *.function.fr.

Because there's a wildcard DNS set on *.function.fr.
vvo commented 2015-02-26 20:46:33 +00:00 (Migrated from github.com)

Maybe we can chat on gitte quickly to solve this.

Maybe we can chat on gitte quickly to solve this.
defunctzombie commented 2015-02-26 20:47:12 +00:00 (Migrated from github.com)

Sure. Link me.

Sure. Link me.
vvo commented 2015-02-26 20:47:24 +00:00 (Migrated from github.com)

Reading the code: https://github.com/defunctzombie/localtunnel-server/blob/master/server.js#L28

When doing a requets, it goes to maybe_bounce(), I have a hostname, I have a subdomain (localtunnel.function.fr is a subdomain), returns false.

Reading the code: https://github.com/defunctzombie/localtunnel-server/blob/master/server.js#L28 When doing a requets, it goes to maybe_bounce(), I have a hostname, I have a subdomain (localtunnel.function.fr is a subdomain), returns false.
vvo commented 2015-02-26 20:48:08 +00:00 (Migrated from github.com)

AH! I know, is localtunnel compatible with being served on a subdomain? This is the case: I am trying to use --lt localtunnel.function.fr, it may break?

AH! I know, is localtunnel compatible with being served on a subdomain? This is the case: I am trying to use --lt localtunnel.function.fr, it may break?
defunctzombie commented 2015-02-26 20:49:08 +00:00 (Migrated from github.com)

I think as long as the server code around identifying the "client id" (subdomain) is correct it should work. That code (using the module to do that) might be wrong or returning too much of the subdomain.

I think as long as the server code around identifying the "client id" (subdomain) is correct it should work. That code (using the module to do that) might be wrong or returning too much of the subdomain.
vvo commented 2015-02-26 20:49:25 +00:00 (Migrated from github.com)
https://gitter.im/defunctzombie/localtunnel-server But you have to create it.
defunctzombie commented 2015-02-26 20:49:33 +00:00 (Migrated from github.com)

I suspect it is returning everything before function.fr instead of just the stuff before the first dot.

I suspect it is returning everything before `function.fr` instead of just the stuff before the first dot.
vvo commented 2015-02-26 20:50:19 +00:00 (Migrated from github.com)

So the strategy is:

if no hostname return false (go to localtunnel app)
if no subdomain (clientID) then return false, but in my case, it's returning "localtunnel"

So the strategy is: if no hostname return false (go to localtunnel app) if no subdomain (clientID) then return false, but in my case, it's returning "localtunnel"
vvo commented 2015-02-26 20:51:08 +00:00 (Migrated from github.com)

I will try to host localtunnel on a top level TLD, it should work then

I will try to host localtunnel on a top level TLD, it should work then
defunctzombie commented 2015-02-26 20:51:08 +00:00 (Migrated from github.com)

Yea. I think the code could be made to handle this better. It may be that auto-detecting the "base domain" part is not a great way to do it and we can just accept an ENV var for the basename.

Yea. I think the code could be made to handle this better. It may be that auto-detecting the "base domain" part is not a great way to do it and we can just accept an ENV var for the basename.
defunctzombie commented 2015-02-26 20:51:26 +00:00 (Migrated from github.com)

Yes, as a top level domain it should work.

Yes, as a top level domain it should work.
vvo commented 2015-02-26 21:30:26 +00:00 (Migrated from github.com)

So tried the toplevel, now it almost work:

> lt --host http://localtunnel.eu --port 8080
your url is: http://pgpnimhrzm.localtunnel.eu

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connection refused: localtunnel.eu:46831 (check your firewall settings)
    at Socket.<anonymous> (/home/vvo/.nvm/v0.10.36/lib/node_modules/localtunnel/client.js:84:32)
    at Socket.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:442:13)

So tried the toplevel, now it almost work: ``` shell > lt --host http://localtunnel.eu --port 8080 your url is: http://pgpnimhrzm.localtunnel.eu events.js:72 throw er; // Unhandled 'error' event ^ Error: connection refused: localtunnel.eu:46831 (check your firewall settings) at Socket.<anonymous> (/home/vvo/.nvm/v0.10.36/lib/node_modules/localtunnel/client.js:84:32) at Socket.emit (events.js:95:17) at net.js:441:14 at process._tickCallback (node.js:442:13) ```
vvo commented 2015-02-26 21:30:45 +00:00 (Migrated from github.com)

My server seems to not have any specific iptables rule set, strange

My server seems to not have any specific iptables rule set, strange
defunctzombie commented 2015-02-26 21:40:59 +00:00 (Migrated from github.com)

Make sure your local network is also not doing anything funky. Sometimes
outbound connections on high ports are blocked to protect against malware.

On Thursday, February 26, 2015, Vincent Voyer [email protected]
wrote:

My server seems to not have any specific iptables rule set, strange

—
Reply to this email directly or view it on GitHub
https://github.com/defunctzombie/localtunnel-server/issues/21#issuecomment-76277696
.

Make sure your local network is also not doing anything funky. Sometimes outbound connections on high ports are blocked to protect against malware. On Thursday, February 26, 2015, Vincent Voyer [email protected] wrote: > My server seems to not have any specific iptables rule set, strange > > — > Reply to this email directly or view it on GitHub > https://github.com/defunctzombie/localtunnel-server/issues/21#issuecomment-76277696 > .
vvo commented 2015-02-26 21:56:50 +00:00 (Migrated from github.com)

Sometimes it just works and I get a url but then going to the url, it says "no active client.."

Sometimes it just works and I get a url but then going to the url, it says "no active client.."
vvo commented 2015-02-26 21:57:17 +00:00 (Migrated from github.com)

I should note, using localtunnel.me always works

I should note, using localtunnel.me always works
vvo commented 2015-02-26 22:00:37 +00:00 (Migrated from github.com)

http://localtunnel.eu/ app is showing, at least something works :D

http://localtunnel.eu/ app is showing, at least something works :D
vvo commented 2015-02-26 22:01:00 +00:00 (Migrated from github.com)

rebooting, because, well..

rebooting, because, well..
vvo commented 2015-02-26 22:16:18 +00:00 (Migrated from github.com)

now it works (sometimes), but all I can get is "localtunnel error: no active client for 'xxxxx'", omg

now it works (sometimes), but all I can get is "localtunnel error: no active client for 'xxxxx'", omg
vvo commented 2015-02-26 22:19:33 +00:00 (Migrated from github.com)

specifying a subdomain will always work,untill I shutdown/restart the server and try to reuse the same domain, then it fails with connection refused, what is different from my server from yours localtunnel.me. that's magic

specifying a subdomain will always work,untill I shutdown/restart the server and try to reuse the same domain, then it fails with connection refused, what is different from my server from yours localtunnel.me. that's magic
vvo commented 2015-02-26 22:34:00 +00:00 (Migrated from github.com)

mhh might be a DNS problem, seems like *.localtunnel.eu does not resolves to the good IP..

mhh might be a DNS problem, seems like *.localtunnel.eu does not resolves to the good IP..
vvo commented 2015-02-26 22:41:29 +00:00 (Migrated from github.com)

Ok now it works but I still have the sort of caching issue that when restarting the localtunnel server, it will fail from the client side with "connection refused".

Maybe DNS configuration/caching involved or some unclosed connection somewhere

Ok now it works but I still have the sort of caching issue that when restarting the localtunnel server, it will fail from the client side with "connection refused". Maybe DNS configuration/caching involved or some unclosed connection somewhere
vvo commented 2015-02-26 23:34:50 +00:00 (Migrated from github.com)

Ok I think Ill use sauce connect for my needs, thanks for help

Ok I think Ill use sauce connect for my needs, thanks for help
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hoelee/server#21