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

server share stop not stopping share #3

Closed
bdw429s opened this issue Nov 14, 2016 · 6 comments
Closed

server share stop not stopping share #3

bdw429s opened this issue Nov 14, 2016 · 6 comments

Comments

@bdw429s
Copy link
Collaborator

bdw429s commented Nov 14, 2016

If I start a server and then open a share like so it works great:

start
share

However if I run server share stop, the tunnel still passes through to my local server unabated and the ngrok-windows.exe process remains running. Stopping the local server gives me a message about the tunnel not being found, but I'm still not sure if NGrok is really stopped since the ngrok-windows.exe process never dies until I kill it manually.

Is there any output from the ngrok command that we can output when stopping the tunnel to help debug?

@bdw429s
Copy link
Collaborator Author

bdw429s commented Nov 15, 2016

I got a chance to poke at this tonight. I can confirm that the DELETE request to stop the tunnel is correctly returning a 204 like it should and hitting the API to get a list of tunnels afterwards shows no tunnels are running. I think this may be a bug in Ngrok. The tunnels seem to just keep running until I kill the binary.

@elpete
Copy link
Owner

elpete commented Nov 15, 2016

This happens on Mac as well. The difference is it doesn't seem like the Mac binary is blocking.

I'm not sure how to actually kill the binary. On either platform.

@bdw429s
Copy link
Collaborator Author

bdw429s commented Nov 15, 2016

This thread seems to imply that the only way to stop the share is kill the process.
http://stackoverflow.com/questions/26291006/stop-sharing-a-port-on-ngrok

@elpete
Copy link
Owner

elpete commented Nov 15, 2016

I would think Java would have a way to interact with the system processes? I can look in to that.

@bdw429s
Copy link
Collaborator Author

bdw429s commented Nov 15, 2016

If I keep a reference to the Process returned by the start() method and I call process.destroy() on it, that will kill the ngrok binary. Closing the CommandBox console will also kill it. I assume because it's a child process.

@bdw429s
Copy link
Collaborator Author

bdw429s commented Nov 15, 2016

See this here:
#5

@bdw429s bdw429s changed the title server share stop not stopping share on Windows server share stop not stopping share on Window Nov 15, 2016
@bdw429s bdw429s changed the title server share stop not stopping share on Window server share stop not stopping share Nov 15, 2016
@bdw429s bdw429s closed this as completed Nov 15, 2016
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