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
2
votes
2 answers

Java application running as jsvc uses more memory than Heap+PermGen

i have the following server: Ubuntu Server 12.04 LTS 64Bit No GUI, just command line 4GB RAM 2 Cores Nothing else is running besides Nagios NRPE and Webmin vm.swappiness = 0 Nothing special here, running a Java application: running 24/7 as daemon…
Stefan
  • 2,028
  • 2
  • 36
  • 53
2
votes
2 answers

Webapp in Tomcat 6 cannot find environment variables after start

I have the following problem: I am using Tomcat 6.0.32 and Java JDK 6.0_26. I have installed it successfully and the Tomcat start page is visible in the browser at port 8080. I have also created $CATALINA_HOME/setenv.sh script and put some…
2
votes
2 answers

Using JSVC to daemonize a Java app packaged with the Maven One-Jar Plugin

Here is the problem: I have packaged my Java application into a single jar using the Maven plugin One-Jar. Now I want to run the application as a Unix Daemon using JSVC, i.e. Apache Commons Daemon. I am using JSVC as follows (which works for Jars…
1
vote
0 answers

/usr/bin/jsvc: No such file or directory Error when trying to run jsvc

I got /usr/bin/jsvc: No such file or directory error when trying to run jsvc with my java program. I tried this echo $JAVA_HOME path/to/java/home which java /usr/bin/java to check if I have java installed in the correct location and I still get…
user9121114
1
vote
0 answers

Custom terminate script in IntelliJ IDEA to stop jsvc

I'm trying to debug my Java application which should run as a daemon and therefore gets launched by jsvc. At the moment I'm launching it with the help of Gradle as a IDEA Run/Debug configuration. The problem is that IDEA (when clicking on the…
Makk0
  • 115
  • 2
  • 8
1
vote
1 answer

JSVC initscript doesn't exit

I'm trying to deamonize my Java app using jsvc. This is my initscript #!/bin/sh # CONFIG JSVC=/opt/jsvc/jsvc JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64 USER=gserv ARGS=none # END…
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
1
vote
1 answer

Is jsvc supposed to restart a program which stops because of an uncaught exception

I am using commons-daemon-1.0.15 and Ubuntu 14.04. I followed the tutorial here: http://www.neilson.co.za/creating-a-java-daemon-system-service-for-debian-using-apache-commons-jsvc/ In my program I generate a runtime-exception which is caught by the…
Rene
  • 11
  • 4
1
vote
1 answer

How to bind a privileged port without privileges?

I have a piece of daemon code that is supposed to be invoked by jsvc. The code needs to bind to a privileged port below 1024. I do not have root access so I am thinking of authbind. I tried: authbind --deep jsvc ... but in jsvc.err, it still…
1
vote
2 answers

jsvc.exec error: Still running according to PID file

Running my Java service using jsvc on Linux (Ubuntu) 10.04.4 LTS and when I stop service and requests and then hung, checked log to find jsvc exec error below. 14/03/2014 12:49:48 19831 jsvc.exec error: Still running according to PID file…
java_king
  • 51
  • 2
  • 4
1
vote
1 answer

Double jsvc process

I started tomcat through jsvc as daemon. But after jsvc started, I see double jsvc process. Process had started by daemon.sh with option start: start ) "$JSVC" $JSVC_OPTS \ -java-home "$JAVA_HOME" \ -java-home /usr/lib/jvm/jre1.7.0_11 \ -user…
1
vote
3 answers

Start multiple instances of Java daemon using Commons Daemon / JSVC

I've daemonized a Java program using the Commons Daemon / JSVC library and am able to successfully start/stop one instance of my service. What I really need to do is to be able to launch multiple instances of my service, starting and stopping each…
1
vote
2 answers

Daemonizing a java program using jsvc

I'm trying to use JSVC to run a java program as a daemon. This is the simple code that I have used: package daemonexample; public class DaemonExample implements Daemon { /** * @param args the command line arguments */ public static void…
coder
  • 1,901
  • 5
  • 29
  • 44
1
vote
2 answers

running tomcat6 with jsvc

I'm trying to run tomcat6 with jsvc in order to get user privileges at start. I'm trying to run using the code in the tomcat documentation: http://tomcat.apache.org/tomcat-6.0-doc/setup.html cd $CATALINA_HOME ./bin/jsvc -cp ./bin/bootstrap.jar \ …
Tom Klino
  • 2,358
  • 5
  • 35
  • 60
1
vote
1 answer

Add resource files to classpath using daemon(jsvc)

I am struggeling with this for a while. I am using Spring3.1 in a standalone env. I have resources files which I need to add into the classpath (applicationXML). In eclipse it's a known and easy way. Now I am trying to deploy my application to a…
rayman
  • 20,786
  • 45
  • 148
  • 246
1
vote
1 answer

Secure message from jsvc to Jetty (or other app server)

I have an existing Java web application running on Linux using embedded Jetty. The application is loaded using jsvc, which runs as root, listens on port 443, and relays requests to the Java app, which is run under a less privileged user "appname"…
phatfingers
  • 9,770
  • 3
  • 30
  • 44