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

Windows service cannot be stopped #9211

Closed
tomazk8 opened this issue Apr 6, 2020 · 3 comments
Closed

Windows service cannot be stopped #9211

tomazk8 opened this issue Apr 6, 2020 · 3 comments
Assignees
Milestone

Comments

@tomazk8
Copy link

tomazk8 commented Apr 6, 2020

OrientDB Version: 3.0.30 community
Java Version: 1.8.0_211
OS: Windows 10 Pro

I created Windows Service as specified on OrientDB website and works. Service is installed, I started it and OrientDB Studio works. But when I try to stop it using Windows Services or using OrientDBGraph.exe //SS, it's just waiting and waiting. In Services I see the state "stopping" but only after some 5min, state finally switches to stopped state. Note that I am running an empty DB server with only the original demodb. I did not create any new database and I did not execute any query.

I guess 5min is some timeout. Is OrientDB maybe waiting for some input in the same way, when I run it as a console application and stop it, where at the end it is asking "Terminate batch job (Y/N)?". Console Application stops immediately after I press Y.

@tomazk8
Copy link
Author

tomazk8 commented Apr 7, 2020

Update: here is the output from the logs
commons-deamon log
[2020-04-07 10:11:41] [info] [17956] Apache Commons Daemon procrun (1.2.2.0 64-bit) started.
[2020-04-07 10:11:41] [info] [17956] Stopping service 'OrientDBGraph3.0.30'...
[2020-04-07 10:11:41] [info] [18352] Stopping service...
[2020-04-07 10:16:42] [info] [18352] Service stop thread completed.
[2020-04-07 10:17:02] [info] [17956] Service 'OrientDBGraph3.0.30' stopped.
[2020-04-07 10:17:02] [info] [17956] Stop service finished.
[2020-04-07 10:17:02] [info] [17956] Apache Commons Daemon procrun finished.

orient-server.log.0
2020-04-07 10:11:42:022 INFO Received shutdown command from the remote client [OConnectionBinaryExecutor]
2020-04-07 10:11:42:226 SEVER Authentication error of remote client: shutdown is aborted. [OConnectionBinaryExecutor]

Update 2: I found an issue from 2016 that involves adding a password parameter, but I see no relevance with stopping the service.

@wolf4ood
Copy link
Member

wolf4ood commented Apr 8, 2020

Hi @tomazk8

seems yes that you have to pass the root password parameter to stop the server.
I guess that's why you get

2020-04-07 10:11:42:226 SEVER Authentication error of remote client: shutdown is aborted. [OConnectionBinaryExecutor]

Let me know if this works i will update the docs

Thanks

@wolf4ood wolf4ood self-assigned this Apr 8, 2020
@tomazk8
Copy link
Author

tomazk8 commented Apr 9, 2020

I have updated my InstallService.bat as in issue 6552 with StopParams. When I stop the service using "//SS -p=[password]" and it works. But... password is not really needed, because even without root password, the service eventually stops (although after a long timeout). It's not like stopping of the service can be aborted.

One question. I am planing to run my ASP.NET Core 3.1 as Windows Service and I was wondering, if it's possible to run OrientDB inside my service? I see that prunsrv.exe actually runs console host (conhost.exe) sub-process to wrap OrientDB with it. So I guess I could do the same thing in my service the same way prunsrv does it right? Then I wouldn't need two Windows Services. If this is doable, could someone guide me how to do this?

Thanks!

@tglman tglman added this to the 3.0.x milestone Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants