Questions tagged [jsvc]

Jsvc is a set of libraries and applications for making Java applications run on UNIX more easily.

Jsvc is a set of libraries and applications for making Java applications run on UNIX more easily.

http://commons.apache.org/proper/commons-daemon/jsvc.html

65 questions
4
votes
1 answer

Is it possible to enable port in JSVC for remote debugging?

I am running a jsvc application which is working absolutely fine but now I need to enable one port on my application so that I can do remote debugging. I am performing above task using java. Is there any way to achieve above task ? I have checked…
Waheed
  • 1,835
  • 15
  • 21
4
votes
3 answers

Do I have any control over the log format of java logs that show up in jsvc stderr output?

I'm using logback for logging of a Java web service app, using embedded Jetty. The logging works as expected based on the logback.xml file... all except for some logs originating in Java, but showing up in the jsvc output to stderr. I would like…
phatfingers
  • 9,770
  • 3
  • 30
  • 44
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
2 answers

Making jsvc work on OSX

I'm trying to reproduce the code written in this post: How to convert a java program to daemon with jsvc? Without the fancy bash script. I created the jar. This is the command I'm running: jsvc -verbose -outfile tmp/example.out -cp…
Hannibal
  • 1,078
  • 2
  • 12
  • 24
3
votes
2 answers

How to start tomcat with jsvc?

I'm trying to start tomcat with jsvc but it gives me this strange error JSVC re-exec requires execution with an absolute or relative path using jsvc -debug -cp ./bin/bootstrap.jar:bin/tomcat-juli.jar \ -outfile ./logs/catalina.out -errfile…
Guillaume Massé
  • 8,004
  • 8
  • 44
  • 57
2
votes
1 answer

tomcat jsvc launch error on Mac OS snow leopard

I've a problem with a tomcat 6 installation in daemon mode on Mac OS 10.6.8 (32bit) I've followed this tutorial: http://www.malisphoto.com/tips/tomcatonosx.html Tomcat works with a manual startup (startup.sh) But when try to launch my Tomcat5.sh…
Mathieu Hausherr
  • 3,485
  • 23
  • 30
2
votes
2 answers

Error while running Daemon class in java?

I am trying to make a Daemon class in java so I have implemented a class which implements Daemon but when I run it, I always get errors. The class that I use for that is ; public class RemoteAgentDaemon implements Daemon { private Logger…
Ozer
  • 1,245
  • 4
  • 20
  • 27
2
votes
1 answer

Catch RuntimeExceptions in Java application and send them via email

I'm starting my app on Linux server with a command like this /usr/local/bin/jsvc \ -home /usr/local/jdk1.8.0_111 \ -cp /opt/myapp/myapp.jar:/opt/myapp/lib/* \ -user myappuser \ -outfile /opt/myapp/out.log \ -errfile…
humkins
  • 9,635
  • 11
  • 57
  • 75
2
votes
1 answer

Jsvc apache daemon not binding port below 1024 with root privileges

I'm trying to execute a daemon as root that listen on port 636 but I'm getting java.net.BindException. The OS is CentOS 7. Am I missing something in my script? Service exit with a return value of 5 java.lang.reflect.InvocationTargetException …
2
votes
2 answers

Umask jsvc Log Files

I have an application hosted by jsvc on Centos 6. There are a number of logs created along with it. My problem is that jsvc is creating those logs with 077 permissions which are not accessible by anybody but root. The logs should be readable by…
user3063045
  • 2,019
  • 2
  • 22
  • 35
2
votes
2 answers

running Scala with commons-daemon from jsvc

I'm trying to write a basic Scala application that can run as a daemon using commons-daemon. The following code was based on the java program in this post package daemon import org.apache.commons.daemon._ import java.util.{ Timer, TimerTask, Date…
awfulHack
  • 857
  • 1
  • 10
  • 25
2
votes
1 answer

Jenkins restart does not work jsvc.exec not found

In our current jenkins installation (using a war file running inside jetty on ubuntu) whenever we try to do a safeRestart or a restart it hangs displaying a page "Please wait while Jenkins is restarting" This never finishes and we have to restart…
2
votes
1 answer

Is the best way to package jsvc with your java service as source code, then have people who use it compile before using?

I've noticed that many open source projects use jsvc (the apache commons daemon) for wrapping a java program in a service. I've seen several ways of including it, as source or with binaries for common environments. Is source a preferred method?
Tony Kurc
  • 33
  • 5
2
votes
1 answer

daemonize java program - go background after input some data

I tried to find a solution for the following use case (on Linux): Start the program, show some information to the stdout, input some information such as username/password. The program validate the username/password, then goes to background and run…
Rainfield
  • 1,172
  • 2
  • 14
  • 29
2
votes
2 answers

Performance improvement required for JSVC Java Daemon

I have successfully deployed a java service onto a Linux distribution based on the guide here i.e. the actual simple file IO tick-tock code, and am noticing high CPU usage for such a simple program. Perhaps due to the thread constantly checking... I…
gc_i
  • 41
  • 1
  • 6