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

The service did start in a timely fashion, but the Java application is running. #82

Open
lafual opened this issue Jul 12, 2018 · 4 comments

Comments

@lafual
Copy link

lafual commented Jul 12, 2018

Using Windows Server 2016 with Java 8 64bit. My Java class does not extend the WinRun4J classes and is a plain public static void main(String[]) with a ShutDownHook . INI has service.mode=false and both main.class and service.class refer to the same main.

When starting as a Window Service, the Java is run and I see the expected output in the logs. However, the Windows Service "Starting" progress bar remains open for about 15 seconds, then reports Error 1053: The service did not respond to the start or control request in a timely fashion. At which point, the EXE is stopped and Java ShutDownHook is run (this output is logged too).

It looks like WinRun4J is not reporting the started event to Windows.

@bdw429s
Copy link

bdw429s commented Jan 23, 2019

@lafual Did you get this resolved? I am looking into winrunj as a replacement for launch4j specifically so I can create Windows services out of the binary without using a wrapper tool such as NSSM. Are you saying that the binaries produced by winrunj are not suitable to call directly via a windows service?

@lafual
Copy link
Author

lafual commented Jan 24, 2019

Hi. Received no update as to whether it is fixed. I evaluated most of what is available. I found Tanuki and JSL to be the best, in that an uncaught java exception will fail the service and cause a windows events. Yajsw and procrun are also ok, but they never fail the windows service, so you may never know that you have a problem. Winsw also looked promising, but seems to kill the jvm and not run the ShutdownHook

@bdw429s
Copy link

bdw429s commented Jan 24, 2019

@lafual Wow, thanks for the run down. It will help me narrow the list.

@lafual
Copy link
Author

lafual commented Jan 25, 2019

You are welcome. A small correction about my comment on winsw; when you stop the windows service via sc or the gui, i think winsw gives the wrong kill to the jvm and the shutdown hook doesnt run.
Tanuki is free for 32bit, not 64. So ended up using JSL from source forge.

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