We've recently noticed a problem with the ActiveMQ Artemis 2.27.1 Windows Service created if the path to service contains a space. For example, with the pathname:
C:\executables\my artemis\apache-artemis\bin\test_space_broker\bin"
The service installs and starts correctly with:
artemis-service.exe start
However, when I stop it on the command line with:
artemis-service.exe stop
it returns immediately, but if you check the Windows Service display (service.msc
) it shows a status of stopping and finally times out. It's the same behavior if you try to stop it from with Windows Services display - i.e. it stays on stopping status for a while and finally times out.
I haven't seen anything in any of the logs that indicates a problem with stopping.
This is the message that's displayed on the time out:
Windows could not stop the ActiveMQ Artemis: test_space_broker @ 00.00 service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.
It must be due to how one of these paths in the services xml files is interpreted:
<env name="ARTEMIS_INSTANCE_URI" value="file:/C:/executables/my%20artemis/apache-artemis/bin/test_space_broker/"/>
<env name="ARTEMIS_INSTANCE_ETC_URI" value="file:/C:/executables/my%%20artemis/apache-artemis/bin/test_space_broker/etc/"/>
I've tried a few fixes such as changing the %%
to %
to match the way the URL is handled on both variables, and using the shortened windows name, but no luck so far.
The uninstall works fine once the service is stopped using:
taskill /F /PID xxxx