Giter VIP home page Giter VIP logo

Comments (8)

nodje avatar nodje commented on July 19, 2024

Same problem here, very unstable connection.

Reconnection is occurring quite often and each reconnection seems to add Forwarding tunnels to the originally requested ports.

You end up with a lot of tunnels on different ports forwarding to the same few ports you configured ngrok to forward to.

from ngrok.

inconshreveable avatar inconshreveable commented on July 19, 2024

Are your internet connections unstable to other sites? ngrok's timeout for its connection heartbeat is pretty liberal (around 30 seconds), and it does automatically reconnection. If you can use the -log switch on ngrok and send me logs when you're having bad connection activity that would greatly help in diagnosing these problems. I haven't had any other reports of really unstable connections, but I'll keep an eye on it and see if I can't add some more monitoring to try to nail down why these issues are occurring. I'll leave this issue open for now until we get a better sense of what's causing these problems.

from ngrok.

nodje avatar nodje commented on July 19, 2024

I've solve the problem of multiple tunnel opening for a single port by using remote_port:

But I still have timeouts and reconnection.
I'm in China, connections are very bad, that most probably explains.

I'm planning on installing ngrok on a local server to get better stability.

I'd be interested in providing detailed log: how do you use the -log switch when tunnels are defined in .ngrok ?

cheers

from ngrok.

tyoc213 avatar tyoc213 commented on July 19, 2024

The one Im having problems is a VM which uses .ngrok I run other laptop at home without .ngrok and it is working correctly (on the same LAN)... it seems it is something about my file...

captura de pantalla 2013-12-12 a la s 14 20 17

And this is the log

captura de pantalla 2013-12-12 a la s 14 20 47

So what is my error?

from ngrok.

inconshreveable avatar inconshreveable commented on July 19, 2024

@tyoc213 You have two problems. First, you only want a single proto section for each tunnel, so your http tunnel should look like:

http:
  subdomain: "..."
  proto:
    http: 80
    https: 80

Secondly, you need to specify a target for the -log switch:

./ngrok -log=ngrok.log start http ssh

@nodje You can provide the -log switch just like I've shown above for tyoc:

./ngrok -log=ngrok.log start foo bar

from ngrok.

tyoc213 avatar tyoc213 commented on July 19, 2024

I have another log, but it is almost the same.

Here it is:

https://www.evernote.com/shard/s139/sh/113eb966-37e2-4703-98d2-9ce16e779782/12b94a1eec083d5053a4da48637758d6

from ngrok.

inconshreveable avatar inconshreveable commented on July 19, 2024

@tyoc213 Sorry it's taken so long to get back to you on this. From examining the log file, it would appear that your network connection is not stable enough. You'll see that every time your tunnel dies it's preceded by the following messages:

[2013/12/16 16:55:14 CST] [INFO] (ngrok/log.(*PrefixLogger).Info:60) [client] Last ping: 2013-12-16 16:54:59.868131535 -0600 CST, Last pong: 2013-12-16 16:54:39.866526113 -0600 CST
[2013/12/16 16:55:14 CST] [INFO] (ngrok/log.(*PrefixLogger).Info:60) [client] Connection stale, haven't gotten PongMsg in 15 seconds

ngrok heartbeats its connection to the server and if it doesn't receive a response soon enough, it kills the connection because it's probably dead. There are two possibilities:

  1. Your network (or VM software) or something, is not stable enough to run ngrok.
  2. ngrok's ping time of 20 seconds is too high for your network and if we lowered the ping time it might force your NAT/software/etc to keep the connection alive instead of killing it. This is extremely unlikely but possible and it's worth trying to see if we can fix it. If you can figure out how to compile ngrok and change the ping time, go for it. Otherwise, email me (alan at ngrok dot com) and I'll send you a build to try with a lower ping time.

from ngrok.

tyoc213 avatar tyoc213 commented on July 19, 2024

I will go back to home in some 15 days or so, will lower the conn time when I get back.

The only I can point is that running ngrok on host runs OK, on the VM it is not, so I will check it.

Thanks.

from ngrok.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.