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

Error connecting #3

Closed
marclennox opened this issue Nov 15, 2013 · 10 comments
Closed

Error connecting #3

marclennox opened this issue Nov 15, 2013 · 10 comments

Comments

@marclennox
Copy link

I'm trying to setup my own localtunnel server and can't seem to get it working. I'm pretty sure I have both ends setup correctly, and I do get back an address when I connect with the lt client, but after a few seconds the connection drops with

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ETIMEDOUT
    at errnoException (net.js:901:11)
    at Object.afterConnect [as oncomplete] (net.js:892:19)

I also see on my server HTML page that the tunnel count goes to 1, then back to 0 when the connection drops.

Any ideas?

@defunctzombie
Copy link
Contributor

Without more information about how you launched the server and the client I can't really help. Maybe make sure that the service you are trying to tunnel for is also running and on the port you expect. The count goes to 1 when a tunnel has been assigned but if your client fails to connect to the server within a specific window, the tunnel will be closed.

@marclennox
Copy link
Author

I followed your instructions to a T for both the localtunnel-server and localtunnel repos, then launch the server (Ubuntu 13.10 with Node 0.10.22) with the following

sudo bin/server --port 80

And connect client (OSX Mavericks with Node 0.10.21) with the following

lt --port=3000 --host="http://my.host"

I've tried different ports (8080, etc.) and same result. Also if I specify a subdomain I get an immediate error as follows

your url is: undefined

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect EADDRNOTAVAIL
    at errnoException (net.js:901:11)
    at connect (net.js:764:19)
    at net.js:842:9
    at asyncCallback (dns.js:68:16)
    at Object.onanswer [as oncomplete] (dns.js:121:9)

I'm running the master HEAD code from both repos, is there a commit point that might be more stable?

@marclennox
Copy link
Author

Also I've got a wildcard DNS entry for *.my.host pointing to the server.

Server localtunnel process has no output throughout.

@defunctzombie
Copy link
Contributor

Wildcard entries in etc/host file (which is what I am assuming you edited?)
won't work. If you have a wildcard dns entry that should work but I would
make sure it actually resolves from your machine via a ping.

If you want to see debug output, run the server with:

DEBUG=localtunnel* bin/server --port 80

This will print some additional details.

My guess is that this is a dns issue based on the EADDRNOTAVAIL error,
maybe try to get the server and client running all on a local machine first
to verify that works for you then try with the remote server you have setup.

On Fri, Nov 15, 2013 at 4:31 PM, Marc Lennox notifications@github.comwrote:

Also I've got a wildcard DNS entry for *.my.host pointing to the server.

Server localtunnel process has no output throughout.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-28605042
.

@marclennox
Copy link
Author

I'm using wildcard DNS entries, and they appear to be resolving properly.

Here's the log from the server with the logging flag turned on (using port 9070)

  localtunnel server listening on port: 9070 +0ms
  localtunnel-server request /?new +0ms
  localtunnel-server making new client with id gplw +22ms
  localtunnel-server tcp server listening on port: 35189 +2ms
  localtunnel-server closed tcp socket for client(gplw) +5s

I'll try running it locally as you suggested.

@marclennox
Copy link
Author

Seems to work fine on my local machine... Are there any other special DNS or network requirements I need to be aware of? I'm running the server on Azure cloud, with the specified port open.

@defunctzombie
Copy link
Contributor

Yea, all TCP ports must be open.

  localtunnel-server tcp server listening on port: 35189 +2ms

The client will establish a connection on that port.

Per the instructions

The server can accept incoming TCP connections for any non-root TCP port (ports over 1000).

@marclennox
Copy link
Author

Yep, that would do it. :) Awesome, thanks for the quick help on this, and
apologies for wasting your time!

On 15 November 2013 16:57, Roman Shtylman notifications@github.com wrote:

Yea, all TCP ports must be open.

localtunnel-server tcp server listening on port: 35189 +2ms

The client will establish a connection on that port.

Per the instructions

The server can accept incoming TCP connections for any non-root TCP port (ports over 1000).


Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-28606876
.

@marclennox
Copy link
Author

I was able to get past the port issue, but now I get requests hanging and timing out. In some cases it appears the local server is receiving and responding to the request, but rarely does that end up in a completed request from the originating client. But I'm also having the same issue in trying to use the service at localtunnel.me. Are there any gotchas associated with the local web server port I should be aware of?

@defunctzombie
Copy link
Contributor

None that I am aware of. A while back there were reports of requests timing out, but I believe those have been resolved. If you can reproduce it reliably I am happy to take a look (provided an example that reproduces it).

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

2 participants