Can't get jsvc to find JAVA_HOME on debian

2,248 views
Skip to first unread message

Bradley

unread,
Oct 21, 2010, 10:56:22 AM10/21/10
to Rails Trinidad
So I'm trying to get the trinidad_daemon installed. Worked locally on
OSX, so now I'm trying to set up a Debian staging server. I
downloaded the JSVC binary from http://www.apache.org/dist/commons/daemon/binaries/1.0.3/linux/
and installed it on my path.

I have java extracted to:

/mnt/java/jdk1.6.0_20

and symlinked as:

/mnt/java/jdk -> /mnt/java/jdk1.6.0_20

so I can easily modify my Java version by updating this symlink.

This is what I set my JAVA_HOME to when running tomcat manually (/mnt/
java/jdk).

The installed script by default offers up /mnt/java/jdk1.6.0_20/jre as
a JAVA_HOME option, not sure what the difference is between the main
dir and the jre dir, but I get an error (below) when using both /mnt/
java/jdk and /mnt/java/jdk/jre

$ /etc/init.d/trinidad start
Starting daemon...
21/10/2010 10:50:32 12743 jsvc error: Cannot find any VM in Java Home /
mnt/java/jdk

Not sure what's happening as my JAVA_HOME works fine when I manually
start Tomcat. I can only assume it's an issue with my jsvc setup, but
I'm not sure where to go from here.

As usual, many thanks for all the help!

David Calavera

unread,
Oct 21, 2010, 11:34:28 AM10/21/10
to rails-t...@googlegroups.com
mmmm it's weird, could you try to use the real path just to make sure it's not a bug in jsvc, although I'm doing some tests and it follows the link but I'm using the version 1.0.2 packed for ubuntu.

Btw, the difference between the jre directory and the base one is that the jre just contains the java runtime while the base contains the whole jdk, it should also work using both.


--
Has recibido este mensaje porque estás suscrito al grupo "Rails Trinidad" de Grupos de Google.
Para publicar una entrada en este grupo, envía un correo electrónico a rails-t...@googlegroups.com.
Para anular tu suscripción a este grupo, envía un correo electrónico a rails-trinida...@googlegroups.com
Para tener acceso a más opciones, visita el grupo en http://groups.google.com/group/rails-trinidad?hl=es.


Bradley

unread,
Oct 21, 2010, 11:36:32 AM10/21/10
to Rails Trinidad
I've tried all combos from linked to full path without it working.
Maybe I'll try to find another build of the jsvc exe.

Thx for the info on the difference with the jre/ dir!
> > rails-trinida...@googlegroups.com<rails-trinidad%2Bunsubscribe@go oglegroups.com>

David Calavera

unread,
Oct 21, 2010, 11:46:52 AM10/21/10
to rails-t...@googlegroups.com
Btw, if you have the JAVA_HOME exported try to delete the option -home from jsvc arguments, it should be in the line 50 of the script:

JSVC_ARGS="-home $JAVA_HOME \

Bradley

unread,
Oct 21, 2010, 11:53:32 AM10/21/10
to Rails Trinidad
I grabbed the commons-daemon-native jar from http://commons.apache.org/daemon/download_daemon.cgi
(v1.0.3) and built it myself. That did the trick.

On Oct 21, 11:34 am, David Calavera <david.calav...@gmail.com> wrote:
> > rails-trinida...@googlegroups.com<rails-trinidad%2Bunsubscribe@go oglegroups.com>
Reply all
Reply to author
Forward
0 new messages