an alternative invocation mechanism for unix-daemon-like java code.
Questions tagged [apache-commons-daemon]
62 questions
5
votes
1 answer
Is it possible to start a Java Runtime Image with prunsrv using jvm mode?
Background: Since Java 9 it is possible to create custom runtime images (JRE+program) using jlink.
It is possible to install Java programs as Windows service using prunsrv.exe (part of Apache Commons Daemon).
prunsrv can be used in three start…

Gustave
- 3,359
- 4
- 31
- 64
5
votes
1 answer
Can Apache Daemon be used to restart a Java application if it is forcibly shutdown?
I'm looking into Apache Daemon to help me with a Java app, and I just wanted to get some ideas/hints about what is possible.
I want to create a simplified application that shows some kind of failsafe ability. The application will go through 4 steps…

Caffeinated
- 11,982
- 40
- 122
- 216
5
votes
1 answer
Using multiple jars in the jsvc classpath
I am trying to get a Java application to run as a Linux service using jsvc. I found How to convert a java program to daemon with jsvc? which was able to get me most of the way, but I am still struggling to get the classpath figured out.
I am getting…

Dennis Crissman II
- 179
- 3
- 10
5
votes
1 answer
Daemonizing java application with JSVC
I'm trying to daemonize my application using Apache Commons Daemon using the Daemon interface. Java application it self isn't doing anything just writes to stout.
I compiled jsvc: http://people.apache.org/~mturk/daemon-1.0.10/
(even tried newest…

user987220
- 207
- 1
- 2
- 10
4
votes
1 answer
Spring Boot Application as a Daemon Service?
I'm a new who are getting started learning Spring Boot. I'm feeling that It's really helpful and great tool to develop Java application easily.
On the other hand, I'm considering developing a Daemon Service which collects data/message(s) from Apache…

BG. KIM
- 41
- 1
- 2
3
votes
0 answers
Cannot run windows service in jvm mode: error 1067
I'm trying to create a windows service using Apache Common Daemons but I'm not able to make it work as it is meant to.
Using jvm mode it always returns error 1067 with no further explanations. Here is procrun log:
[2020-11-18 15:56:20] [info] …

Azathoth
- 582
- 1
- 7
- 29
3
votes
1 answer
waitpid - In which cases both WIFEXITED and WIFSIGNALED will be false?
I'm running a Java program as a daemon on Linux using Apache commons-daemon's jsvc.
The daemon "randomly" crashes with only message:
jsvc.exec error: Service did not exit cleanly
This is the relevant part of the code in jsvc (in jsvc-unix.c line…

nicoulaj
- 3,463
- 4
- 27
- 32
3
votes
1 answer
Procrun with org.apache.commons.daemon.Daemon
I wrote a Daemon by using the apache commons sample code:
public class LockDaemon implements Daemon {
@Override
public void init(DaemonContext context) throws DaemonInitException, Exception {
LogManager.getLogger().info("initialized with…

gorootde
- 4,003
- 4
- 41
- 83
3
votes
1 answer
Howto setup a Daemon implementation as windows service
I didn't find any really good example (actually I did not find a single example) on how to register a class that implements the org.apache.commons.daemon.Daemon interface as Windows service.
Do I have to register this implementation using procrun?…

dpr
- 10,591
- 3
- 41
- 71
3
votes
1 answer
How to gracefully shutdown procrun?
When using Apache commons daemon - procrun to run Java apps on Windows XP 32 bit platform, how to gracefully stop service?
I have read procrun documentation and set time out 120 seconds while registering service. This is not working as intended.…

Hsehdar
- 103
- 12
3
votes
3 answers
Commons-Daemon procrun binaries missing with prunsrv.exe or prunmgr.exe
I am planning to create windows based service using commons-daemon procrun . I downloaded the commons-daemon-1.0.10-bin.zip file from downloads, but when I extracted it, I could not find prunsrv.exe or prunmgr.exe files. I found those were missing…

developer
- 9,116
- 29
- 91
- 150
2
votes
1 answer
Correct use of DependsOn option in Procrun from Commons Daemon
I have a java application running as a windows service using procrun from Commons Daemon. It is running on Windows XP SP3.
The application depends on ActiveMQ, and I installed the service via the following batch script
@echo off
if "%OS%" ==…

Ulrich Palha
- 9,411
- 3
- 25
- 31
2
votes
2 answers
Windows Service created with apache commons not starting correctly and errors with path to jvm.dll not found
I am running a java program as a windows service on windows server 2019 build 1809.
I am using apache commons procrun to create a windows service.
This is my configuration to start a…

SRJ
- 2,092
- 3
- 17
- 36
2
votes
0 answers
NanoHTTP as windows service with Apache Commons Daemon
I made a small HTTP listener with NanoHTTP library, I would like to use it with Apache Commons Daemon (https://commons.apache.org/proper/commons-daemon/index.html) to install with procrun as Windows service.
I read the docs but I cannot understand…

Tobia
- 9,165
- 28
- 114
- 219
2
votes
1 answer
How to add JNI hooks to one jar generated by Spring Boot
I am using Spring Boot gradle plugin (org.springframework.boot) to generate the "one" jar. It works well when I run java -jar app.jar - does exactly what's expected. However, this application should be running as a daemon using Apache Commons Daemon…

Serge Poele
- 117
- 11