ngrok-javascript icon indicating copy to clipboard operation
ngrok-javascript copied to clipboard

How to stop the Agent

Open sammachin opened this issue 6 months ago • 9 comments

When I close a connection using either the listener.close() or the ngrok.disconnect(listener.url()) methods it does not close down the agent session, I can see the agent still active in my dashboard (with 0 tunnels)

This means that I am unable to start a new agent on another machine as I get the error:

Connect error: failed to connect session: Your account is limited to 1 simultaneous ngrok agent sessions.
You can run multiple simultaneous tunnels from a single agent session by defining the tunnels in your agent configuration file and starting them with the command `ngrok start --all`.
Read more about the agent configuration file: https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config
You can view your current agent sessions in the dashboard:
https://dashboard.ngrok.com/tunnels/agents error_code: ERR_NGROK_108

According to the docs: The close method on a listener will shut it down, and also stop the ngrok session if it is no longer needed. But this does not seem to be working on either 1.0.0, or 1.3.0

sammachin avatar Jul 29 '24 17:07 sammachin