4

I'm trying to set up an own application with the Tanuki Java Service Wrapper.

The setup and configuration worked fine but after starting my application via the wrapper (what also works) it gets shut down after a while because the wrapper "timed out waiting for a signal from the JVM".

My application is working after the start and still gets shut down.

I'm currently still in the setup / test phase so I just start the wrapper via the bat file and not as Windows service yet.

I had two ideas why this could be:

1) The main thread terminates after starting a few other threads. I tried to let the main thread just wait forever instead of terminating but that didn't help (besides that the wrapper should also work without the main thread I guess).

2) My program is mostly just waiting for events (directory watch service) but even if I trigger some events it still gets shut down.

I tried to disable the JVM ping check via wrapper.ping.timeout=0 but that didn't work either and it would be nice if I had the check in case the app would really hang.

I'm using jdk1.7.0_79 and wrapper-windows-x86-32-3.5.27.

das Keks
  • 3,723
  • 5
  • 35
  • 57
  • Absolutely not an answer to your question, but: does Tanuki offer the possibility to start the wrapper exe directly and not as a service ? You could try that approach to find out if something with JNI is going wrong. And: have you thought of using Apache Commons daemon ? I migrated to that solution because (at least at that time) Tanuki didn't provide a free wrapper for x64. – Marged Nov 09 '15 at 12:28
  • I'm using the provided `bat` file and haven't installed it as service yet. The `bat` is setting a ton of parameters and starts the exe. Apache Commons would be an option, too, but maybe I also find a solution to my tanuki problem. – das Keks Nov 09 '15 at 12:35

1 Answers1

8

Setting wrapper.startup.timeout=0 as well did the trick for me since the JVM is sleeping / not responding right after the start and this is a different check than the wrapper.ping

Found my solution here:

Java service is restarted 4 or 5 times

Community
  • 1
  • 1
das Keks
  • 3,723
  • 5
  • 35
  • 57