user3818545
user3818545

Reputation: 81

ngrok killing a tunnel from windows 7 command line

I'm trying to use ngrok to foward my app, currently hosted on localhost:3602, to my development partner.

I've done this many times in the past successfully, simply by typing in

ngrok http 3602

I get back a url that he can conntect to. But now when I type that in I get the following error message:

Tunnel session failed. Your account is limited to 1 simultaneous ngrok client session. Active ngrok client sessions in region 'us': - f21bd0dbe67928069054c733a5e11f88 (54.80.69.18) ERR_NGROK_108

Obviously I must have an existing tunnel session running somewhere.

My problem is I have no idea where to find that existing tunnel session and how to terminate it. It does not exist as either a running application, process or service in the task manager, and I can find no syntax in the documentation for how to terminate a tunnel session. I've tried rebooting my machine to no effect, which tells me this is probably not a local problem, but rather something running on the ngrok site linked to my account, yet nothing I can find in my account settings indicates anything helpful.

Can anyone provide the necessary command to clear up this problem. Thanks.

Upvotes: 8

Views: 29639

Answers (7)

Vitor Piovezam
Vitor Piovezam

Reputation: 443

For Linux/Mac

killall ngrok

This command is an Unix command. In Windows you can open the Task Manager and close all ngrok processes.

Upvotes: 6

Sardor Shorahimov
Sardor Shorahimov

Reputation: 21

On Windows(cmd):

taskkill /f /im ngrok.exe

enter image description here

Upvotes: 0

Furqan Sultani
Furqan Sultani

Reputation: 21

on your ngrok prompt just run this command

taskkill /f /im ngrok.exe

Upvotes: 2

Luke Garrigan
Luke Garrigan

Reputation: 5011

If you are limited to one session — like I was. Then you may have created an account with ngrok and signed in with your machine. And it'll create a file:

C:\Users\<name>\.ngrok2\ngrok.yml

It uses this to limit your client, simply delete this file.

Upvotes: 0

Khalaimov Dmitrii
Khalaimov Dmitrii

Reputation: 266

This answer is not about killing tunnel, but about a possible solution to the described problem with ERR_NGROK_108.

https://dashboard.ngrok.com/get-started/setup describes a simple plan for getting started with ngrok.

enter image description here

If you execute the second step you will have a file ngrok.yaml (In my case path was: C:\Users\Mi\ .ngrok2\ngrok.yml).

And after that executing ngrok http 80 will provide the described error ERR_NGROK_108.

Solution:

  • Skip the second step. Execute ngrok http 80 without previous ngrok authtoken
  • If you have already executed this step, delete the file ngrok.yml

This approach solved my problem with ERR_NGROK_108.

Upvotes: 2

kaiser
kaiser

Reputation: 22353

It seems like ngrok got a (JavaScript) function for that:

const ngrok = require('ngrok');
ngrok().kill();

Upvotes: 0

Tr&#237; Chồn
Tr&#237; Chồn

Reputation: 652

for window version:

tskill /A ngrok

enter image description here

Upvotes: 27

Related Questions