Skip to content

(DefaultGreengrass): Nucleus service does not stopped on Windows #208

Open
@bgklika

Description

@bgklika

Describe the bug
When we run scenarios on Windows we got the problem Nucleus service still running after scenario done.
When OTF start Nucleus on Windows Nucleus install and start yourself and a Windows service.
But when scenario is done OTF try to terminate Nucleus using taskkill command which can't stop Windows service.
With taskkill we have two problems: on Windows it warning with message:

Reason: This process can only be terminated forcefully (with /F option).

And even when taskkill get /F option and terminate Nucleus process it will be restarted soon as unexpectedly terminated Window service.

I think problem in DefaultGreengrass.stop() method which throw error logs like that:

DefaultGreengrass - Failed to kill Greengrass process 52968: ERROR: The process with PID 52968 could not be terminated.

I think stop() should be OS-specific and on Windows sill stop greengrass Windows service

Problem is no critical because when service is already started and OTF restart start it again old service stoppped and removed and new one has been installer and started.

Priority
Low. We have a lot of messages in logs about that but due to next startup of nuclues stops and reinstall Windows service it work over scenarios.

To Reproduce
Stop Greengrass service manually.
Run scenario.
When scenario finished check status of greengrass service. It is still running.

Expected behavior
When scenario done greengrass Windows service started by scenario should be stopped.

Actual behavior
When scenario done greengrass Windows service started by scenario still running

Environment

  • OS: confirmed for Windows 10 and Windows 11
  • JDK version: JDK11
  • Nucleus version: confirmed for 2.10.1-2.11.0

Additional context
None
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions