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

Can't make it work #21

Closed
vvo opened this Issue Feb 26, 2015 · 26 comments

Comments

Projects
None yet
2 participants
@vvo

vvo commented Feb 26, 2015

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 vvo changed the title from Cannot make it work to Can't make it work Feb 26, 2015

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@defunctzombie

This comment has been minimized.

Show comment
Hide comment
@defunctzombie

defunctzombie Feb 26, 2015

Member

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

Member

defunctzombie commented Feb 26, 2015

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

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

Maybe we can chat on gitte quickly to solve this.

vvo commented Feb 26, 2015

Maybe we can chat on gitte quickly to solve this.

@defunctzombie

This comment has been minimized.

Show comment
Hide comment
@defunctzombie

defunctzombie Feb 26, 2015

Member

Sure. Link me.

Member

defunctzombie commented Feb 26, 2015

Sure. Link me.

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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 Feb 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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?

vvo commented Feb 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@defunctzombie

defunctzombie Feb 26, 2015

Member

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.

Member

defunctzombie commented Feb 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo commented Feb 26, 2015

@defunctzombie

This comment has been minimized.

Show comment
Hide comment
@defunctzombie

defunctzombie Feb 26, 2015

Member

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

Member

defunctzombie commented Feb 26, 2015

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

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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 Feb 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@defunctzombie

This comment has been minimized.

Show comment
Hide comment
@defunctzombie

defunctzombie Feb 26, 2015

Member

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.

Member

defunctzombie commented Feb 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@defunctzombie

defunctzombie Feb 26, 2015

Member

Yes, as a top level domain it should work.

Member

defunctzombie commented Feb 26, 2015

Yes, as a top level domain it should work.

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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)

vvo commented Feb 26, 2015

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)
@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@defunctzombie

This comment has been minimized.

Show comment
Hide comment
@defunctzombie

defunctzombie Feb 26, 2015

Member

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 notifications@github.com
wrote:

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


Reply to this email directly or view it on GitHub
#21 (comment)
.

Member

defunctzombie commented Feb 26, 2015

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 notifications@github.com
wrote:

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


Reply to this email directly or view it on GitHub
#21 (comment)
.

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

I should note, using localtunnel.me always works

vvo commented Feb 26, 2015

I should note, using localtunnel.me always works

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

rebooting, because, well..

vvo commented Feb 26, 2015

rebooting, because, well..

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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 Feb 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

@vvo

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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 Feb 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@vvo

vvo Feb 26, 2015

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

vvo commented Feb 26, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment