Re: [daemon] JSVC re-exec requires execution with an absolute or relative path
On 04/28/2013 11:05 PM, John Boyer wrote: Hello: I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec path error. I've sunk a lot of hours into this. I'm beginning to think I should have used the Java Service Wrapper Community Edition instead. Anyway, can anyone help me with this problem? Thank you for your time. John Like the log says. Use either absolute or relative paths. I presume you know what those concepts are. Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in the classpath means it can come from anywhere in the PATH. So use -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar (That's relative path) or -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar (That's absolute path) Regards -- ^TM - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
RE: [daemon] JSVC re-exec requires execution with an absolute or relative path
If you are implementing on Linux classpath version mismatches can be overcome by executing version-specific maven-jsvc-plugin in pom.xml Maven-Jsvc-Plugin grab the source here https://github.com/jeroenr/Maven-Jsvc-Plugin Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Mon, 29 Apr 2013 06:42:56 +0200 > From: mt...@apache.org > To: user@commons.apache.org > Subject: Re: [daemon] JSVC re-exec requires execution with an absolute or > relative path > > On 04/28/2013 11:05 PM, John Boyer wrote: > > Hello: > > > > I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec > > path error. I've sunk a lot of hours into this. I'm beginning to think I > > should have used the Java Service Wrapper Community Edition instead. > > > > Anyway, can anyone help me with this problem? Thank you for your time. John > > > > Like the log says. Use either absolute or relative paths. > I presume you know what those concepts are. > > Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in the > classpath > means it can come from anywhere in the PATH. > So use > -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar > (That's relative path) > or > -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar > (That's absolute path) > > > > Regards > -- > ^TM > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org >
Re: [daemon] JSVC re-exec requires execution with an absolute or relative path
Hi TM: Thanks, I will try this. In any case, I believe if the log message mentioned the "classpath" explicitly it would have saved me a lot of time. It's unclear what the real object of the sentence is or what path it's referring to. Just spitting out the classpath in the log message would've given me a clue as to what it was complaining about. JSVC re-exec requires execution with an absolute or relative path Thanks again, John On Apr 28, 2013, at 9:42 PM, Mladen Turk wrote: > On 04/28/2013 11:05 PM, John Boyer wrote: >> Hello: >> >> I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec path >> error. I've sunk a lot of hours into this. I'm beginning to think I should >> have used the Java Service Wrapper Community Edition instead. >> >> Anyway, can anyone help me with this problem? Thank you for your time. John >> > > Like the log says. Use either absolute or relative paths. > I presume you know what those concepts are. > > Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in the > classpath > means it can come from anywhere in the PATH. > So use > -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar > (That's relative path) > or > -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar > (That's absolute path) > > > > Regards > -- > ^TM > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [daemon] JSVC re-exec requires execution with an absolute or relative path
UPDATE: Unfortunately, using the absolute and relative classpaths results in the same error. We haven't been able to get this to work on UNIX or Mac OS X. I think we'll need to look at other alternatives such as the Java Service Wrapper. UNIX Error: "JSVC re-exec requires execution with an absolute or relative path" Mac OS X: "Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader" Regards, John On Apr 29, 2013, at 8:46 AM, John Boyer wrote: > Hi TM: > > Thanks, I will try this. In any case, I believe if the log message mentioned > the "classpath" explicitly it would have saved me a lot of time. It's unclear > what the real object of the sentence is or what path it's referring to. Just > spitting out the classpath in the log message would've given me a clue as to > what it was complaining about. > > JSVC re-exec requires execution with an absolute or relative path > > Thanks again, > > John > > On Apr 28, 2013, at 9:42 PM, Mladen Turk wrote: > >> On 04/28/2013 11:05 PM, John Boyer wrote: >>> Hello: >>> >>> I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec >>> path error. I've sunk a lot of hours into this. I'm beginning to think I >>> should have used the Java Service Wrapper Community Edition instead. >>> >>> Anyway, can anyone help me with this problem? Thank you for your time. John >>> >> >> Like the log says. Use either absolute or relative paths. >> I presume you know what those concepts are. >> >> Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in the >> classpath >> means it can come from anywhere in the PATH. >> So use >> -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar >> (That's relative path) >> or >> -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar >> (That's absolute path) >> >> >> >> Regards >> -- >> ^TM >> >> - >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org >> For additional commands, e-mail: user-h...@commons.apache.org >> > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [daemon] JSVC re-exec requires execution with an absolute or relative path
Hi: UPDATE: The UNIX error message is referring to the absolute path of the jsvc executable. When I invoked the executable with its absolute path it worked. I assume it's the same problem on Mac OS X. /usr/local/bin/jsvc -jvm server -debug -home /usr/lib/jvm/java-6-openjdk -cp /usr/local/bin/commons-daemon-1.0.15.jar:myjar.jar MyDaemonClass I'm really happy it's working now. Regards, John On Apr 29, 2013, at 9:10 AM, John Boyer wrote: > UPDATE: Unfortunately, using the absolute and relative classpaths results in > the same error. > > We haven't been able to get this to work on UNIX or Mac OS X. I think we'll > need to look at other alternatives such as the Java Service Wrapper. > > UNIX Error: "JSVC re-exec requires execution with an absolute or relative > path" > > Mac OS X: "Cannot find daemon loader > org/apache/commons/daemon/support/DaemonLoader" > > Regards, > > John > > > On Apr 29, 2013, at 8:46 AM, John Boyer wrote: > >> Hi TM: >> >> Thanks, I will try this. In any case, I believe if the log message mentioned >> the "classpath" explicitly it would have saved me a lot of time. It's >> unclear what the real object of the sentence is or what path it's referring >> to. Just spitting out the classpath in the log message would've given me a >> clue as to what it was complaining about. >> >> JSVC re-exec requires execution with an absolute or relative path >> >> Thanks again, >> >> John >> >> On Apr 28, 2013, at 9:42 PM, Mladen Turk wrote: >> >>> On 04/28/2013 11:05 PM, John Boyer wrote: Hello: I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec path error. I've sunk a lot of hours into this. I'm beginning to think I should have used the Java Service Wrapper Community Edition instead. Anyway, can anyone help me with this problem? Thank you for your time. John >>> >>> Like the log says. Use either absolute or relative paths. >>> I presume you know what those concepts are. >>> >>> Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in the >>> classpath >>> means it can come from anywhere in the PATH. >>> So use >>> -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar >>> (That's relative path) >>> or >>> -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar >>> (That's absolute path) >>> >>> >>> >>> Regards >>> -- >>> ^TM >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org >>> For additional commands, e-mail: user-h...@commons.apache.org >>> >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org >> For additional commands, e-mail: user-h...@commons.apache.org >> > - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
RE: [daemon] JSVC re-exec requires execution with an absolute or relative path
'Mornin John so to recap prepend /usr/local/bin/jsvc to $PATH put "-jvm server -debug -home /usr/lib/jvm/java-6-openjdk" ON $JAVA_OPTS prepend /usr/local/bin/commons-daemon-1.0.15.jar to $CLASSPATH then automate the process with https://github.com/jeroenr/Maven-Jsvc-Plugin glad you're on your way to a solution! Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Subject: Re: [daemon] JSVC re-exec requires execution with an absolute or > relative path > From: johnboye...@gmail.com > Date: Mon, 29 Apr 2013 15:47:57 -0700 > To: user@commons.apache.org > > Hi: > > UPDATE: > The UNIX error message is referring to the absolute path of the jsvc > executable. When I invoked the executable with its absolute path it worked. I > assume it's the same problem on Mac OS X. > > /usr/local/bin/jsvc -jvm server -debug -home /usr/lib/jvm/java-6-openjdk -cp > /usr/local/bin/commons-daemon-1.0.15.jar:myjar.jar MyDaemonClass > > I'm really happy it's working now. > > Regards, > > John > > On Apr 29, 2013, at 9:10 AM, John Boyer wrote: > > > UPDATE: Unfortunately, using the absolute and relative classpaths results > > in the same error. > > > > We haven't been able to get this to work on UNIX or Mac OS X. I think we'll > > need to look at other alternatives such as the Java Service Wrapper. > > > > UNIX Error: "JSVC re-exec requires execution with an absolute or relative > > path" > > > > Mac OS X: "Cannot find daemon loader > > org/apache/commons/daemon/support/DaemonLoader" > > > > Regards, > > > > John > > > > > > On Apr 29, 2013, at 8:46 AM, John Boyer wrote: > > > >> Hi TM: > >> > >> Thanks, I will try this. In any case, I believe if the log message > >> mentioned the "classpath" explicitly it would have saved me a lot of time. > >> It's unclear what the real object of the sentence is or what path it's > >> referring to. Just spitting out the classpath in the log message would've > >> given me a clue as to what it was complaining about. > >> > >> JSVC re-exec requires execution with an absolute or relative path > >> > >> Thanks again, > >> > >> John > >> > >> On Apr 28, 2013, at 9:42 PM, Mladen Turk wrote: > >> > >>> On 04/28/2013 11:05 PM, John Boyer wrote: > >>>> Hello: > >>>> > >>>> I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec > >>>> path error. I've sunk a lot of hours into this. I'm beginning to think I > >>>> should have used the Java Service Wrapper Community Edition instead. > >>>> > >>>> Anyway, can anyone help me with this problem? Thank you for your time. > >>>> John > >>>> > >>> > >>> Like the log says. Use either absolute or relative paths. > >>> I presume you know what those concepts are. > >>> > >>> Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in > >>> the classpath > >>> means it can come from anywhere in the PATH. > >>> So use > >>> -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar > >>> (That's relative path) > >>> or > >>> -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar > >>> (That's absolute path) > >>> > >>> > >>> > >>> Regards > >>> -- > >>> ^TM > >>> > >>> - > >>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > >>> For additional commands, e-mail: user-h...@commons.apache.org > >>> > >> > >> > >> - > >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > >> For additional commands, e-mail: user-h...@commons.apache.org > >> > > > > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org >
Re: [daemon] JSVC re-exec requires execution with an absolute or relative path
On 04/30/2013 12:47 AM, John Boyer wrote: Hi: UPDATE: The UNIX error message is referring to the absolute path of the jsvc executable. When I invoked the executable with its absolute path it worked. I assume it's the same problem on Mac OS X. /usr/local/bin/jsvc -jvm server -debug -home /usr/lib/jvm/java-6-openjdk -cp /usr/local/bin/commons-daemon-1.0.15.jar:myjar.jar MyDaemonClass I'm really happy it's working now. Yeah. Sorry, forgot that this message is for jsvc not classpath. You should either call ./jsvc or /absolute/path/jsvc The reason is again security so that child does not pick up different executable in case users and root environment PATH mismatch and both have jsvc in PATH directories in different places. Eg. a typical would be systems with jsvc inside /usr/sbin/ and you wish to start your own from /foo/bar/. It would be hard to determine which one would be called (depends on PATH) So, just use either relative or absolute paths. Actually we just test if the executable has '/' inside invocation since this prevents PATH search. Regards -- ^TM - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org