redhat-developer / vscode-rsp-ui

A unified UI for all RSP servers and RSP server-providers to integrate with
Eclipse Public License 2.0
38 stars 21 forks source link

A way to kill the java process running (not stop, kill) #253

Closed yellak closed 1 year ago

yellak commented 1 year ago

Sometimes, when I try to stop, the terminal gives an error, the server is set to "stopped" but the java process is still running and I have to kill it outside vscode.

robstryker commented 1 year ago

Can you give a bit more detail?

What server are you trying to stop? What version? Different servers (tomcat vs wildfly vs other) behave differently.

yellak commented 1 year ago

tomcat-server-issue

I know that maybe there is a way to fix the error at trying to stop, but I just want a way to kill if I want.

yellak commented 1 year ago

Tomcat 7.0.27

robstryker commented 1 year ago

So there's a few issues here. First, in the UI, the 'terminate' action is only enabled when the server is starting, stopping, or unknown. I suppose it should still be enabled for stopped and started just in case someone wants to use it.

Once that is fixed, I'm not 100% sure whether the back end still maintains a reference to the process when it marks itself as stopped. It might, but it might not. I'd have to dig deeper to figure that out.

Either way, I can definitely fix the first part. Second part is a maybe.

robstryker commented 1 year ago

So I want to list some caveats here: the UI will no longer block the terminate action from showing up.

However, if the backend RSP has lost its reference to the server process somehow, it still won't be able to terminate. The terminate action may fail. I'll open up another issue on the rsp-community for that I guess.

https://github.com/redhat-developer/rsp-server-community/issues/150