Re: [daemon] Fwd: Compiling jsvc Win32
Dion Gillard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Who else from daemon should be on the PMC? The other two that survived the move with commit rights are mturk and jfclere. Since AFAIK, they both lurk on this list, I would guess that they would have added their names if they wanted it, but I haven't asked them myself :). On 7/9/07, Bill Barker [EMAIL PROTECTED] wrote: Dion Gillard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The lack of response on this: http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200707.mbox/ajax/[EMAIL PROTECTED] is telling. How dormant is daemon? Using jsvc on Windows has never been supported. The jsvc module is only for *nix systems. Windows systems should use procrun. Daemon is fairly mature, but not particularly dormant. It gets commits every few months. It could use some more eyes for systems like OS/X, but otherwise is relatively healthy for a commons project, aside from not having much PMC representation. -- Forwarded message -- From: JsD [EMAIL PROTECTED] Date: Jul 9, 2007 12:09 PM Subject: Re: Compiling jsvc Win32 To: [EMAIL PROTECTED] After finding out that one must have the latest version of Visual Studio to build, I decided to look for another route. Finally I found JavaService ( http://forge.objectweb.org/projects/javaservice/). This project comes pre-built and works like a charm. I strongly suggest this for those who do not wish to purchase or use Visual Studio. Cheers, JsD On 5/3/07, JsD [EMAIL PROTECTED] wrote: On 4/28/07, JsD [EMAIL PROTECTED] wrote: Hello, I am trying to compile from source on Windows XP using Cygwin. I have installed the latest make, autoconf, gcc in cygwin environment. The configure runs fine. When I try to make I get the following: /cygdrive/c/_other/_s/java/daemon-1.0.1/src/native/unix $ make make -C native all make[1]: Entering directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' gcc -g -O2 -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID -DCPU=\i386\ -I/cygdrive/c/jdk1.5.0_11/include -I/cygdrive/c/jdk1.5.0_11/include/win32 -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o jsvc-unix.c:229: warning: function declaration isn't a prototype jsvc-unix.c: In function `check_pid': jsvc-unix.c:279: warning: implicit declaration of function `lockf' jsvc-unix.c:279: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:279: error: (Each undeclared identifier is reported only once jsvc-unix.c:279: error: for each function it appears in.) jsvc-unix.c :286: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `get_pidf': jsvc-unix.c:321: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:323: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `wait_child': jsvc-unix.c:405: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:407: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c : In function `main': jsvc-unix.c:693: warning: implicit declaration of function `SetTerm' make[1]: *** [jsvc-unix.o] Error 1 make[1]: Leaving directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' make: *** [native/all] Error 2 ~end~ Any help is greatly appreciated. I would love to run this on *nix but I am unfortunately stuck with windoze at this point :( Thanks, JsD Following up... Are there any *detailed* instructions out there on how to build jsvc on Win32? Any help is appreciated. JsD -- dIon Gillard Rule #131 of Acquisition: Information is Profit. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- dIon Gillard Rule #131 of Acquisition: Information is Profit. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[daemon] Fwd: Compiling jsvc Win32
The lack of response on this: http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200707.mbox/ajax/[EMAIL PROTECTED] is telling. How dormant is daemon? -- Forwarded message -- From: JsD [EMAIL PROTECTED] Date: Jul 9, 2007 12:09 PM Subject: Re: Compiling jsvc Win32 To: [EMAIL PROTECTED] After finding out that one must have the latest version of Visual Studio to build, I decided to look for another route. Finally I found JavaService ( http://forge.objectweb.org/projects/javaservice/). This project comes pre-built and works like a charm. I strongly suggest this for those who do not wish to purchase or use Visual Studio. Cheers, JsD On 5/3/07, JsD [EMAIL PROTECTED] wrote: On 4/28/07, JsD [EMAIL PROTECTED] wrote: Hello, I am trying to compile from source on Windows XP using Cygwin. I have installed the latest make, autoconf, gcc in cygwin environment. The configure runs fine. When I try to make I get the following: /cygdrive/c/_other/_s/java/daemon-1.0.1/src/native/unix $ make make -C native all make[1]: Entering directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' gcc -g -O2 -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID -DCPU=\i386\ -I/cygdrive/c/jdk1.5.0_11/include -I/cygdrive/c/jdk1.5.0_11/include/win32 -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o jsvc-unix.c:229: warning: function declaration isn't a prototype jsvc-unix.c: In function `check_pid': jsvc-unix.c:279: warning: implicit declaration of function `lockf' jsvc-unix.c:279: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:279: error: (Each undeclared identifier is reported only once jsvc-unix.c:279: error: for each function it appears in.) jsvc-unix.c :286: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `get_pidf': jsvc-unix.c:321: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:323: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `wait_child': jsvc-unix.c:405: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:407: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c : In function `main': jsvc-unix.c:693: warning: implicit declaration of function `SetTerm' make[1]: *** [jsvc-unix.o] Error 1 make[1]: Leaving directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' make: *** [native/all] Error 2 ~end~ Any help is greatly appreciated. I would love to run this on *nix but I am unfortunately stuck with windoze at this point :( Thanks, JsD Following up... Are there any *detailed* instructions out there on how to build jsvc on Win32? Any help is appreciated. JsD -- dIon Gillard Rule #131 of Acquisition: Information is Profit.
Re: [daemon] Fwd: Compiling jsvc Win32
Dion Gillard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The lack of response on this: http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200707.mbox/ajax/[EMAIL PROTECTED] is telling. How dormant is daemon? Using jsvc on Windows has never been supported. The jsvc module is only for *nix systems. Windows systems should use procrun. Daemon is fairly mature, but not particularly dormant. It gets commits every few months. It could use some more eyes for systems like OS/X, but otherwise is relatively healthy for a commons project, aside from not having much PMC representation. -- Forwarded message -- From: JsD [EMAIL PROTECTED] Date: Jul 9, 2007 12:09 PM Subject: Re: Compiling jsvc Win32 To: [EMAIL PROTECTED] After finding out that one must have the latest version of Visual Studio to build, I decided to look for another route. Finally I found JavaService ( http://forge.objectweb.org/projects/javaservice/). This project comes pre-built and works like a charm. I strongly suggest this for those who do not wish to purchase or use Visual Studio. Cheers, JsD On 5/3/07, JsD [EMAIL PROTECTED] wrote: On 4/28/07, JsD [EMAIL PROTECTED] wrote: Hello, I am trying to compile from source on Windows XP using Cygwin. I have installed the latest make, autoconf, gcc in cygwin environment. The configure runs fine. When I try to make I get the following: /cygdrive/c/_other/_s/java/daemon-1.0.1/src/native/unix $ make make -C native all make[1]: Entering directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' gcc -g -O2 -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID -DCPU=\i386\ -I/cygdrive/c/jdk1.5.0_11/include -I/cygdrive/c/jdk1.5.0_11/include/win32 -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o jsvc-unix.c:229: warning: function declaration isn't a prototype jsvc-unix.c: In function `check_pid': jsvc-unix.c:279: warning: implicit declaration of function `lockf' jsvc-unix.c:279: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:279: error: (Each undeclared identifier is reported only once jsvc-unix.c:279: error: for each function it appears in.) jsvc-unix.c :286: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `get_pidf': jsvc-unix.c:321: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:323: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `wait_child': jsvc-unix.c:405: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:407: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c : In function `main': jsvc-unix.c:693: warning: implicit declaration of function `SetTerm' make[1]: *** [jsvc-unix.o] Error 1 make[1]: Leaving directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' make: *** [native/all] Error 2 ~end~ Any help is greatly appreciated. I would love to run this on *nix but I am unfortunately stuck with windoze at this point :( Thanks, JsD Following up... Are there any *detailed* instructions out there on how to build jsvc on Win32? Any help is appreciated. JsD -- dIon Gillard Rule #131 of Acquisition: Information is Profit. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [daemon] Fwd: Compiling jsvc Win32
Who else from daemon should be on the PMC? On 7/9/07, Bill Barker [EMAIL PROTECTED] wrote: Dion Gillard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The lack of response on this: http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200707.mbox/ajax/[EMAIL PROTECTED] is telling. How dormant is daemon? Using jsvc on Windows has never been supported. The jsvc module is only for *nix systems. Windows systems should use procrun. Daemon is fairly mature, but not particularly dormant. It gets commits every few months. It could use some more eyes for systems like OS/X, but otherwise is relatively healthy for a commons project, aside from not having much PMC representation. -- Forwarded message -- From: JsD [EMAIL PROTECTED] Date: Jul 9, 2007 12:09 PM Subject: Re: Compiling jsvc Win32 To: [EMAIL PROTECTED] After finding out that one must have the latest version of Visual Studio to build, I decided to look for another route. Finally I found JavaService ( http://forge.objectweb.org/projects/javaservice/). This project comes pre-built and works like a charm. I strongly suggest this for those who do not wish to purchase or use Visual Studio. Cheers, JsD On 5/3/07, JsD [EMAIL PROTECTED] wrote: On 4/28/07, JsD [EMAIL PROTECTED] wrote: Hello, I am trying to compile from source on Windows XP using Cygwin. I have installed the latest make, autoconf, gcc in cygwin environment. The configure runs fine. When I try to make I get the following: /cygdrive/c/_other/_s/java/daemon-1.0.1/src/native/unix $ make make -C native all make[1]: Entering directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' gcc -g -O2 -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID -DCPU=\i386\ -I/cygdrive/c/jdk1.5.0_11/include -I/cygdrive/c/jdk1.5.0_11/include/win32 -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o jsvc-unix.c:229: warning: function declaration isn't a prototype jsvc-unix.c: In function `check_pid': jsvc-unix.c:279: warning: implicit declaration of function `lockf' jsvc-unix.c:279: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:279: error: (Each undeclared identifier is reported only once jsvc-unix.c:279: error: for each function it appears in.) jsvc-unix.c :286: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `get_pidf': jsvc-unix.c:321: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:323: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c: In function `wait_child': jsvc-unix.c:405: error: `F_LOCK' undeclared (first use in this function) jsvc-unix.c:407: error: `F_ULOCK' undeclared (first use in this function) jsvc-unix.c : In function `main': jsvc-unix.c:693: warning: implicit declaration of function `SetTerm' make[1]: *** [jsvc-unix.o] Error 1 make[1]: Leaving directory `/cygdrive/c/_other/_s/java/daemon-1.0.1 /src/native/unix/native' make: *** [native/all] Error 2 ~end~ Any help is greatly appreciated. I would love to run this on *nix but I am unfortunately stuck with windoze at this point :( Thanks, JsD Following up... Are there any *detailed* instructions out there on how to build jsvc on Win32? Any help is appreciated. JsD -- dIon Gillard Rule #131 of Acquisition: Information is Profit. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- dIon Gillard Rule #131 of Acquisition: Information is Profit.
[jira] Commented: (DAEMON-80) [daemon] Syslog support for jsvc
[ https://issues.apache.org/jira/browse/DAEMON-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491210 ] Marcus Better commented on DAEMON-80: - A patch implementing this is available here: http://svn.debian.org/wsvn/pkg-java?op=comp[EMAIL PROTECTED][EMAIL PROTECTED]manualorder=1 This adds syslog support, and also tweaks the debug output to prevent adding timestamp and process id to each line, which is superfluous at least if syslog is used. (Also, a section of old Linux-only code which seems unnecessary has been disabled.) [daemon] Syslog support for jsvc Key: DAEMON-80 URL: https://issues.apache.org/jira/browse/DAEMON-80 Project: Commons Daemon Issue Type: Improvement Affects Versions: 1.0.1 Environment: Operating System: Linux Platform: PC Reporter: Mike Polek Priority: Minor Currently, the only way to rotate the logs produced via jsvc is to restart the tomcat server. I've coded up support for using syslog through the local0.* channels. It probably needs a little work, but hopefully it can be incorporated into a future release. --- jsvc-unix.c 2005-05-17 06:13:39.0 -0700 +++ /tmp/jsvc-unix.c2005-11-08 14:18:18.0 -0800 @@ -25,6 +25,8 @@ #include stdio.h #include pwd.h #include grp.h +#include syslog.h +#include errno.h #ifdef OS_LINUX #include sys/prctl.h #include sys/syscall.h @@ -35,6 +37,7 @@ extern char **environ; pid_t controlled=0; /* the son process pid */ +pid_t logger=0; /* the logger process pid */ static bool stopping=false; static bool doreload=false; static void (*handler_int)(int)=NULL; @@ -562,10 +565,53 @@ return(freopen(outfile,mode,stream)); } +static int logger_child (int outpipe, int errpipe, char *procname) { + /* Read from file descriptors. Log to syslog. */ + fd_set rfds; + struct timeval tv; + int retval, n; + int bufsz = 1024; + char buf[bufsz]; + + if (outpipe errpipe) { +n = outpipe + 1; + } else { +n = errpipe + 1; + } + + openlog(procname, LOG_PID, LOG_LOCAL0); + + while (1) { +/* Watch two pipes for input */ +FD_ZERO(rfds); +FD_SET(outpipe, rfds); +FD_SET(errpipe, rfds); +/* Wait for a minute */ +tv.tv_sec = 60; +tv.tv_usec = 0; + +retval = select (n, rfds, NULL, NULL, tv); +if (retval == -1) + perror(select()); +else if (retval) { + if (FD_ISSET(outpipe, rfds)) { +read(outpipe, buf, bufsz); +syslog(LOG_INFO, %s, buf); + } + if (FD_ISSET(errpipe, rfds)) { +read(errpipe, buf, bufsz); +syslog(LOG_ERR, %s, buf); + } +} + } +} + /** * Redirect stdin, stdout, stderr. */ -static void set_output(char *outfile, char *errfile) { +static void set_output(char *outfile, char *errfile, char *procname) { +int stdoutdes[2] = {0,0}, stderrdes[2] = {0,0}, +forkoutlogger=0, forkerrlogger=0; freopen(/dev/null, r, stdin); log_debug(redirecting stdout to %s and stderr to %s,outfile,errfile); @@ -577,11 +623,28 @@ if(strcmp(outfile, 2) == 0 strcmp(errfile,1) == 0) { outfile=/dev/null; } -if(strcmp(outfile, 2) != 0) { + +if (strcmp(outfile, SYSLOG) == 0) { + /* Send stdout to syslog through a logger process */ + if (pipe(stdoutdes)) { +fprintf(stderr, Unable to create stdout pipe for syslog: %s\n, +strerror(errno)); + } else { +forkoutlogger=1; + } +} else if(strcmp(outfile, 2) != 0) { loc_freopen(outfile, a, stdout); } -if(strcmp(errfile,1) != 0) { +if (strcmp(errfile, SYSLOG) == 0) { + /* Send stderr to syslog through a logger process */ + if (pipe(stderrdes)) { +fprintf(stderr, Unable to create stderr pipe for syslog: %s\n, +strerror(errno)); + } else { +forkerrlogger=1; + } +} else if(strcmp(errfile,1) != 0) { loc_freopen(errfile, a, stderr); } else { close(2); @@ -591,6 +654,33 @@ close(1); dup(2); } + +if (forkoutlogger || forkerrlogger) { + int pid; + if ((pid=fork())!=-1) { +if (pid) { + if (stdoutdes[0] != 0) { +close(stdoutdes[0]); +if (dup2(stdoutdes[1],1) == -1) { + fprintf(stderr,Unable to redirect stdout to pipe for syslog: %s\n, +strerror(errno)); +} + } + if (stderrdes[0] != 0) { +close(stderrdes[0]); +if (dup2(stderrdes[1],2) == -1) { + fprintf(stderr,Unable to redirect stderr to pipe for syslog: %s\n, +strerror(errno)); +} + } +} else { + exit
[jira] Commented: (DAEMON-24) [daemon] jsvc assumes posix capabilities loaded
[ https://issues.apache.org/jira/browse/DAEMON-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491224 ] Marcus Better commented on DAEMON-24: - That patch is for DAEMON-93. I propose something like this instead: http://svn.debian.org/wsvn/pkg-java?op=comp[EMAIL PROTECTED][EMAIL PROTECTED]manualorder=1 [daemon] jsvc assumes posix capabilities loaded --- Key: DAEMON-24 URL: https://issues.apache.org/jira/browse/DAEMON-24 Project: Commons Daemon Issue Type: Bug Environment: Operating System: Linux Platform: PC Reporter: Michael Thome Attachments: 1.0.1-capabilities.patch later versions of linux (e.g. 2.6.x) may have capability management configured as a module rather than compiled in. A LKML discussion is ongoing as to if this is a good idea or not, but the upshot is that jsvc will fail on capset if the kernel doesn't have the module loaded. I'd suggest a note in the release notes and/or linux faq section discussing the issue. I'd be happy to propose a doc patch -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Reopened: (DAEMON-80) [daemon] Syslog support for jsvc
[ https://issues.apache.org/jira/browse/DAEMON-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell reopened DAEMON-80: - Reporter requested this be reopened. [daemon] Syslog support for jsvc Key: DAEMON-80 URL: https://issues.apache.org/jira/browse/DAEMON-80 Project: Commons Daemon Issue Type: Improvement Affects Versions: 1.0.1 Environment: Operating System: Linux Platform: PC Reporter: Mike Polek Priority: Minor Currently, the only way to rotate the logs produced via jsvc is to restart the tomcat server. I've coded up support for using syslog through the local0.* channels. It probably needs a little work, but hopefully it can be incorporated into a future release. --- jsvc-unix.c 2005-05-17 06:13:39.0 -0700 +++ /tmp/jsvc-unix.c2005-11-08 14:18:18.0 -0800 @@ -25,6 +25,8 @@ #include stdio.h #include pwd.h #include grp.h +#include syslog.h +#include errno.h #ifdef OS_LINUX #include sys/prctl.h #include sys/syscall.h @@ -35,6 +37,7 @@ extern char **environ; pid_t controlled=0; /* the son process pid */ +pid_t logger=0; /* the logger process pid */ static bool stopping=false; static bool doreload=false; static void (*handler_int)(int)=NULL; @@ -562,10 +565,53 @@ return(freopen(outfile,mode,stream)); } +static int logger_child (int outpipe, int errpipe, char *procname) { + /* Read from file descriptors. Log to syslog. */ + fd_set rfds; + struct timeval tv; + int retval, n; + int bufsz = 1024; + char buf[bufsz]; + + if (outpipe errpipe) { +n = outpipe + 1; + } else { +n = errpipe + 1; + } + + openlog(procname, LOG_PID, LOG_LOCAL0); + + while (1) { +/* Watch two pipes for input */ +FD_ZERO(rfds); +FD_SET(outpipe, rfds); +FD_SET(errpipe, rfds); +/* Wait for a minute */ +tv.tv_sec = 60; +tv.tv_usec = 0; + +retval = select (n, rfds, NULL, NULL, tv); +if (retval == -1) + perror(select()); +else if (retval) { + if (FD_ISSET(outpipe, rfds)) { +read(outpipe, buf, bufsz); +syslog(LOG_INFO, %s, buf); + } + if (FD_ISSET(errpipe, rfds)) { +read(errpipe, buf, bufsz); +syslog(LOG_ERR, %s, buf); + } +} + } +} + /** * Redirect stdin, stdout, stderr. */ -static void set_output(char *outfile, char *errfile) { +static void set_output(char *outfile, char *errfile, char *procname) { +int stdoutdes[2] = {0,0}, stderrdes[2] = {0,0}, +forkoutlogger=0, forkerrlogger=0; freopen(/dev/null, r, stdin); log_debug(redirecting stdout to %s and stderr to %s,outfile,errfile); @@ -577,11 +623,28 @@ if(strcmp(outfile, 2) == 0 strcmp(errfile,1) == 0) { outfile=/dev/null; } -if(strcmp(outfile, 2) != 0) { + +if (strcmp(outfile, SYSLOG) == 0) { + /* Send stdout to syslog through a logger process */ + if (pipe(stdoutdes)) { +fprintf(stderr, Unable to create stdout pipe for syslog: %s\n, +strerror(errno)); + } else { +forkoutlogger=1; + } +} else if(strcmp(outfile, 2) != 0) { loc_freopen(outfile, a, stdout); } -if(strcmp(errfile,1) != 0) { +if (strcmp(errfile, SYSLOG) == 0) { + /* Send stderr to syslog through a logger process */ + if (pipe(stderrdes)) { +fprintf(stderr, Unable to create stderr pipe for syslog: %s\n, +strerror(errno)); + } else { +forkerrlogger=1; + } +} else if(strcmp(errfile,1) != 0) { loc_freopen(errfile, a, stderr); } else { close(2); @@ -591,6 +654,33 @@ close(1); dup(2); } + +if (forkoutlogger || forkerrlogger) { + int pid; + if ((pid=fork())!=-1) { +if (pid) { + if (stdoutdes[0] != 0) { +close(stdoutdes[0]); +if (dup2(stdoutdes[1],1) == -1) { + fprintf(stderr,Unable to redirect stdout to pipe for syslog: %s\n, +strerror(errno)); +} + } + if (stderrdes[0] != 0) { +close(stderrdes[0]); +if (dup2(stderrdes[1],2) == -1) { + fprintf(stderr,Unable to redirect stderr to pipe for syslog: %s\n, +strerror(errno)); +} + } +} else { + exit (logger_child(stdoutdes[1],stderrdes[1],procname)); +} + } else { +fprintf(stderr, Unable to create logger child process: %s\n, + strerror(errno)); + } +} } int main(int argc, char *argv[]) { @@ -678,7 +768,7 @@ #endif } -set_output(args-outfile, args-errfile); +set_output(args-outfile, args-errfile, args-procname
[jira] Updated: (DAEMON-98) make fails for jsvc on OS X
[ https://issues.apache.org/jira/browse/DAEMON-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Amos Hayes updated DAEMON-98: - Attachment: osx_patch.txt The attached osx_patch.txt file solves the problem. make fails for jsvc on OS X --- Key: DAEMON-98 URL: https://issues.apache.org/jira/browse/DAEMON-98 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0, 1.0.1 Environment: OS X 10.4.9 Server on i386 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386 java version 1.5.0_07 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164) Java HotSpot(TM) Server VM (build 1.5.0_07-87, mixed mode) Reporter: Amos Hayes Attachments: osx_patch.txt With both jsvc.tar.gz from tomcat 6.0.10 and the daemon-1.0.1.tar.gz sources from the commons project, when I try to configure/compile jsvc on OS X, I get the following: arthur:/usr/local/apache-tomcat-6.0.10/bin/daemon-1.0.1/src/native/unix root# ./configure *** Current host *** checking build system type... i386-apple-darwin8.9.1 checking host system type... i386-apple-darwin8.9.1 checking cached host system type... ok *** C-Language compilation tools *** checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib *** Host support *** checking C flags dependant on host system type... ok *** Java compilation tools *** checking for javac... /System/Library/Frameworks/JavaVM.framework/Home/bin/javac checking wether the Java compiler (/System/Library/Frameworks/JavaVM.framework/Home/bin/javac) works... yes checking for jar... /System/Library/Frameworks/JavaVM.framework/Home/bin/jar gcc flags added *** Writing output files *** configure: creating ./config.status config.status: creating Makefile config.status: creating Makedefs config.status: creating native/Makefile *** All done *** Now you can issue make arthur:/usr/local/apache-tomcat-6.0.10/bin/daemon-1.0.1/src/native/unix root# make make -C native all gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c arguments.c -o arguments.o arguments.c: In function 'arguments': arguments.c:251: warning: unused variable 'temp' gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c debug.c -o debug.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c dso-dlfcn.c -o dso-dlfcn.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c dso-dyld.c -o dso-dyld.o dso-dyld.c:54: error: conflicting types for 'dso_init' dso.h:24: error: previous declaration of 'dso_init' was here dso-dyld.c: In function 'dso_link': dso-dyld.c:69: warning: 'NSAddLibrary' is deprecated (declared at /usr/include/mach-o/dyld.h:224) dso-dyld.c: At top level: dso-dyld.c:76: error: conflicting types for 'dso_unlink' dso.h:26: error: previous declaration of 'dso_unlink' was here dso-dyld.c: In function 'dso_symbol': dso-dyld.c:109: warning: operation on 'x' may be undefined dso-dyld.c:113: warning: 'NSLookupAndBindSymbol' is deprecated (declared at /usr/include/mach-o/dyld.h:158) dso-dyld.c: At top level: dso-dyld.c:127: warning: function declaration isn't a prototype make[1]: *** [dso-dyld.o] Error 1 make: *** [native/all] Error 2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (DAEMON-80) [daemon] Syslog support for jsvc
[ https://issues.apache.org/jira/browse/DAEMON-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490739 ] Marcus Better commented on DAEMON-80: - Adding syslog support would be a useful feature in itself. Most UNIX daemons use syslog for logging. With syslog it is easier to integrate the daemon with the existing logging infrastructure, for example remote logging. Please reopen this issue. [daemon] Syslog support for jsvc Key: DAEMON-80 URL: https://issues.apache.org/jira/browse/DAEMON-80 Project: Commons Daemon Issue Type: Improvement Affects Versions: 1.0.1 Environment: Operating System: Linux Platform: PC Reporter: Mike Polek Priority: Minor Currently, the only way to rotate the logs produced via jsvc is to restart the tomcat server. I've coded up support for using syslog through the local0.* channels. It probably needs a little work, but hopefully it can be incorporated into a future release. --- jsvc-unix.c 2005-05-17 06:13:39.0 -0700 +++ /tmp/jsvc-unix.c2005-11-08 14:18:18.0 -0800 @@ -25,6 +25,8 @@ #include stdio.h #include pwd.h #include grp.h +#include syslog.h +#include errno.h #ifdef OS_LINUX #include sys/prctl.h #include sys/syscall.h @@ -35,6 +37,7 @@ extern char **environ; pid_t controlled=0; /* the son process pid */ +pid_t logger=0; /* the logger process pid */ static bool stopping=false; static bool doreload=false; static void (*handler_int)(int)=NULL; @@ -562,10 +565,53 @@ return(freopen(outfile,mode,stream)); } +static int logger_child (int outpipe, int errpipe, char *procname) { + /* Read from file descriptors. Log to syslog. */ + fd_set rfds; + struct timeval tv; + int retval, n; + int bufsz = 1024; + char buf[bufsz]; + + if (outpipe errpipe) { +n = outpipe + 1; + } else { +n = errpipe + 1; + } + + openlog(procname, LOG_PID, LOG_LOCAL0); + + while (1) { +/* Watch two pipes for input */ +FD_ZERO(rfds); +FD_SET(outpipe, rfds); +FD_SET(errpipe, rfds); +/* Wait for a minute */ +tv.tv_sec = 60; +tv.tv_usec = 0; + +retval = select (n, rfds, NULL, NULL, tv); +if (retval == -1) + perror(select()); +else if (retval) { + if (FD_ISSET(outpipe, rfds)) { +read(outpipe, buf, bufsz); +syslog(LOG_INFO, %s, buf); + } + if (FD_ISSET(errpipe, rfds)) { +read(errpipe, buf, bufsz); +syslog(LOG_ERR, %s, buf); + } +} + } +} + /** * Redirect stdin, stdout, stderr. */ -static void set_output(char *outfile, char *errfile) { +static void set_output(char *outfile, char *errfile, char *procname) { +int stdoutdes[2] = {0,0}, stderrdes[2] = {0,0}, +forkoutlogger=0, forkerrlogger=0; freopen(/dev/null, r, stdin); log_debug(redirecting stdout to %s and stderr to %s,outfile,errfile); @@ -577,11 +623,28 @@ if(strcmp(outfile, 2) == 0 strcmp(errfile,1) == 0) { outfile=/dev/null; } -if(strcmp(outfile, 2) != 0) { + +if (strcmp(outfile, SYSLOG) == 0) { + /* Send stdout to syslog through a logger process */ + if (pipe(stdoutdes)) { +fprintf(stderr, Unable to create stdout pipe for syslog: %s\n, +strerror(errno)); + } else { +forkoutlogger=1; + } +} else if(strcmp(outfile, 2) != 0) { loc_freopen(outfile, a, stdout); } -if(strcmp(errfile,1) != 0) { +if (strcmp(errfile, SYSLOG) == 0) { + /* Send stderr to syslog through a logger process */ + if (pipe(stderrdes)) { +fprintf(stderr, Unable to create stderr pipe for syslog: %s\n, +strerror(errno)); + } else { +forkerrlogger=1; + } +} else if(strcmp(errfile,1) != 0) { loc_freopen(errfile, a, stderr); } else { close(2); @@ -591,6 +654,33 @@ close(1); dup(2); } + +if (forkoutlogger || forkerrlogger) { + int pid; + if ((pid=fork())!=-1) { +if (pid) { + if (stdoutdes[0] != 0) { +close(stdoutdes[0]); +if (dup2(stdoutdes[1],1) == -1) { + fprintf(stderr,Unable to redirect stdout to pipe for syslog: %s\n, +strerror(errno)); +} + } + if (stderrdes[0] != 0) { +close(stderrdes[0]); +if (dup2(stderrdes[1],2) == -1) { + fprintf(stderr,Unable to redirect stderr to pipe for syslog: %s\n, +strerror(errno)); +} + } +} else { + exit (logger_child(stdoutdes[1],stderrdes[1],procname)); +} + } else { +fprintf(stderr, Unable to create logger child process: %s
[jira] Created: (DAEMON-98) make fails for jsvc on OS X
make fails for jsvc on OS X --- Key: DAEMON-98 URL: https://issues.apache.org/jira/browse/DAEMON-98 Project: Commons Daemon Issue Type: Bug Environment: OS X 10.4.9 Server on i386 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386 java version 1.5.0_07 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164) Java HotSpot(TM) Server VM (build 1.5.0_07-87, mixed mode) Reporter: Amos Hayes With both jsvc.tar.gz from tomcat 6.0.10 and the daemon-1.0.1.tar.gz sources from the commons project, when I try to configure/compile jsvc on OS X, I get the following: arthur:/usr/local/apache-tomcat-6.0.10/bin/daemon-1.0.1/src/native/unix root# ./configure *** Current host *** checking build system type... i386-apple-darwin8.9.1 checking host system type... i386-apple-darwin8.9.1 checking cached host system type... ok *** C-Language compilation tools *** checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib *** Host support *** checking C flags dependant on host system type... ok *** Java compilation tools *** checking for javac... /System/Library/Frameworks/JavaVM.framework/Home/bin/javac checking wether the Java compiler (/System/Library/Frameworks/JavaVM.framework/Home/bin/javac) works... yes checking for jar... /System/Library/Frameworks/JavaVM.framework/Home/bin/jar gcc flags added *** Writing output files *** configure: creating ./config.status config.status: creating Makefile config.status: creating Makedefs config.status: creating native/Makefile *** All done *** Now you can issue make arthur:/usr/local/apache-tomcat-6.0.10/bin/daemon-1.0.1/src/native/unix root# make make -C native all gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c arguments.c -o arguments.o arguments.c: In function 'arguments': arguments.c:251: warning: unused variable 'temp' gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c debug.c -o debug.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c dso-dlfcn.c -o dso-dlfcn.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c dso-dyld.c -o dso-dyld.o dso-dyld.c:54: error: conflicting types for 'dso_init' dso.h:24: error: previous declaration of 'dso_init' was here dso-dyld.c: In function 'dso_link': dso-dyld.c:69: warning: 'NSAddLibrary' is deprecated (declared at /usr/include/mach-o/dyld.h:224) dso-dyld.c: At top level: dso-dyld.c:76: error: conflicting types for 'dso_unlink' dso.h:26: error: previous declaration of 'dso_unlink' was here dso-dyld.c: In function 'dso_symbol': dso-dyld.c:109: warning: operation on 'x' may be undefined dso-dyld.c:113: warning: 'NSLookupAndBindSymbol' is deprecated (declared at /usr/include/mach-o/dyld.h:158) dso-dyld.c: At top level: dso-dyld.c:127: warning: function declaration isn't a prototype make[1]: *** [dso-dyld.o] Error 1 make: *** [native/all] Error 2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (DAEMON-98) make fails for jsvc on OS X
[ https://issues.apache.org/jira/browse/DAEMON-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Amos Hayes updated DAEMON-98: - Affects Version/s: 1.0 1.0.1 make fails for jsvc on OS X --- Key: DAEMON-98 URL: https://issues.apache.org/jira/browse/DAEMON-98 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0, 1.0.1 Environment: OS X 10.4.9 Server on i386 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386 java version 1.5.0_07 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164) Java HotSpot(TM) Server VM (build 1.5.0_07-87, mixed mode) Reporter: Amos Hayes With both jsvc.tar.gz from tomcat 6.0.10 and the daemon-1.0.1.tar.gz sources from the commons project, when I try to configure/compile jsvc on OS X, I get the following: arthur:/usr/local/apache-tomcat-6.0.10/bin/daemon-1.0.1/src/native/unix root# ./configure *** Current host *** checking build system type... i386-apple-darwin8.9.1 checking host system type... i386-apple-darwin8.9.1 checking cached host system type... ok *** C-Language compilation tools *** checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib *** Host support *** checking C flags dependant on host system type... ok *** Java compilation tools *** checking for javac... /System/Library/Frameworks/JavaVM.framework/Home/bin/javac checking wether the Java compiler (/System/Library/Frameworks/JavaVM.framework/Home/bin/javac) works... yes checking for jar... /System/Library/Frameworks/JavaVM.framework/Home/bin/jar gcc flags added *** Writing output files *** configure: creating ./config.status config.status: creating Makefile config.status: creating Makedefs config.status: creating native/Makefile *** All done *** Now you can issue make arthur:/usr/local/apache-tomcat-6.0.10/bin/daemon-1.0.1/src/native/unix root# make make -C native all gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c arguments.c -o arguments.o arguments.c: In function 'arguments': arguments.c:251: warning: unused variable 'temp' gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c debug.c -o debug.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c dso-dlfcn.c -o dso-dlfcn.o gcc -g -O2 -DOS_DARWIN -DDSO_DYLD -DCPU=\i386\ -I/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers -Wall -Wstrict-prototypes -c dso-dyld.c -o dso-dyld.o dso-dyld.c:54: error: conflicting types for 'dso_init' dso.h:24: error: previous declaration of 'dso_init' was here dso-dyld.c: In function 'dso_link': dso-dyld.c:69: warning: 'NSAddLibrary' is deprecated (declared at /usr/include/mach-o/dyld.h:224) dso-dyld.c: At top level: dso-dyld.c:76: error: conflicting types for 'dso_unlink' dso.h:26: error: previous declaration of 'dso_unlink' was here dso-dyld.c: In function 'dso_symbol': dso-dyld.c:109: warning: operation on 'x' may be undefined dso-dyld.c:113: warning: 'NSLookupAndBindSymbol' is deprecated (declared at /usr/include/mach-o/dyld.h:158) dso-dyld.c: At top level: dso-dyld.c:127: warning: function declaration isn't a prototype make[1]: *** [dso-dyld.o] Error 1 make: *** [native/all] Error 2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Closed: (DAEMON-80) [daemon] Syslog support for jsvc
[ https://issues.apache.org/jira/browse/DAEMON-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell closed DAEMON-80. --- Resolution: Won't Fix Reporter closed the Bugzilla variant as WONTFIX. [daemon] Syslog support for jsvc Key: DAEMON-80 URL: https://issues.apache.org/jira/browse/DAEMON-80 Project: Commons Daemon Issue Type: Improvement Affects Versions: 1.0.1 Environment: Operating System: Linux Platform: PC Reporter: Mike Polek Priority: Minor Currently, the only way to rotate the logs produced via jsvc is to restart the tomcat server. I've coded up support for using syslog through the local0.* channels. It probably needs a little work, but hopefully it can be incorporated into a future release. --- jsvc-unix.c 2005-05-17 06:13:39.0 -0700 +++ /tmp/jsvc-unix.c2005-11-08 14:18:18.0 -0800 @@ -25,6 +25,8 @@ #include stdio.h #include pwd.h #include grp.h +#include syslog.h +#include errno.h #ifdef OS_LINUX #include sys/prctl.h #include sys/syscall.h @@ -35,6 +37,7 @@ extern char **environ; pid_t controlled=0; /* the son process pid */ +pid_t logger=0; /* the logger process pid */ static bool stopping=false; static bool doreload=false; static void (*handler_int)(int)=NULL; @@ -562,10 +565,53 @@ return(freopen(outfile,mode,stream)); } +static int logger_child (int outpipe, int errpipe, char *procname) { + /* Read from file descriptors. Log to syslog. */ + fd_set rfds; + struct timeval tv; + int retval, n; + int bufsz = 1024; + char buf[bufsz]; + + if (outpipe errpipe) { +n = outpipe + 1; + } else { +n = errpipe + 1; + } + + openlog(procname, LOG_PID, LOG_LOCAL0); + + while (1) { +/* Watch two pipes for input */ +FD_ZERO(rfds); +FD_SET(outpipe, rfds); +FD_SET(errpipe, rfds); +/* Wait for a minute */ +tv.tv_sec = 60; +tv.tv_usec = 0; + +retval = select (n, rfds, NULL, NULL, tv); +if (retval == -1) + perror(select()); +else if (retval) { + if (FD_ISSET(outpipe, rfds)) { +read(outpipe, buf, bufsz); +syslog(LOG_INFO, %s, buf); + } + if (FD_ISSET(errpipe, rfds)) { +read(errpipe, buf, bufsz); +syslog(LOG_ERR, %s, buf); + } +} + } +} + /** * Redirect stdin, stdout, stderr. */ -static void set_output(char *outfile, char *errfile) { +static void set_output(char *outfile, char *errfile, char *procname) { +int stdoutdes[2] = {0,0}, stderrdes[2] = {0,0}, +forkoutlogger=0, forkerrlogger=0; freopen(/dev/null, r, stdin); log_debug(redirecting stdout to %s and stderr to %s,outfile,errfile); @@ -577,11 +623,28 @@ if(strcmp(outfile, 2) == 0 strcmp(errfile,1) == 0) { outfile=/dev/null; } -if(strcmp(outfile, 2) != 0) { + +if (strcmp(outfile, SYSLOG) == 0) { + /* Send stdout to syslog through a logger process */ + if (pipe(stdoutdes)) { +fprintf(stderr, Unable to create stdout pipe for syslog: %s\n, +strerror(errno)); + } else { +forkoutlogger=1; + } +} else if(strcmp(outfile, 2) != 0) { loc_freopen(outfile, a, stdout); } -if(strcmp(errfile,1) != 0) { +if (strcmp(errfile, SYSLOG) == 0) { + /* Send stderr to syslog through a logger process */ + if (pipe(stderrdes)) { +fprintf(stderr, Unable to create stderr pipe for syslog: %s\n, +strerror(errno)); + } else { +forkerrlogger=1; + } +} else if(strcmp(errfile,1) != 0) { loc_freopen(errfile, a, stderr); } else { close(2); @@ -591,6 +654,33 @@ close(1); dup(2); } + +if (forkoutlogger || forkerrlogger) { + int pid; + if ((pid=fork())!=-1) { +if (pid) { + if (stdoutdes[0] != 0) { +close(stdoutdes[0]); +if (dup2(stdoutdes[1],1) == -1) { + fprintf(stderr,Unable to redirect stdout to pipe for syslog: %s\n, +strerror(errno)); +} + } + if (stderrdes[0] != 0) { +close(stderrdes[0]); +if (dup2(stderrdes[1],2) == -1) { + fprintf(stderr,Unable to redirect stderr to pipe for syslog: %s\n, +strerror(errno)); +} + } +} else { + exit (logger_child(stdoutdes[1],stderrdes[1],procname)); +} + } else { +fprintf(stderr, Unable to create logger child process: %s\n, + strerror(errno)); + } +} } int main(int argc, char *argv[]) { @@ -678,7 +768,7 @@ #endif } -set_output(args-outfile, args-errfile); +set_output(args-outfile
[jira] Created: (DAEMON-95) jsvc log rotation support
jsvc log rotation support - Key: DAEMON-95 URL: https://issues.apache.org/jira/browse/DAEMON-95 Project: Commons Daemon Issue Type: Improvement Affects Versions: 1.0.1 Environment: Linux PC i686 Fedora Core 6 Reporter: Mike Polek Priority: Minor Currently, tomcat does not support proper log rotation for the standard output and error files produced when -outfile and -errfile are used at startup. The following patch 1) upgrades jsvc-unix.c to support proper log rotation using SIGUSR1 2) fixes a minor bug with arguments.c where the -procname argument can't be used because it was added after the check for the end of arguments 3) some minor warnings due to missing or incorrect function declarations. = cut here === diff -ru jsvc-src/native/arguments.c jsvc-src-logrotate/native/arguments.c --- jsvc-src/native/arguments.c 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/arguments.c 2007-02-27 12:00:37.0 -0800 @@ -186,16 +186,17 @@ } else if (strstr(argv[x],-ea)==argv[x]) { args-opts[args-onum++]=strdup(argv[x]); -} else if (strstr(argv[x],-)==argv[x]) { -log_error(Invalid option %s,argv[x]); -return(NULL); - } else if (strcmp(argv[x],-procname) == 0) { args-procname = optional(argc, argv, x++); if(args-procname == NULL) { log_error(Invalid process name specified); return (NULL); } + +} else if (strstr(argv[x],-)==argv[x]) { +log_error(Invalid option %s,argv[x]); +return(NULL); + } else { args-clas=strdup(argv[x]); break; @@ -248,7 +249,6 @@ } if (log_debug_flag==true) { -char *temp; log_debug(+-- DUMPING PARSED COMMAND LINE ARGUMENTS --); diff -ru jsvc-src/native/dso.h jsvc-src-logrotate/native/dso.h --- jsvc-src/native/dso.h 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/dso.h 2007-02-27 10:52:18.0 -0800 @@ -25,3 +25,4 @@ dso_handle dso_link(const char *pth); bool dso_unlink(dso_handle lib); void *dso_symbol(dso_handle lib, const char *nam); +char *dso_error(void); diff -ru jsvc-src/native/java.c jsvc-src-logrotate/native/java.c --- jsvc-src/native/java.c 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/java.c2007-02-27 10:53:55.0 -0800 @@ -45,7 +45,7 @@ else main_shutdown(); } /* Automaticly restart when the JVM crashes */ -static void java_abort123() +static void java_abort123(void) { exit(123); } diff -ru jsvc-src/native/jsvc-unix.c jsvc-src-logrotate/native/jsvc-unix.c --- jsvc-src/native/jsvc-unix.c 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/jsvc-unix.c 2007-02-27 14:34:01.0 -0800 @@ -39,7 +39,9 @@ static bool doreload=false; static void (*handler_int)(int)=NULL; static void (*handler_hup)(int)=NULL; +static void (*handler_usr1)(int)=NULL; static void (*handler_trm)(int)=NULL; +static void set_output(char *, char *, uid_t, gid_t); static void handler(int sig) { switch (sig) { @@ -74,6 +76,12 @@ break; } +case SIGUSR1: { +log_debug(Caught SIGUSR1: Reopening logs); +set_output(NULL,NULL,-1,-1); +break; +} + default: { log_debug(Caught unknown signal %d,sig); break; @@ -232,6 +240,9 @@ #endif static void controller(int sig) { switch (sig) { +case SIGUSR1: +log_debug(Reopening logs); +set_output(NULL,NULL,-1,-1); case SIGTERM: case SIGINT: case SIGHUP: @@ -514,6 +525,7 @@ /* Install signal handlers */ handler_hup=signal_set(SIGHUP,handler); +handler_usr1=signal_set(SIGUSR1,handler); handler_trm=signal_set(SIGTERM,handler); handler_int=signal_set(SIGINT,handler); controlled = getpid(); @@ -565,7 +577,25 @@ /** * Redirect stdin, stdout, stderr. */ -static void set_output(char *outfile, char *errfile) { +static void set_output(char *outfile_arg, char *errfile_arg, + uid_t uid_arg, gid_t gid_arg) { +static char *outfile=NULL; +static char *errfile=NULL; +static uid_t uid=0; +static gid_t gid=0; +if (outfile_arg!=NULL) { + outfile=(char *)realloc((void *)outfile, strlen(outfile_arg)+1); + strcpy(outfile,outfile_arg); +} +if (errfile_arg!=NULL) { + errfile=(char *)realloc((void *)errfile, strlen(errfile_arg)+1); + strcpy(errfile,errfile_arg); +} +if (uid_arg != -1) + uid = uid_arg; +if (gid_arg != -1) + gid = gid_arg; + freopen(/dev/null, r, stdin); log_debug(redirecting stdout to %s and stderr to %s,outfile,errfile); @@ -579,10 +609,12
[jira] Commented: (DAEMON-95) jsvc log rotation support
[ https://issues.apache.org/jira/browse/DAEMON-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476504 ] Mike Polek commented on DAEMON-95: -- Note that because the pid in the PIDFILE is the child pid and not the parent, and since both need to receive a signal in order to close and reopen their logs, the USR1 signal MUST be sent to the parent. kill -USR1 `pidof $PROCESSNAME` will send the signal to both, which works ok. Ideally the PIDFILE would contain the controller process's pid, since it forwards all signals to the child anyway. For a RedHat style script, you can use something like # Source function library. if [ -x /etc/init.d/functions ]; then . /etc/rc.d/init.d/functions else failure(){ echo '[FAILED]'; return 1; } success(){ echo '[ OK ]'; return 0; } fi PORT=8009 PROCESSNAME=$(basename $0) PROCESSNAME=${PROCESSNAME#[SK][[0-9][0-9]} shopt -s extglob PROCESSBASE=${PROCESSNAME%%_+([0-9])} shopt -u extglob if [[ $PROCESSBASE != $PROCESSNAME ]]; then PORT=${PROCESSNAME#${PROCESSBASE}_} fi PIDFILE=/var/run/$PROCESSNAME.pid RETVAL=0 # # Adapt the following lines to your configuration JAVA_HOME=/opt/java CATALINA_HOME=/opt/tomcat CATALINA_BASE=/opt/$PROCESSBASE TOMCAT_USER=apache TMP_DIR=$CATALINA_BASE/temp LOG_DIR=$CATALINA_BASE/logs OUTFILE=$LOG_DIR/catalina.$PORT.out ERRFILE=$LOG_DIR/catalina.$PORT.err #OUTFILE=SYSLOG1 #ERRFILE=SYSLOG2 JAVA_OPTS=-Xss2m -Xms32m -Xmx1024m CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar function start () { # # Start Tomcat # echo -n Starting $PROCESSBASE (Tomcat on port $PORT): if [ -e $PIDFILE ] kill -0 `cat $PIDFILE` /dev/null; then echo PID file found. Not starting daemon. return fi $CATALINA_HOME/bin/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Dcatalina.base=$CATALINA_BASE \ -Djava.io.tmpdir=$TMP_DIR \ -Dtomcat.server.port=$PORT \ -outfile $OUTFILE \ -errfile $ERRFILE \ -pidfile $PIDFILE \ -procname $PROCESSNAME \ $JAVA_OPTS \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ RETVAL=$? [ $RETVAL -eq 0 ] touch /var/lock/subsys/$PROCESSNAME [ $RETVAL -eq 0 ] success || failure echo } function stop () { # # Stop Tomcat # echo -n Shutting down $PROCESSNAME (Tomcat on port $PORT): if [ ! -f $PIDFILE ]; then echo echo -n no PID file found killproc $PROCESSNAME RETVAL=$? else PID=`cat $PIDFILE` kill $PID RETVAL=$? fi # Remove PID and LOCK files [ $RETVAL -eq 0 ] rm -f $PIDFILE /var/lock/subsys/$PROCESSNAME # Wait until process is really really dead, or pid file may hang around on restart let count=10 while kill -0 $PID /dev/null; do let count-- if (( count 1 )); then echo UNABLE TO KILL PROCESS WITH PID '$PID' kill -9 $PID /dev/null RETVAL=$? break fi sleep 1 done [ $RETVAL -eq 0 ] success || failure echo } case $1 in start) start ;; stop) stop ;; restart) stop start ;; condrestart) if [ -f $PIDFILE ]; then stop start fi ;; reload) if [ -f $PIDFILE ]; then PID=`cat $PIDFILE` kill -HUP $PID RETVAL=$? fi ;; logreopen) if [ -f $PIDFILE ]; then kill -USR1 `pidof $PROCESSNAME` RETVAL=$? fi ;; status) status $PROCESSNAME RETVAL=$? ;; *) echo Usage $(basename $0) {start|stop|restart|condrestart|reload|logreopen|status} ;; esac exit $RETVAL jsvc log rotation support - Key: DAEMON-95 URL: https://issues.apache.org/jira/browse/DAEMON-95 Project: Commons Daemon Issue Type: Improvement Affects Versions: 1.0.1 Environment: Linux PC i686 Fedora Core 6 Reporter: Mike Polek Priority: Minor Currently, tomcat does not support proper log rotation for the standard output and error files produced when -outfile and -errfile are used at startup. The following patch 1) upgrades jsvc-unix.c to support proper log rotation using SIGUSR1 2) fixes a minor bug with arguments.c where the -procname argument can't be used because it was added after the check for the end of arguments 3) some minor warnings due to missing or incorrect function declarations. = cut here === diff -ru jsvc-src/native/arguments.c jsvc-src-logrotate/native/arguments.c --- jsvc-src/native/arguments.c 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/arguments.c 2007-02-27 12:00:37.0
[jira] Commented: (DAEMON-95) jsvc log rotation support
[ https://issues.apache.org/jira/browse/DAEMON-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476507 ] Mike Polek commented on DAEMON-95: -- Patch is against release 1.0.1 If I need to create a patch against the current trunk or a particular branch, please let me know. jsvc log rotation support - Key: DAEMON-95 URL: https://issues.apache.org/jira/browse/DAEMON-95 Project: Commons Daemon Issue Type: Improvement Affects Versions: 1.0.1 Environment: Linux PC i686 Fedora Core 6 Reporter: Mike Polek Priority: Minor Currently, tomcat does not support proper log rotation for the standard output and error files produced when -outfile and -errfile are used at startup. The following patch 1) upgrades jsvc-unix.c to support proper log rotation using SIGUSR1 2) fixes a minor bug with arguments.c where the -procname argument can't be used because it was added after the check for the end of arguments 3) some minor warnings due to missing or incorrect function declarations. = cut here === diff -ru jsvc-src/native/arguments.c jsvc-src-logrotate/native/arguments.c --- jsvc-src/native/arguments.c 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/arguments.c 2007-02-27 12:00:37.0 -0800 @@ -186,16 +186,17 @@ } else if (strstr(argv[x],-ea)==argv[x]) { args-opts[args-onum++]=strdup(argv[x]); -} else if (strstr(argv[x],-)==argv[x]) { -log_error(Invalid option %s,argv[x]); -return(NULL); - } else if (strcmp(argv[x],-procname) == 0) { args-procname = optional(argc, argv, x++); if(args-procname == NULL) { log_error(Invalid process name specified); return (NULL); } + +} else if (strstr(argv[x],-)==argv[x]) { +log_error(Invalid option %s,argv[x]); +return(NULL); + } else { args-clas=strdup(argv[x]); break; @@ -248,7 +249,6 @@ } if (log_debug_flag==true) { -char *temp; log_debug(+-- DUMPING PARSED COMMAND LINE ARGUMENTS --); diff -ru jsvc-src/native/dso.h jsvc-src-logrotate/native/dso.h --- jsvc-src/native/dso.h 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/dso.h 2007-02-27 10:52:18.0 -0800 @@ -25,3 +25,4 @@ dso_handle dso_link(const char *pth); bool dso_unlink(dso_handle lib); void *dso_symbol(dso_handle lib, const char *nam); +char *dso_error(void); diff -ru jsvc-src/native/java.c jsvc-src-logrotate/native/java.c --- jsvc-src/native/java.c 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/java.c2007-02-27 10:53:55.0 -0800 @@ -45,7 +45,7 @@ else main_shutdown(); } /* Automaticly restart when the JVM crashes */ -static void java_abort123() +static void java_abort123(void) { exit(123); } diff -ru jsvc-src/native/jsvc-unix.c jsvc-src-logrotate/native/jsvc-unix.c --- jsvc-src/native/jsvc-unix.c 2005-05-17 06:13:39.0 -0700 +++ jsvc-src-logrotate/native/jsvc-unix.c 2007-02-27 14:34:01.0 -0800 @@ -39,7 +39,9 @@ static bool doreload=false; static void (*handler_int)(int)=NULL; static void (*handler_hup)(int)=NULL; +static void (*handler_usr1)(int)=NULL; static void (*handler_trm)(int)=NULL; +static void set_output(char *, char *, uid_t, gid_t); static void handler(int sig) { switch (sig) { @@ -74,6 +76,12 @@ break; } +case SIGUSR1: { +log_debug(Caught SIGUSR1: Reopening logs); +set_output(NULL,NULL,-1,-1); +break; +} + default: { log_debug(Caught unknown signal %d,sig); break; @@ -232,6 +240,9 @@ #endif static void controller(int sig) { switch (sig) { +case SIGUSR1: +log_debug(Reopening logs); +set_output(NULL,NULL,-1,-1); case SIGTERM: case SIGINT: case SIGHUP: @@ -514,6 +525,7 @@ /* Install signal handlers */ handler_hup=signal_set(SIGHUP,handler); +handler_usr1=signal_set(SIGUSR1,handler); handler_trm=signal_set(SIGTERM,handler); handler_int=signal_set(SIGINT,handler); controlled = getpid(); @@ -565,7 +577,25 @@ /** * Redirect stdin, stdout, stderr. */ -static void set_output(char *outfile, char *errfile) { +static void set_output(char *outfile_arg, char *errfile_arg, + uid_t uid_arg, gid_t gid_arg) { +static char *outfile=NULL; +static char *errfile=NULL; +static uid_t uid=0; +static gid_t gid=0; +if (outfile_arg!=NULL) { + outfile=(char *)realloc
[jira] Commented: (DAEMON-92) jsvc fails to execve() self on Linux
[ https://issues.apache.org/jira/browse/DAEMON-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472114 ] Petteri Räty commented on DAEMON-92: trunk already seems to be using /proc/self/exe so this can be closed or wait until the fix is in a release version /* execve needs a full path */ ret = readlink(/proc/self/exe,buf,sizeof(buf)-1); [EMAIL PROTECTED] /mnt/checkouts/commons-daemon-trunk $ grep /proc/self/ -r . ./src/native/unix/.svn/text-base/CHANGES.txt.svn-base: * fix 36030. (using /proc/self/exe and readlink). ./src/native/unix/native/.svn/text-base/jsvc-unix.c.svn-base:ret = readlink(/proc/self/exe,buf,sizeof(buf)-1); ./src/native/unix/native/jsvc-unix.c:ret = readlink(/proc/self/exe,buf,sizeof(buf)-1); ./src/native/unix/CHANGES.txt: * fix 36030. (using /proc/self/exe and readlink). jsvc fails to execve() self on Linux Key: DAEMON-92 URL: https://issues.apache.org/jira/browse/DAEMON-92 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0.1 Reporter: Simone Piunno Attachments: 1.0.1-execve-self.patch On Linux jsvc execve() itself. execve() requires an absolute path as the first argument therefore use of argv[0] only works when jsvc was invoked with a full path. Executing jsvc as relative path fails with jsvc error: Cannot execute JSVC executor process. On Linux the full path to self is very easy to find: /proc/self/exe I'm attaching a patch fixing this problem and falling back to argv[0] in case /proc is not mounted. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (DAEMON-92) jsvc fails to execve() self on Linux
[ https://issues.apache.org/jira/browse/DAEMON-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated DAEMON-92: Fix Version/s: (was: 1.0.1 Final) jsvc fails to execve() self on Linux Key: DAEMON-92 URL: https://issues.apache.org/jira/browse/DAEMON-92 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0.1 Reporter: Simone Piunno Attachments: 1.0.1-execve-self.patch On Linux jsvc execve() itself. execve() requires an absolute path as the first argument therefore use of argv[0] only works when jsvc was invoked with a full path. Executing jsvc as relative path fails with jsvc error: Cannot execute JSVC executor process. On Linux the full path to self is very easy to find: /proc/self/exe I'm attaching a patch fixing this problem and falling back to argv[0] in case /proc is not mounted. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (DAEMON-92) jsvc fails to execve() self on Linux
[ https://issues.apache.org/jira/browse/DAEMON-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467335 ] Simone Piunno commented on DAEMON-92: - I'm sorry you are right. The problem is not for relative vs absolute paths, but execve(2) not searching throught the $PATH. roentgen ~ # cat execve.c #include unistd.h #include stdio.h int main(int myargc, char **myargv) { char * const argv[] = { NULL }; char * const envp[] = { NULL }; if (myargc 1) { printf(One round more\n); execve(myargv[0], argv, envp); return 1; } printf(Hello, world\n); } roentgen ~ # make execve cc execve.c -o execve roentgen ~ # ./execve 1 One round more Hello, world roentgen ~ # mv execve /usr/bin roentgen ~ # which execve /usr/bin/execve roentgen ~ # execve Hello, world roentgen ~ # execve 1 One round more roentgen ~ # /usr/bin/execve 1 One round more Hello, world roentgen ~ # strace execve 1 execve(/usr/bin/execve, [execve, 1], [/* 53 vars */]) = 0 brk(0) = 0x501000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b73728cf000 uname({sys=Linux, node=roentgen, ...}) = 0 access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=182778, ...}) = 0 mmap(NULL, 182778, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b73728d close(3)= 0 open(/lib/libc.so.6, O_RDONLY)= 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\220\324..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1314256, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b73728fd000 mmap(NULL, 2330760, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b73729d mprotect(0x2b7372b0, 1048576, PROT_NONE) = 0 mmap(0x2b7372c0, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0x2b7372c0 mmap(0x2b7372c05000, 16520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b7372c05000 close(3)= 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b7372c0a000 arch_prctl(ARCH_SET_FS, 0x2b7372c0a6f0) = 0 mprotect(0x2b7372c0, 12288, PROT_READ) = 0 mprotect(0x2b73729ce000, 4096, PROT_READ) = 0 munmap(0x2b73728d, 182778) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b73728d write(1, One round more\n, 15One round more )= 15 execve(execve, [], [/* 0 vars */])= -1 ENOENT (No such file or directory) exit_group(1) = ? Process 29655 detached jsvc fails to execve() self on Linux Key: DAEMON-92 URL: https://issues.apache.org/jira/browse/DAEMON-92 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0.1 Final Reporter: Simone Piunno Fix For: 1.0.1 Final Attachments: 1.0.1-execve-self.patch On Linux jsvc execve() itself. execve() requires an absolute path as the first argument therefore use of argv[0] only works when jsvc was invoked with a full path. Executing jsvc as relative path fails with jsvc error: Cannot execute JSVC executor process. On Linux the full path to self is very easy to find: /proc/self/exe I'm attaching a patch fixing this problem and falling back to argv[0] in case /proc is not mounted. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Created: (DAEMON-93) jsvc should be runnable as non root.
jsvc should be runnable as non root. Key: DAEMON-93 URL: https://issues.apache.org/jira/browse/DAEMON-93 Project: Commons Daemon Issue Type: Improvement Environment: Linux Reporter: Simone Piunno On Linux jsvc only works as root. Despite the discussion on issue 24, loading the kernel capability module doens't help. [EMAIL PROTECTED] ~ $ uname -a Linux roentgen 2.6.19-gentoo-r4 #1 PREEMPT Sun Jan 14 13:01:55 CET 2007 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux [EMAIL PROTECTED] ~ $ lsmod|grep capa capability 4296 0 commoncap 5952 1 capability in the errfile I get: 14/01/2007 00:42:58 31709 jsvc.exec error: syscall failed in set_caps 14/01/2007 00:42:58 31709 jsvc.exec error: set_caps(CAPS) failed 14/01/2007 00:42:58 31708 jsvc.exec error: Service exit with a return value of 4 I've been told documentation says: Jsvc is a daemon process so it should be started as root and the -user parameter allows to downgrade to an unprivilegded user. but I see no reason why jsvc or any other daemon process shouldn't be runnable as non root therefore I'm creating this issue as a request for improvement. I'm also attaching I'm attaching a patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (DAEMON-93) jsvc should be runnable as non root.
[ https://issues.apache.org/jira/browse/DAEMON-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Piunno updated DAEMON-93: Attachment: 1.0.1-capabilities.patch jsvc should be runnable as non root. Key: DAEMON-93 URL: https://issues.apache.org/jira/browse/DAEMON-93 Project: Commons Daemon Issue Type: Improvement Environment: Linux Reporter: Simone Piunno Attachments: 1.0.1-capabilities.patch On Linux jsvc only works as root. Despite the discussion on issue 24, loading the kernel capability module doens't help. [EMAIL PROTECTED] ~ $ uname -a Linux roentgen 2.6.19-gentoo-r4 #1 PREEMPT Sun Jan 14 13:01:55 CET 2007 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux [EMAIL PROTECTED] ~ $ lsmod|grep capa capability 4296 0 commoncap 5952 1 capability in the errfile I get: 14/01/2007 00:42:58 31709 jsvc.exec error: syscall failed in set_caps 14/01/2007 00:42:58 31709 jsvc.exec error: set_caps(CAPS) failed 14/01/2007 00:42:58 31708 jsvc.exec error: Service exit with a return value of 4 I've been told documentation says: Jsvc is a daemon process so it should be started as root and the -user parameter allows to downgrade to an unprivilegded user. but I see no reason why jsvc or any other daemon process shouldn't be runnable as non root therefore I'm creating this issue as a request for improvement. I'm also attaching I'm attaching a patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (DAEMON-24) [daemon] jsvc assumes posix capabilities loaded
[ https://issues.apache.org/jira/browse/DAEMON-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467413 ] Simone Piunno commented on DAEMON-24: - Created a new issue and copied the patch there: https://issues.apache.org/jira/browse/DAEMON-93 [daemon] jsvc assumes posix capabilities loaded --- Key: DAEMON-24 URL: https://issues.apache.org/jira/browse/DAEMON-24 Project: Commons Daemon Issue Type: Bug Environment: Operating System: Linux Platform: PC Reporter: Michael Thome Attachments: 1.0.1-capabilities.patch later versions of linux (e.g. 2.6.x) may have capability management configured as a module rather than compiled in. A LKML discussion is ongoing as to if this is a good idea or not, but the upshot is that jsvc will fail on capset if the kernel doesn't have the module loaded. I'd suggest a note in the release notes and/or linux faq section discussing the issue. I'd be happy to propose a doc patch -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (DAEMON-92) jsvc fails to execve() self on Linux
[ https://issues.apache.org/jira/browse/DAEMON-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467164 ] Petteri Räty commented on DAEMON-92: execve works just fine with relative paths here: [EMAIL PROTECTED] ~/c-koodaus $ ./exec Hello World! [EMAIL PROTECTED] ~/c-koodaus $ cat exec.c #include unistd.h int main(int nArgs, char **ppArgs) { char *const argv[] = {NULL}; char *const envp[] = {NULL}; execve(./hello, argv, envp); } jsvc fails to execve() self on Linux Key: DAEMON-92 URL: https://issues.apache.org/jira/browse/DAEMON-92 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0.1 Final Reporter: Simone Piunno Fix For: 1.0.1 Final Attachments: 1.0.1-execve-self.patch On Linux jsvc execve() itself. execve() requires an absolute path as the first argument therefore use of argv[0] only works when jsvc was invoked with a full path. Executing jsvc as relative path fails with jsvc error: Cannot execute JSVC executor process. On Linux the full path to self is very easy to find: /proc/self/exe I'm attaching a patch fixing this problem and falling back to argv[0] in case /proc is not mounted. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (DAEMON-24) [daemon] jsvc assumes posix capabilities loaded
[ https://issues.apache.org/jira/browse/DAEMON-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466233 ] Simone Piunno commented on DAEMON-24: - On my system it doesn't work despite the capability module being loaded. [EMAIL PROTECTED] ~ $ uname -a Linux roentgen 2.6.19-gentoo-r4 #1 PREEMPT Sun Jan 14 13:01:55 CET 2007 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux [EMAIL PROTECTED] ~ $ lsmod|grep capa capability 4296 0 commoncap 5952 1 capability in the errfile I get: 14/01/2007 00:42:58 31709 jsvc.exec error: syscall failed in set_caps 14/01/2007 00:42:58 31709 jsvc.exec error: set_caps(CAPS) failed 14/01/2007 00:42:58 31708 jsvc.exec error: Service exit with a return value of 4 I'm attaching a patch [daemon] jsvc assumes posix capabilities loaded --- Key: DAEMON-24 URL: https://issues.apache.org/jira/browse/DAEMON-24 Project: Commons Daemon Issue Type: Bug Environment: Operating System: Linux Platform: PC Reporter: Michael Thome later versions of linux (e.g. 2.6.x) may have capability management configured as a module rather than compiled in. A LKML discussion is ongoing as to if this is a good idea or not, but the upshot is that jsvc will fail on capset if the kernel doesn't have the module loaded. I'd suggest a note in the release notes and/or linux faq section discussing the issue. I'd be happy to propose a doc patch -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (DAEMON-24) [daemon] jsvc assumes posix capabilities loaded
[ https://issues.apache.org/jira/browse/DAEMON-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Piunno updated DAEMON-24: Attachment: 1.0.1-capabilities.patch [daemon] jsvc assumes posix capabilities loaded --- Key: DAEMON-24 URL: https://issues.apache.org/jira/browse/DAEMON-24 Project: Commons Daemon Issue Type: Bug Environment: Operating System: Linux Platform: PC Reporter: Michael Thome Attachments: 1.0.1-capabilities.patch later versions of linux (e.g. 2.6.x) may have capability management configured as a module rather than compiled in. A LKML discussion is ongoing as to if this is a good idea or not, but the upshot is that jsvc will fail on capset if the kernel doesn't have the module loaded. I'd suggest a note in the release notes and/or linux faq section discussing the issue. I'd be happy to propose a doc patch -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Created: (DAEMON-92) jsvc fails to execve() self on Linux
jsvc fails to execve() self on Linux Key: DAEMON-92 URL: https://issues.apache.org/jira/browse/DAEMON-92 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0.1 Final Reporter: Simone Piunno Fix For: 1.0.1 Final On Linux jsvc execve() itself. execve() requires an absolute path as the first argument therefore use of argv[0] only works when jsvc was invoked with a full path. Executing jsvc as relative path fails with jsvc error: Cannot execute JSVC executor process. On Linux the full path to self is very easy to find: /proc/self/exe I'm attaching a patch fixing this problem and falling back to argv[0] in case /proc is not mounted. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (DAEMON-92) jsvc fails to execve() self on Linux
[ https://issues.apache.org/jira/browse/DAEMON-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Piunno updated DAEMON-92: Attachment: 1.0.1-execve-self.patch jsvc fails to execve() self on Linux Key: DAEMON-92 URL: https://issues.apache.org/jira/browse/DAEMON-92 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0.1 Final Reporter: Simone Piunno Fix For: 1.0.1 Final Attachments: 1.0.1-execve-self.patch On Linux jsvc execve() itself. execve() requires an absolute path as the first argument therefore use of argv[0] only works when jsvc was invoked with a full path. Executing jsvc as relative path fails with jsvc error: Cannot execute JSVC executor process. On Linux the full path to self is very easy to find: /proc/self/exe I'm attaching a patch fixing this problem and falling back to argv[0] in case /proc is not mounted. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (DAEMON-45) [daemon] jsvc links to 32-bit JVM when compiled for (64-bit) sparcv9
[ https://issues.apache.org/jira/browse/DAEMON-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463146 ] Renaud Waldura commented on DAEMON-45: -- Let me restate the problem and maybe broaden the scope of this bug: there doesn't appear to be a way to run the 64-bit VM with jsvc 1.0.1. (The 64-bit VM is needed for heaps = 4GB.) The java switch -d64 is not recognized. I am building from the source included in the binary distribution of Tomcat 5.5.20. I fixed it my way by doing the following. I ran configure and edited the generated Makedefs file. I set CPU to sparcv9 and added -m64 to CFLAGS and LDFLAGS. This gets me an executable that is 64-bit and links to the 64-bit VM always. [daemon] jsvc links to 32-bit JVM when compiled for (64-bit) sparcv9 Key: DAEMON-45 URL: https://issues.apache.org/jira/browse/DAEMON-45 Project: Commons Daemon Issue Type: Bug Environment: Operating System: Solaris Platform: Sun Reporter: Jeff Carroll Attachments: ls.out This is a report on misbehavior of the search algorithm in native/location.c. I am building from the source included in the binary distribution of Tomcat 5.5.16. uname -a reports: SunOS iempsoa1 5.10 Generic_118822-27 sun4u sparc SUNW,Sun-Fire-880 config.guess reports sparc-sun-solaris2.10. ls -laR runs to 4k lines of text, so I will attach the file separately if I can figure out how. I'm not sure it's relevant, though. configure is identifying $host_cpu as sparc, and thus location.c finds the jvm.cfg for the 32-bit JVM, terminating with the messages 18/04/2006 15:35:12 7724 jsvc64 debug: Using default JVM in /usr/java/jre/lib/sp arc/client/libjvm.so 18/04/2006 15:35:12 7724 jsvc64 debug: Attemtping to load library /usr/java/jre/ lib/sparc/client/libjvm.so 18/04/2006 15:35:12 7724 jsvc64 error: Cannot dynamically link to /usr/java/jre/ lib/sparc/client/libjvm.so 18/04/2006 15:35:12 7724 jsvc64 error: ld.so.1: jsvc64: fatal: /usr/java/jre/lib /sparc/client/libjvm.so: wrong ELF class: ELFCLASS32 I intend to fix the problem for my purposes by hacking location_jvm_cfg[], but I know that's not a good solution for the general case. Everything works flawlessly on the 32-bit JVM. Given that, and given the disclaimers all over jvm.cfg, I don't know whether you'll consider this worth fixing or not. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
permissions downgrading in commons-daemon jsvc
Hi, The child() function in jsvc-unix.c does not seem to behave consistently across platforms: - on Linux, the capabilities and uid are set (in linuxset_user_group()) BEFORE java_init() and java_load() are called - on other platforms, set_user_group() is called AFTER java_init() and java_load() I see that the logic has worked that way since jsvc came over from Tomcat. A comment in jsvc-unix.c says that setuid()/setgid() only apply the current thread so we must do it now, but I don't understand that. Does anyone remember the rationale for this inconsistency? Does it still need to work that way? My specific problem is that, in my Daemon.init() method, I'm trying to read files that are owned and readable only by the user invoking jsvc (root, in my case), but it can't read those files after linuxset_user_group() is called. (One workaround would be to add CAP_DAC_OVERRIDE to CAPS and CAPSMIN.) Thanks, Travis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: permissions downgrading in commons-daemon jsvc
Travis McLeskey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, The child() function in jsvc-unix.c does not seem to behave consistently across platforms: - on Linux, the capabilities and uid are set (in linuxset_user_group()) BEFORE java_init() and java_load() are called - on other platforms, set_user_group() is called AFTER java_init() and java_load() I see that the logic has worked that way since jsvc came over from Tomcat. A comment in jsvc-unix.c says that setuid()/setgid() only apply the current thread so we must do it now, but I don't understand that. Does anyone remember the rationale for this inconsistency? Does it still need to work that way? I don't have a Linux box to play with right now, so I don't know. Maybe with the newer kernal versions it isn't necessary anymore. The problem was a security hole where on Linux other threads in the JVM (e.g. finalizer) would retain root privileges. I've never liked this peice of code, so would happily get rid if it. But I'm not in a position to confirm that the newer Linux kernals have joined the rest of the *nix world :). My specific problem is that, in my Daemon.init() method, I'm trying to read files that are owned and readable only by the user invoking jsvc (root, in my case), but it can't read those files after linuxset_user_group() is called. (One workaround would be to add CAP_DAC_OVERRIDE to CAPS and CAPSMIN.) Thanks, Travis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Daemon] Patch to fix JSVC on Mac-OS X
Hi, Attached is a patch to fix compilation of the dynamic library glue in JSVC. This has been tested on Mac OS X 10.4.8, and to ensure I didn't break regular Unix support I also tested on CentOS 3. I have also attached a patch that tidies up the replace code that replaces occurrences of one string with another one. This simplifies the code and avoids a possible buffer overrun. I also have a few other changes, including some consistency fixes to the help text and command line options. I will submit patches for them when I have tested on both Mac OS X and Linux. Regards, Chris Index: src/native/unix/native/dso.h === --- src/native/unix/native/dso.h(revision 467118) +++ src/native/unix/native/dso.h(working copy) @@ -1,12 +1,12 @@ /* Copyright 2001-2004 The Apache Software Foundation. - + Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,14 +14,16 @@ limitations under the License. */ /* @version $Id$ */ -#include jsvc.h -/** - * A library handle represents a unique pointer to its location in memory. - */ +#ifndef JSVC_DSO_H +#define JSVC_DSO_H + typedef void *dso_handle; -bool dso_init(void); -dso_handle dso_link(const char *pth); -bool dso_unlink(dso_handle lib); -void *dso_symbol(dso_handle lib, const char *nam); +int dso_init(void); +void *dso_link(const char *); +int dso_unlink(void *); +void *dso_symbol(void *, const char *); +const char *dso_error(void); + +#endif Index: src/native/unix/native/dso-dlfcn.c === --- src/native/unix/native/dso-dlfcn.c (revision 467118) +++ src/native/unix/native/dso-dlfcn.c (working copy) @@ -1,55 +1,67 @@ /* Copyright 2001-2004 The Apache Software Foundation. - + Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + /* @version $Id$ */ -#include jsvc.h #ifdef DSO_DLFCN #include dlfcn.h +#include dso.h +#include debug.h + #ifdef OS_LINUX -bool ld_library_path_set=false; -#endif /* ifdef OS_LINUX */ +int ld_library_path_set=false; +#endif /* Initialize all DSO stuff */ -bool dso_init() { -return(true); +int +dso_init(void) +{ +return 1; } /* Attempt to link a library from a specified filename */ -dso_handle dso_link(const char *path) { -log_debug(Attemtping to load library %s,path); +void * +dso_link(const char *path) +{ +log_debug(Attempting to load library %s, path); return((void *)dlopen(path,RTLD_GLOBAL|RTLD_NOW)); } /* Attempt to unload a library */ -bool dso_unlink(dso_handle libr) { -if (dlclose(libr)==0) return(true); -else return(false); +int +dso_unlink(void *libr) +{ +return dlclose(libr) == 0 ? 1 : 0; } -/* Get the address for a specifed symbol */ -void *dso_symbol(dso_handle hdl, const char *nam) { -return(dlsym(hdl,nam)); +/* Get the address for a symbol */ +void * +dso_symbol(void *hdl, const char *name) +{ +return dlsym(hdl, name); } /* Return the error message from dlopen */ -char *dso_error() { -return(dlerror()); +const char * +dso_error(void) +{ +return dlerror(); } -#endif /* ifdef DSO_DLFCN */ +#endif /* DSO_DLFCN */ Index: src/native/unix/native/dso-dyld.c === --- src/native/unix/native/dso-dyld.c (revision 467118) +++ src/native/unix/native/dso-dyld.c (working copy) @@ -1,12 +1,12 @@ /* Copyright 2001-2004 The Apache Software Foundation. - + Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,126 +14,161 @@ limitations under the License. */ /* @version $Id$ */ -#include jsvc.h #ifdef DSO_DYLD
DO NOT REPLY [Bug 38633] - [daemon] When changing UID in jsvc on fedora core 4, warning occurs: find_vma failed
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38633. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38633 --- Additional Comments From [EMAIL PROTECTED] 2006-09-12 15:56 --- Jakarta Commons has moved its issue tracking from bugzilla to JIRA. This issue is now located at: http://issues.apache.org/jira/browse/DAEMON-16 Please make any comments you might have in JIRA instead. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38633] - [daemon] When changing UID in jsvc on fedora core 4, warning occurs: find_vma failed
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38633. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38633 --- Additional Comments From [EMAIL PROTECTED] 2006-09-11 07:27 --- Exactly the same problem with Fedora Core 5, Tomcat 5.5.17 (and /proc mounted). -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [daemon] help getting jsvc up and running on sles9 on ibm pseries (power5)
anyone? please :-) /Christian Andersson Christian Andersson wrote: Hi there, I have a small problem that I'. hoping that you can help me solve. I want to be able to run tomcat on a server that we have available at a hosting firm. I can get tomcat up and running on it witohut problem, as long as I don't try to use jsvc.. and I need jsvc sicne I don't want to run tomat as root, or manually start tomcat whenever there is a restart of the server, etc.. I've tried compiling the jsvc that comes with tomcat, but no luck, so I downloaded deamons 1.0.1 and tried to get that compiling, and still no luck, after searching/following different hints that I found on the net (I'll ge over those later) I do get jsvc compiled, but I still cannot run it, because it looks like jsvc is compiled as a 32 bit binary and the ibm-java that I have is a 64 bit binary. anyway here is a list of what I've done (not much) after downloading and unpacking jsvc I went into daemon-1.0.1/src/native/unix and did a ./configure --with-java=/opt/ibm/java2-ppc64-50 and got the following result.. -- *** Current host *** checking build system type... ./support/config.guess: unable to guess system type This script, last modified 2001-04-20, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from ftp://ftp.gnu.org/pub/gnu/config/ If the version you run (./support/config.guess) is already up to date, please send the following data and any information you think might be pertinent to [EMAIL PROTECTED] in order to provide the needed information to handle your system. config.guess timestamp = 2001-04-20 uname -m = ppc64 uname -r = 2.6.5-7.252-pseries64 uname -s = Linux uname -v = #1 SMP Tue Feb 14 11:11:04 UTC 2006 /usr/bin/uname -p = /bin/uname -X = hostinfo = /bin/universe = /usr/bin/arch -k = /bin/arch = ppc64 /usr/bin/oslevel = /usr/convex/getsysinfo = UNAME_MACHINE = ppc64 UNAME_RELEASE = 2.6.5-7.252-pseries64 UNAME_SYSTEM = Linux UNAME_VERSION = #1 SMP Tue Feb 14 11:11:04 UTC 2006 configure: error: cannot guess build type; you must specify one -- after downloading the newest config.guess from http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess (the above specified link leads to this file) and replacing the existing one in daemon-1.0.1/src/native/unix/support and once more execute configure I get the following... -- *** Current host *** checking build system type... powerpc64-unknown-linux-gnu checking host system type... powerpc64-unknown-linux-gnu checking cached host system type... ok *** C-Language compilation tools *** checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib *** Host support *** checking C flags dependant on host system type... failed configure: error: Unsupported CPU architecture powerpc64 -- following information on the net it was suggested that I change the configure script so that it accepts powerpc* instead of powerpc that is from -- ... case $host_cpu in powerpc) CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; ... -- to -- ... case $host_cpu in powerpc*) CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; ... -- the result: -- ... *** All done *** Now you can issue make -- make also succedes, but when running jsvc using the script that comes with apache tomcat (modified to suite my needs ofcourse) no jsvc is running, and in the error log I find the following... -- 12/06/2006 11:58:15 19502 jsvc.exec error: Cannot dynamically link to /opt/ibm/java2-ppc64-50/jre/bin/classic /libjvm.so 12/06/2006 11:58:15 19502 jsvc.exec error: /opt/ibm/java2-ppc64-50/jre/bin/classic/libjvm.so: cannot open sha red
[daemon] help getting jsvc up and running on sles9 on ibm pseries (power5)
Hi there, I have a small problem that I'. hoping that you can help me solve. I want to be able to run tomcat on a server that we have available at a hosting firm. I can get tomcat up and running on it witohut problem, as long as I don't try to use jsvc.. and I need jsvc sicne I don't want to run tomat as root, or manually start tomcat whenever there is a restart of the server, etc.. I've tried compiling the jsvc that comes with tomcat, but no luck, so I downloaded deamons 1.0.1 and tried to get that compiling, and still no luck, after searching/following different hints that I found on the net (I'll ge over those later) I do get jsvc compiled, but I still cannot run it, because it looks like jsvc is compiled as a 32 bit binary and the ibm-java that I have is a 64 bit binary. anyway here is a list of what I've done (not much) after downloading and unpacking jsvc I went into daemon-1.0.1/src/native/unix and did a ./configure --with-java=/opt/ibm/java2-ppc64-50 and got the following result.. -- *** Current host *** checking build system type... ./support/config.guess: unable to guess system type This script, last modified 2001-04-20, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from ftp://ftp.gnu.org/pub/gnu/config/ If the version you run (./support/config.guess) is already up to date, please send the following data and any information you think might be pertinent to [EMAIL PROTECTED] in order to provide the needed information to handle your system. config.guess timestamp = 2001-04-20 uname -m = ppc64 uname -r = 2.6.5-7.252-pseries64 uname -s = Linux uname -v = #1 SMP Tue Feb 14 11:11:04 UTC 2006 /usr/bin/uname -p = /bin/uname -X = hostinfo = /bin/universe = /usr/bin/arch -k = /bin/arch = ppc64 /usr/bin/oslevel = /usr/convex/getsysinfo = UNAME_MACHINE = ppc64 UNAME_RELEASE = 2.6.5-7.252-pseries64 UNAME_SYSTEM = Linux UNAME_VERSION = #1 SMP Tue Feb 14 11:11:04 UTC 2006 configure: error: cannot guess build type; you must specify one -- after downloading the newest config.guess from http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess (the above specified link leads to this file) and replacing the existing one in daemon-1.0.1/src/native/unix/support and once more execute configure I get the following... -- *** Current host *** checking build system type... powerpc64-unknown-linux-gnu checking host system type... powerpc64-unknown-linux-gnu checking cached host system type... ok *** C-Language compilation tools *** checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for ranlib... ranlib *** Host support *** checking C flags dependant on host system type... failed configure: error: Unsupported CPU architecture powerpc64 -- following information on the net it was suggested that I change the configure script so that it accepts powerpc* instead of powerpc that is from -- ... case $host_cpu in powerpc) CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; ... -- to -- ... case $host_cpu in powerpc*) CFLAGS=$CFLAGS -DCPU=\\\$host_cpu\\\ ;; ... -- the result: -- ... *** All done *** Now you can issue make -- make also succedes, but when running jsvc using the script that comes with apache tomcat (modified to suite my needs ofcourse) no jsvc is running, and in the error log I find the following... -- 12/06/2006 11:58:15 19502 jsvc.exec error: Cannot dynamically link to /opt/ibm/java2-ppc64-50/jre/bin/classic /libjvm.so 12/06/2006 11:58:15 19502 jsvc.exec error: /opt/ibm/java2-ppc64-50/jre/bin/classic/libjvm.so: cannot open sha red object file: No such file or directory 12/06/2006 11:58:15 19501 jsvc.exec error: Service exit with a return value of 1 -- and in /opt/ibm
svn commit: r397516 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Thu Apr 27 03:36:27 2006 New Revision: 397516 URL: http://svn.apache.org/viewcvs?rev=397516view=rev Log: Also restart when the JVM process is signaled (abort is no always called). Don't change user when we are already the user. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=397516r1=397515r2=397516view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Thu Apr 27 03:36:27 2006 @@ -132,6 +132,10 @@ } else log_debug(Cannot set supplement group list for user '%s',user); } + if (getuid() == uid) { +log_debug(No need to change user to '%s'!,user); +return(0); + } if (setuid(uid)!=0) { log_error(Cannot set user id for user '%s',user); return(-1); @@ -794,7 +798,17 @@ /* Otherwise we don't rerun it */ log_error(Service exit with a return value of %d,status); return(1); + } else { +if (WIFSIGNALED(status)) { +log_error(Service killed by signal %d,WTERMSIG(status)); +/* prevent looping */ +if (laststart+60time(NULL)) { + log_debug(Waiting 60 s to prevent looping); + sleep(60); +} +continue; +} log_error(Service did not exit cleanly,status); return(1); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38633] - [daemon] When changing UID in jsvc on fedora core 4, warning occurs: find_vma failed
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38633. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38633 --- Additional Comments From [EMAIL PROTECTED] 2006-04-26 08:19 --- The /proc system is mounted. It works when running as root, the error occurs when you ask jsvc to change user to i.e. tomcat. So the problem is connected to permissions in some way. I can run the jsvc fine though, if I just choose to ignore that warning... -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38633] - [daemon] When changing UID in jsvc on fedora core 4, warning occurs: find_vma failed
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38633. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38633 --- Additional Comments From [EMAIL PROTECTED] 2006-04-25 20:56 --- Could check that /proc is mounted? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38992] - [daemon] JSVC does not support all the standard java 5.0 launcher options
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38992. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38992 --- Additional Comments From [EMAIL PROTECTED] 2006-04-25 21:51 --- It is fixed in trunk please test. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 39352] New: - jsvc links to 32-bit JVM when compiled for (64-bit) sparcv9
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39352. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39352 Summary: jsvc links to 32-bit JVM when compiled for (64-bit) sparcv9 Product: Commons Version: unspecified Platform: Sun OS/Version: Solaris Status: NEW Severity: normal Priority: P2 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] This is a report on misbehavior of the search algorithm in native/location.c. I am building from the source included in the binary distribution of Tomcat 5.5.16. uname -a reports: SunOS iempsoa1 5.10 Generic_118822-27 sun4u sparc SUNW,Sun-Fire-880 config.guess reports sparc-sun-solaris2.10. ls -laR runs to 4k lines of text, so I will attach the file separately if I can figure out how. I'm not sure it's relevant, though. configure is identifying $host_cpu as sparc, and thus location.c finds the jvm.cfg for the 32-bit JVM, terminating with the messages 18/04/2006 15:35:12 7724 jsvc64 debug: Using default JVM in /usr/java/jre/lib/sp arc/client/libjvm.so 18/04/2006 15:35:12 7724 jsvc64 debug: Attemtping to load library /usr/java/jre/ lib/sparc/client/libjvm.so 18/04/2006 15:35:12 7724 jsvc64 error: Cannot dynamically link to /usr/java/jre/ lib/sparc/client/libjvm.so 18/04/2006 15:35:12 7724 jsvc64 error: ld.so.1: jsvc64: fatal: /usr/java/jre/lib /sparc/client/libjvm.so: wrong ELF class: ELFCLASS32 I intend to fix the problem for my purposes by hacking location_jvm_cfg[], but I know that's not a good solution for the general case. Everything works flawlessly on the 32-bit JVM. Given that, and given the disclaimers all over jvm.cfg, I don't know whether you'll consider this worth fixing or not. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 39352] - jsvc links to 32-bit JVM when compiled for (64-bit) sparcv9
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39352. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39352 --- Additional Comments From [EMAIL PROTECTED] 2006-04-19 14:59 --- Created an attachment (id=18135) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=18135action=view) output from ls -laR on the machine in question -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 39352] - jsvc links to 32-bit JVM when compiled for (64-bit) sparcv9
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39352. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39352 --- Additional Comments From [EMAIL PROTECTED] 2006-04-19 16:09 --- Here's the patch I made to fix the problem on my system: [EMAIL PROTECTED] native]$ diff location.c.old location.c 52a53 $JAVA_HOME/jre/lib/sparcv9/jvm.cfg, /* 64-bit JRE */ 114a116 $JAVA_HOME/jre/lib/sparcv9/server/libjvm.so, /* sparcv9 JRE */ I am NOT suggesting this as a patch to be applied to the distribution. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 39352] - [daemon] jsvc links to 32-bit JVM when compiled for (64-bit) sparcv9
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39352. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39352 [EMAIL PROTECTED] changed: What|Removed |Added Summary|jsvc links to 32-bit JVM|[daemon] jsvc links to 32- |when compiled for (64-bit) |bit JVM when compiled for |sparcv9 |(64-bit) sparcv9 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38992] - [daemon] JSVC does not support all the standard java 5.0 launcher options
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38992. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38992 [EMAIL PROTECTED] changed: What|Removed |Added Severity|normal |enhancement -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r388844 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Sat Mar 25 14:09:50 2006 New Revision: 388844 URL: http://svn.apache.org/viewcvs?rev=388844view=rev Log: Start fixing PR 36050 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=388844r1=388843r2=388844view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Sat Mar 25 14:09:50 2006 @@ -33,6 +33,12 @@ #endif #include time.h +#ifdef OS_CYGWIN +#include sys/fcntl.h +#define F_ULOCK 0 /* Unlock a previously locked region */ +#define F_LOCK 1 /* Lock a region for exclusive use */ +#endif + extern char **environ; static mode_t envmask; /* mask to create the files */ @@ -43,6 +49,33 @@ static void (*handler_int)(int)=NULL; static void (*handler_hup)(int)=NULL; static void (*handler_trm)(int)=NULL; + +#ifdef OS_CYGWIN +/* + * File locking routine + */ +static int lockf(int fildes, int function, off_t size) +{ +struct flock buf; + +switch (function) { +case F_LOCK: +buf.l_type = F_WRLCK; +break; +case F_ULOCK: +buf.l_type = F_UNLCK; +break; +default: +return -1; +} +buf.l_whence = 0; +buf.l_start = 0; +buf.l_len = size; + +return fcntl(fildes, F_SETLK, buf); +} + +#endif static void handler(int sig) { switch (sig) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38992] New: - JSVC does not support all the standard java 5.0 launcher options
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38992. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38992 Summary: JSVC does not support all the standard java 5.0 launcher options Product: Commons Version: 1.0.1 Final Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P1 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] JSVC does not support all the standard java 5.0 launcher options. In particular, the following options are not supported: -agentlib:libname[=options] -agentpath:pathname[=options] -javaagent:jarpath[=options] I am using Tomcat 5.5.* which I start using jsvc. I am also using AspectJ 5.0. I'd like to able to specify the -javaagent:pathto/aspectjweaver.jar option to the JVM to use the AspectJ load-time weaving. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38992] - [daemon] JSVC does not support all the standard java 5.0 launcher options
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38992. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38992 [EMAIL PROTECTED] changed: What|Removed |Added Summary|JSVC does not support all |[daemon] JSVC does not |the standard java 5.0 |support all the standard |launcher options|java 5.0 launcher options -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38633] New: - When changing UID in jsvc on fedora core 4, warning occurs: find_vma failed
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38633. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38633 Summary: When changing UID in jsvc on fedora core 4, warning occurs: find_vma failed Product: Commons Version: unspecified Platform: PC OS/Version: Linux Status: NEW Keywords: ErrorMessage Severity: normal Priority: P2 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Greetings List. I have searched a lot for information about this Warning I am getting when I start up tomcat by using jsvc on my Fedora Core 4 platform, but I have not been able to find anything that helped me solve my problem. So now I am reporting it here. I am using the Tomcat5.sh script supplied in the native folder. I have tried 2 different scenarios: 1. running jsvc with -user tomcat 2. ommitting the -user option entirely (running it as root) In scenario 1 I get the warning: Java HotSpot(TM) Server VM warning: Can't detect initial thread stack location - find_vma failed (same message if I use the Client VM). I do not get this warning in scenario 2. If I use the script catalina.sh as the user tomcat I can start up the webserver fine without warnings (though not on port 80 naturally). System is Fedora Cora 4 Tomcat is the the apache-tomcat-5.5.15.tar.gz JDK/JRE is Suns jdk 1.5.0_06 for linux (rpm distribution) (note I dont have any other java distributions installed, so fedora RPM name clashes is not an issue) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 38633] - [daemon] When changing UID in jsvc on fedora core 4, warning occurs: find_vma failed
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=38633. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38633 [EMAIL PROTECTED] changed: What|Removed |Added Summary|When changing UID in jsvc on|[daemon] When changing UID |fedora core 4, warning |in jsvc on fedora core 4, |occurs: find_vma failed |warning occurs: find_vma ||failed -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35403] - [daemon] Changes to make jsvc work on AMD64 w/ JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35403. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35403 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2006-01-31 14:28 --- *** Bug 33494 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354472 - in /jakarta/commons/proper/daemon/trunk/src/native/unix: native/arguments.c native/java.c native/jsvc-unix.c native/location.c support/apjava.m4 support/apsupport.m4
Author: jfclere Date: Tue Dec 6 08:48:47 2005 New Revision: 354472 URL: http://svn.apache.org/viewcvs?rev=354472view=rev Log: Add support for kaffe. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Tue Dec 6 08:48:47 2005 @@ -165,6 +165,16 @@ } else if (strstr(argv[x],-verbose)==argv[x]) { args-opts[args-onum++]=strdup(argv[x]); +#ifdef HAVE_KAFFEVM +} else if (strstr(argv[x],-vmdebug)==argv[x]) { +args-opts[args-onum++]=strdup(argv[x]); +temp=optional(argc,argv,x++); +if (temp==NULL) { +log_error(vmdebug option requires a debug flag.); +return(NULL); +} +args-opts[args-onum++]=strdup(temp); +#endif } else if (strcmp(argv[x],-D)==0) { log_error(Parameter -D must be followed by name=value); return(NULL); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Tue Dec 6 08:48:47 2005 @@ -114,7 +114,7 @@ } /* Load the JVM library */ -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) #else libh=dso_link(libf); if (libh==NULL) { @@ -151,7 +151,8 @@ } log_debug(Shell library %s loaded,appf); #endif /* ifdef OS_DARWIN */ -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) +/* BS2000 and kaffe does not allow to call JNI_CreateJavaVM indirectly */ #else symb=dso_symbol(libh,JNI_CreateJavaVM); if (symb==NULL) { @@ -179,7 +180,13 @@ #else arg.version=JNI_VERSION_1_2; #endif -#ifdef OSD_POSIX_JFC +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) + +#if defined(HAVE_KAFFEVM) +memset(arg, 0, sizeof(arg)); +arg.version = JNI_VERSION_1_4; +#endif + if (JNI_GetDefaultJavaVMInitArgs(arg)0) { log_error(Cannot init default JVM default args); return(false); @@ -217,7 +224,7 @@ } /* And finally create the Java VM */ -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) ret=JNI_CreateJavaVM(jvm, env, arg); #else ret=(*symb)(jvm, env, arg); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Dec 6 08:48:47 2005 @@ -533,7 +533,7 @@ log_debug(Waiting for a signal to be delivered); create_tmp_file(args); while (!stopping) { -#ifdef OSD_POSIX +#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM) java_sleep(60); /* pause(); */ #else Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=354472r1=354471r2=354472view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Tue Dec 6 08:48:47 2005 @@ -72,6 +72,9 @@ #if defined(HAVE_SABLEVM) $JAVA_HOME/lib/libsablevm.so,/* sableVM */ #endif +#if defined(HAVE_KAFFEVM) + $JAVA_HOME/jre/lib/ CPU /libkaffevm.so,/* kaffe */ +#endif $JAVA_HOME/jre/lib/ CPU /classic/libjvm.so, /* Sun JDK 1.2 */ $JAVA_HOME/jre/lib/ CPU /client/libjvm.so, /* Sun JDK 1.3 */ $JAVA_HOME/jre/lib/ CPU /libjvm.so, /* Sun JDK */ Modified
DO NOT REPLY [Bug 35403] - [daemon] Changes to make jsvc work on AMD64 w/ JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35403. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35403 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35659] - [daemon] Tomcat under jsvc is crashing soon
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35659. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35659 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354524 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Tue Dec 6 11:47:38 2005 New Revision: 354524 URL: http://svn.apache.org/viewcvs?rev=354524view=rev Log: Fix 36058. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=354524r1=354523r2=354524view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Dec 6 11:47:38 2005 @@ -35,6 +35,8 @@ extern char **environ; +static mode_t envmask; /* mask to create the files */ + pid_t controlled=0; /* the son process pid */ static bool stopping=false; static bool doreload=false; @@ -519,6 +521,7 @@ #endif /* Start the service */ +umask(envmask); if (java_start()!=true) { log_debug(java_start failed); return(5); @@ -709,6 +712,7 @@ #endif } +envmask = umask(0077); set_output(args-outfile, args-errfile); /* We have to fork: this process will become the controller and the other - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 37447] - [daemon] jsvc does not build under 10.4.3
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=37447. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=37447 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-12-02 06:32 --- I choose the opposite of your suggestion (e.g. ignore the settings from stdbool.h), but the result should be the same. If you get commons-daemon from trunk, you should be able to compile it on Mac without problems. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 37447] New: - jsvc does not build under 10.4.3
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=37447. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=37447 Summary: jsvc does not build under 10.4.3 Product: Commons Version: 1.0.1 Final Platform: Macintosh OS/Version: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Using XCode 2.1, gcc 4.0, make gives the following errors: dso-dyld.c:54: error: conflicting types for 'dso_init' dso.h:24: error: previous declaration of 'dso_init' was here dso-dyld.c:76: error: conflicting types for 'dso_unlink' dso.h:26: error: previous declaration of 'dso_unlink' was here it seems that the bool type defined in jsvc.h is also defined in stdbool.h, which is included by mach-o/dyld.h in dso-dyld.c A quick fix that makes the build work consists in removing the bool definition in jsvc.h and instead including stdbool.h. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 37447] - [daemon] jsvc does not build under 10.4.3
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=37447. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=37447 [EMAIL PROTECTED] changed: What|Removed |Added Summary|jsvc does not build under |[daemon] jsvc does not build |10.4.3 |under 10.4.3 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r292037 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: java.c jsvc-unix.c
Author: jfclere Date: Tue Sep 27 13:47:08 2005 New Revision: 292037 URL: http://svn.apache.org/viewcvs?rev=292037view=rev Log: Add traces. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=292037r1=292036r2=292037view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Tue Sep 27 13:47:08 2005 @@ -343,6 +343,7 @@ return(false); } +log_debug(Daemon loading...); ret=(*env)-CallStaticBooleanMethod(env,cls,method,className,stringArray); if (ret==FALSE) { log_error(Cannot load daemon); Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=292037r1=292036r2=292037view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Sep 27 13:47:08 2005 @@ -480,7 +480,11 @@ return(4); #endif /* Initialize the Java VM */ -if (java_init(args,data)!=true) return(1); +if (java_init(args,data)!=true) { +log_debug(java_init failed); +return(1); +} else +log_debug(java_init done); /* Check wether we need to dump the VM version */ if (args-vers==true) { @@ -497,7 +501,11 @@ } /* Load the service */ -if (java_load(args)!=true) return(3); +if (java_load(args)!=true) { +log_debug(java_load failed); +return(3); +} else +log_debug(java_load done); /* Downgrade user */ #ifdef OS_LINUX @@ -511,7 +519,11 @@ #endif /* Start the service */ -if (java_start()!=true) return(5); +if (java_start()!=true) { +log_debug(java_start failed); +return(5); +} else +log_debug(java_start done); /* Install signal handlers */ handler_hup=signal_set(SIGHUP,handler); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [daemon] classloader and jsvc
As I prepare to do so I realize it was on the Windows side with procrun that I had the problem, not with jsvc. I apologize to anyone who might have been trying to chase this down over there (unless, of course, its there as well!). As penance for this mistake I will see if the problem IS on the jsvc side as well and include that in the bug report if appropriate. John On Aug 22, 2005, at 10:25 PM, Jean-frederic Clere wrote: John Yates wrote: I recently tracked down a NullPointerException in my jsvc loaded java application to the fact that Thread.getContextClassLoader() returning null. JAXBContext.newInstance(String contextPath) effectively is JAXBContext.newInstance(contextPath, Thread.getContextClassLoader()) and dies if the class loader is null. For my application, a fix was if (Thread.getContextClassLoader() == null) { Thread.setContextClassLoader(ClassLoader.getSystemClassLoader()); } My question: is this is bug? If so, where? Should jsvc, since it loads the application, do this for me? Should JAXB do this (it should perhaps provide more info when this happens - it took debugging to find it)? Please add a bug report in bugzilla, so that the problem is not forgotten in the next release. Cheers Jean-Frederic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [daemon] classloader and jsvc
John Yates wrote: I recently tracked down a NullPointerException in my jsvc loaded java application to the fact that Thread.getContextClassLoader() returning null. JAXBContext.newInstance(String contextPath) effectively is JAXBContext.newInstance(contextPath, Thread.getContextClassLoader()) and dies if the class loader is null. For my application, a fix was if (Thread.getContextClassLoader() == null) { Thread.setContextClassLoader(ClassLoader.getSystemClassLoader()); } My question: is this is bug? If so, where? Should jsvc, since it loads the application, do this for me? Should JAXB do this (it should perhaps provide more info when this happens - it took debugging to find it)? Please add a bug report in bugzilla, so that the problem is not forgotten in the next release. Cheers Jean-Frederic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r234007 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: java.c jsvc-unix.c
Author: jfclere Date: Sat Aug 20 01:21:58 2005 New Revision: 234007 URL: http://svn.apache.org/viewcvs?rev=234007view=rev Log: prevent core when libjvm.so is not found in linux. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=234007r1=234006r2=234007view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Sat Aug 20 01:21:58 2005 @@ -56,7 +56,7 @@ /* Did we find ANY virtual machine? */ if (data-jnum==0) { log_error(Cannot find any VM in Java Home %s,data-path); -return(false); +return(NULL); } /* Select the VM */ Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=234007r1=234006r2=234007view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Sat Aug 20 01:21:58 2005 @@ -638,21 +638,28 @@ char *p1=NULL; char *p2=NULL; -p1=strdup(libf); -tmp=strrchr(p1,'/'); -if (tmp!=NULL) tmp[0]='\0'; +/* + * There is no need to change LD_LIBRARY_PATH + * if we were not able to find a path to libjvm.so + * (additionaly a strdup(NULL) cores dump on my machine). + */ +if (libf!=NULL) { +p1=strdup(libf); +tmp=strrchr(p1,'/'); +if (tmp!=NULL) tmp[0]='\0'; -p2=strdup(p1); -tmp=strrchr(p2,'/'); -if (tmp!=NULL) tmp[0]='\0'; +p2=strdup(p1); +tmp=strrchr(p2,'/'); +if (tmp!=NULL) tmp[0]='\0'; -if (oldpath==NULL) snprintf(buf,2048,%s:%s,p1,p2); -else snprintf(buf,2048,%s:%s:%s,oldpath,p1,p2); +if (oldpath==NULL) snprintf(buf,2048,%s:%s,p1,p2); +else snprintf(buf,2048,%s:%s:%s,oldpath,p1,p2); -tmp=strdup(buf); -setenv(LD_LIBRARY_PATH,tmp,1); +tmp=strdup(buf); +setenv(LD_LIBRARY_PATH,tmp,1); -log_debug(Invoking w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); +log_debug(Invoking w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); +} /* execve needs a full path */ ret = readlink(/proc/self/exe,buf,sizeof(buf)-1); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [daemon] classloader and jsvc
On Mon, 2005-08-15 at 22:23 +0200, John Yates wrote: I recently tracked down a NullPointerException in my jsvc loaded java application to the fact that Thread.getContextClassLoader() returning null. JAXBContext.newInstance(String contextPath) effectively is JAXBContext.newInstance(contextPath, Thread.getContextClassLoader()) and dies if the class loader is null. For my application, a fix was if (Thread.getContextClassLoader() == null) { Thread.setContextClassLoader(ClassLoader.getSystemClassLoader()); } My question: is this is bug? If so, where? Should jsvc, since it loads the application, do this for me? Should JAXB do this (it should perhaps provide more info when this happens - it took debugging to find it)? the context classloader may be null but should be set (where possibly) by well behaved applications. IMHO it's a bug in JAXB (should null check and use the system) but it would be good if jsvc set something reasonable. - robert signature.asc Description: This is a digitally signed message part
svn commit: r232790 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon Aug 15 03:48:56 2005 New Revision: 232790 URL: http://svn.apache.org/viewcvs?rev=232790view=rev Log: Just add a comment. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=232790r1=232789r2=232790view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Aug 15 03:48:56 2005 @@ -707,6 +707,7 @@ unlink(args-pidf); /* If the child got out with 123 he wants to be restarted */ +/* See java_abort123 (we use this return code to restart when the JVM aborts) */ if (status==123) { log_debug(Reloading service); continue; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232794 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon Aug 15 04:19:48 2005 New Revision: 232794 URL: http://svn.apache.org/viewcvs?rev=232794view=rev Log: Fix 35017 (wait 60 seconds before restarting!). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=232794r1=232793r2=232794view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Aug 15 04:19:48 2005 @@ -31,6 +31,7 @@ #define _LINUX_FS_H #include linux/capability.h #endif +#include time.h extern char **environ; @@ -600,6 +601,7 @@ pid_t pid=0; uid_t uid=0; gid_t gid=0; +time_t laststart; /* Parse command line arguments */ args=arguments(argc,argv); @@ -685,6 +687,7 @@ while ((pid=fork())!=-1) { /* We forked (again), if this is the child, we go on normally */ if (pid==0) exit(child(args,data,uid,gid)); +laststart = time(NULL); /* We are in the controller, we have to forward all interesting signals to the child, and wait for it to die */ @@ -710,6 +713,11 @@ /* See java_abort123 (we use this return code to restart when the JVM aborts) */ if (status==123) { log_debug(Reloading service); +/* prevent looping */ +if (laststart+60time(NULL)) { + log_debug(Waiting 60 s to prevent looping); + sleep(60); +} continue; } /* If the child got out with 0 he is shutting down */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35017] - [daemon] jsvc hangs on JRE error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35017. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35017 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35188] - [daemon] JSVC does not work with JRockit
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35188. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35188 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2005-08-15 13:22 --- That seems to be a JRockit bug. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35403] - [daemon] Changes to make jsvc work on AMD64 w/ JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35403. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35403 --- Additional Comments From [EMAIL PROTECTED] 2005-08-15 13:51 --- why do you use $JAVA_HOME/jre/lib/ CPU /server/libjvm.so? Doesn't it work with client? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35659] - [daemon] Tomcat under jsvc is crashing soon
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35659. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35659 --- Additional Comments From [EMAIL PROTECTED] 2005-08-15 14:08 --- Any things in catalina.out? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35659] - [daemon] Tomcat under jsvc is crashing soon
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35659. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35659 --- Additional Comments From [EMAIL PROTECTED] 2005-08-15 14:45 --- (In reply to comment #1) Any things in catalina.out? No any unusual things in catalina.out. But I think I've fixed this problem, by compiling CVS version of jsvc. I've 3.5 weeks uptime with no crash yet, but on standart jsvc I had 1 crash per week. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r232839 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Mon Aug 15 10:44:02 2005 New Revision: 232839 URL: http://svn.apache.org/viewcvs?rev=232839view=rev Log: fix 36030. Note that it requires /proc to be mounted. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=232839r1=232838r2=232839view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon Aug 15 10:44:02 2005 @@ -631,8 +631,9 @@ if (strcmp(argv[0],args-procname)!=0) { char *oldpath=getenv(LD_LIBRARY_PATH); char *libf=java_library(args,data); -char *old=argv[0]; +char *filename; char buf[2048]; +int ret; char *tmp=NULL; char *p1=NULL; char *p2=NULL; @@ -653,9 +654,18 @@ log_debug(Invoking w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); +/* execve needs a full path */ +ret = readlink(/proc/self/exe,buf,sizeof(buf)-1); +if (ret=0) + strcpy(buf,argv[0]); +else + buf[ret]='\0'; + +filename=buf; + argv[0]=args-procname; -execve(old,argv,environ); -log_error(Cannot execute JSVC executor process); +execve(filename,argv,environ); +log_error(Cannot execute JSVC executor process (%s),filename); return(1); } log_debug(Running w/ LD_LIBRARY_PATH=%s,getenv(LD_LIBRARY_PATH)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[daemon] classloader and jsvc
I recently tracked down a NullPointerException in my jsvc loaded java application to the fact that Thread.getContextClassLoader() returning null. JAXBContext.newInstance(String contextPath) effectively is JAXBContext.newInstance(contextPath, Thread.getContextClassLoader()) and dies if the class loader is null. For my application, a fix was if (Thread.getContextClassLoader() == null) { Thread.setContextClassLoader(ClassLoader.getSystemClassLoader()); } My question: is this is bug? If so, where? Should jsvc, since it loads the application, do this for me? Should JAXB do this (it should perhaps provide more info when this happens - it took debugging to find it)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35659] New: - Tomcat under jsvc is crashing soon
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35659. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35659 Summary: Tomcat under jsvc is crashing soon Product: Commons Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Tomcat under jsvc with Sun JVM 1.5.0_04 is crashing soon on RedHat Linux 7.3. I have this trouble two times on the last week, and it's very critical because this server serves www.jetbrains.com website. Sun's support telling: it's Apache's trouble, so I sent JVM error log here. # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x4207a351, pid=903, tid=35876 # # Java VM: Java HotSpot(TM) Server VM (1.5.0_04-b05 mixed mode) # Problematic frame: # C [jsvc.exec+0x7a351] # --- T H R E A D --- Current thread (0x5385c460): JavaThread TP-Processor22 daemon [_thread_in_native, id=949] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x61766176 Registers: EAX=0x4212dfa0, EBX=0x4213030c, ECX=0x0005, EDX=0x6176616a ESP=0x55c7e5f8, EBP=0x55c7e650, ESI=0x0b074f10, EDI=0x65732f78 EIP=0x4207a351, CR2=0x61766176, EFLAGS=0x00010206 Top of Stack: (sp=0x55c7e5f8) 0x55c7e5f8: 636f642f 6e656d75 69746174 4058fdcc 0x55c7e608: 5385c460 4ee626e0 55c7e670 402d2385 0x55c7e618: 4ee609b8 0006 0x55c7e628: 4058fdcc 08491f78 55c7e634 0005 0x55c7e638: 0028 0028 4212dfa0 4213030c 0x55c7e648: 4212dfa0 4212dfa0 55c7e670 4207a158 0x55c7e658: 4ee62ac8 4058fdcc 0028 40a12858 0x55c7e668: 099821bc d22467eb 55c7e6c0 40a0f40d Instructions: (pc=0x4207a351) 0x4207a341: 2e 8b 7e 04 83 e7 fc 89 7d e8 8b 7e 0c 8b 56 08 0x4207a351: 89 7a 0c 89 57 08 8b 45 e8 83 4c 30 04 01 89 f0 Stack: [0x55c0,0x55c8), sp=0x55c7e5f8, free space=505k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [jsvc.exec+0x7a351] C [jsvc.exec+0x7a158] malloc+0xc8 C [libverify.so+0x840d] C [libverify.so+0x2627] VerifyClassForMajorVersion+0x457 C [libjava.so+0xf03b] VerifyClassCodesForMajorVersion+0x3b V [libjvm.so+0x4a9561] V [libjvm.so+0x22e4d8] V [libjvm.so+0x22e16b] V [libjvm.so+0x2a3c1e] j java.lang.Class.getDeclaredConstructors0(Z)[Ljava/lang/reflect/Constructor;+0 j java.lang.Class.privateGetDeclaredConstructors(Z)[Ljava/lang/reflect/Constructor;+83 j java.lang.Class.getConstructor0([Ljava/lang/Class;I)Ljava/lang/reflect/Constructor;+10 j java.lang.Class.newInstance0()Ljava/lang/Object;+32 j java.lang.Class.newInstance()Ljava/lang/Object;+15 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j java.lang.Class.getDeclaredConstructors0(Z)[Ljava/lang/reflect/Constructor;+0 j java.lang.Class.privateGetDeclaredConstructors(Z)[Ljava/lang/reflect/Constructor;+83 j java.lang.Class.getConstructor0([Ljava/lang/Class;I)Ljava/lang/reflect/Constructor;+10 j java.lang.Class.newInstance0()Ljava/lang/Object;+32 j java.lang.Class.newInstance()Ljava/lang/Object;+15 v ~C2IAdapter J org.apache.jasper.servlet.JspServletWrapper.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V v ~I2CAdapter j org.apache.jasper.servlet.JspServlet.serviceJspFile(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljava/lang/Throwable;Z)V+142 j org.apache.jasper.servlet.JspServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+440 j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30 j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+478 j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101 j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+619 v ~C2IAdapter J org.apache.catalina.core.StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V v ~I2CAdapter j org.apache.catalina.core.StandardContextValve.invokeInternal(Lorg/apache/catalina/Wrapper;Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+172 j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+228 v ~C2IAdapter J org.apache.catalina.core.StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache
DO NOT REPLY [Bug 35659] - [daemon] Tomcat under jsvc is crashing soon
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35659. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35659 [EMAIL PROTECTED] changed: What|Removed |Added Summary|Tomcat under jsvc is|[daemon] Tomcat under jsvc |crashing soon |is crashing soon -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35403] - [daemon] Changes to make jsvc work on AMD64 w/ JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35403. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35403 [EMAIL PROTECTED] changed: What|Removed |Added Summary|Changes to make jsvc work on|[daemon] Changes to make |AMD64 w/ JDK 1.5|jsvc work on AMD64 w/ JDK ||1.5 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35403] New: - Changes to make jsvc work on AMD64 w/ JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35403. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35403 Summary: Changes to make jsvc work on AMD64 w/ JDK 1.5 Product: Commons Version: unspecified Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I had to make two small changes to get jsvc to work on an AMD Opteron machine running Linus using Sun's JDK 1.5 for AMD 64. 1. The CPU wasn't supported. It is reported as x86_64 but the JDK labels it amd64 2. The search paths for the jvm.cfg and libjvm.so do not match the JDK 1.5. I added two search paths to fix that. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35403] - Changes to make jsvc work on AMD64 w/ JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35403. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35403 --- Additional Comments From [EMAIL PROTECTED] 2005-06-17 23:14 --- Created an attachment (id=15465) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=15465action=view) Fix to generated configure I know this file is generated, but I don't have the sources. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35403] - Changes to make jsvc work on AMD64 w/ JDK 1.5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35403. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35403 --- Additional Comments From [EMAIL PROTECTED] 2005-06-17 23:13 --- Created an attachment (id=15464) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=15464action=view) Fix for location path searching for JDK 1.5 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35188] - [daemon] JSVC does not work with JRockit
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35188. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35188 --- Additional Comments From [EMAIL PROTECTED] 2005-06-15 09:10 --- I have tried with: +++ [EMAIL PROTECTED]:~ jrockit-jdk1.5.0/bin/java -version java version 1.5.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-linux-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) +++ on a Suse 8.1 (i386) it works. Could you retry with that version? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35188] - [daemon] JSVC does not work with JRockit
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35188. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35188 --- Additional Comments From [EMAIL PROTECTED] 2005-06-15 11:08 --- That version works for me too. So this is a JRockit bug? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jsvc and JRockit
Have you build jsvc or are just using the binary from the download pages? I've built jsvc. Both the version that comes with tomcat and the latest 1.0.1. Using as JAVA_HOME both the sun and the jrockit jdk. Always with the same result. Regards, André Cruz On Thu, 2005-06-02 at 15:23 +0100, André Cruz wrote: Hello! I have been using jsvc to manage my tomcat process for some time now and with no problems. But, now I'm trying to switch my JVM from SUN to BEA's jRockit and tomcat doesn't start anymore. JRockit just dumps at startup. Is this a known problem? Is jsvc incompatible with JRockit? Is there an alternative? Here are the versions of my programs: Sun JVM: java version 1.5.0_03 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07) Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing) Bea JVM: java version 1.5.0_02 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) BEA WebLogic JRockit(R) (build dra-43491-20050413-1952-linux-ia32, R25.1.0-104) Tomcat: 5.5.9 Jsvc: the version that comes with tomcat and downloaded 1.0.1 with the same results. Output from jsvc: 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- 02/06/2005 15:05:16 3362 jsvc debug: | Detach: True 02/06/2005 15:05:16 3362 jsvc debug: | Show Version:No 02/06/2005 15:05:16 3362 jsvc debug: | Show Help: No 02/06/2005 15:05:16 3362 jsvc debug: | Check Only: Disabled 02/06/2005 15:05:16 3362 jsvc debug: | Stop:False 02/06/2005 15:05:16 3362 jsvc debug: | Wait:0 02/06/2005 15:05:16 3362 jsvc debug: | Run as service: No 02/06/2005 15:05:16 3362 jsvc debug: | Install service: No 02/06/2005 15:05:16 3362 jsvc debug: | Remove service: No 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:null 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | PID File:/tmp/jsvc.pid 02/06/2005 15:05:16 3362 jsvc debug: | User Name: acruz 02/06/2005 15:05:16 3362 jsvc debug: | Extra Options: 5 02/06/2005 15:05:16 3362 jsvc debug: | -Dcatalina.home=/home/acruz/jakarta-tomcat-5.5.9 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.io.tmpdir=/var/tmp 02/06/2005 15:05:16 3362 jsvc debug: | -Xms256m 02/06/2005 15:05:16 3362 jsvc debug: | -Xmx256m 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.class.path=/home/acruz/jrockit-jdk1.5.0_02//lib/tools.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/commons-daemon.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/bootstrap.jar 02/06/2005 15:05:16 3362 jsvc debug: | Class Invoked: org.apache.catalina.startup.Bootstrap 02/06/2005 15:05:16 3362 jsvc debug: | Class Arguments: 0 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3363 jsvc debug: user changed to 'acruz' 02/06/2005 15:05:16 3362 jsvc debug: User 'acruz' validated 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate Java Home in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM configuration file at /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM jrockit definition in configuration 02/06/2005 15:05:16 3362 jsvc debug: Checking library /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Java Home located in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING JAVA HOME STRUCTURE 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | Java VM Config.: /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: | Found JVMs: 1 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:jrockit 02/06/2005 15:05:16 3362 jsvc debug: | /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3362 jsvc debug: Using default JVM in /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Invoking w/ LD_LIBRARY_PATH=/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit:/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386 02/06/2005 15:05:16 3362 jsvc.exec debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- 02/06/2005 15:05:16 3362 jsvc.exec debug: | Detach: True 02/06/2005
Re: [PATCH] HP-UX 11 port of JSVC (Commons::Daemon)
Max Zinal wrote: Hello and have a good time of day! This patch allows JSVC to compile and run on HP-UX 11 systems. It has been tested on PA_RISC2.0W architecture, but should also work on PA_RISC2.0. Compilation was performed with GCC 3.4.3, with JDK 1.4.2 provided by HP. There is a major problem with that patch. It links libjvm.sl directly to jsvc binary in addition of dlopen()ing it because of static TLS entry inside libjvm.sl. These TLS problems are native and common to HP-UX, and I don't know how to get rid of it. Maybe using HP's ANSI-compatible C compiler could help. Please note that this patch is hard-coded to JDK 1.4, which always resides in /opt/java1.4. Probably mixing native and gcc libraries is not working well ;-(. In addition, I had to decrease sleep() parameter in the child() wait-for-stop cycle. With the default value of 60 seconds there were significant delays (up to 60 seconds) in the response to SIGINT, SIGHUP and SIGTERM. With the value of 2 seconds the delay is always almost zero. I know it's strange, but it works after all. Try to use java_sleep(60) (See the code I have added for OSD_POSIX). Hope this patch could be useful to people using HP-UX. -- Max Zinal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jsvc and JRockit
André Cruz wrote: Hello! I have been using jsvc to manage my tomcat process for some time now and with no problems. But, now I'm trying to switch my JVM from SUN to BEA's jRockit and tomcat doesn't start anymore. JRockit just dumps at startup. Have you build jsvc or are just using the binary from the download pages? Is this a known problem? Is jsvc incompatible with JRockit? Is there an alternative? Here are the versions of my programs: Sun JVM: java version 1.5.0_03 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07) Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing) Bea JVM: java version 1.5.0_02 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) BEA WebLogic JRockit(R) (build dra-43491-20050413-1952-linux-ia32, R25.1.0-104) Tomcat: 5.5.9 Jsvc: the version that comes with tomcat and downloaded 1.0.1 with the same results. Output from jsvc: 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- 02/06/2005 15:05:16 3362 jsvc debug: | Detach: True 02/06/2005 15:05:16 3362 jsvc debug: | Show Version:No 02/06/2005 15:05:16 3362 jsvc debug: | Show Help: No 02/06/2005 15:05:16 3362 jsvc debug: | Check Only: Disabled 02/06/2005 15:05:16 3362 jsvc debug: | Stop:False 02/06/2005 15:05:16 3362 jsvc debug: | Wait:0 02/06/2005 15:05:16 3362 jsvc debug: | Run as service: No 02/06/2005 15:05:16 3362 jsvc debug: | Install service: No 02/06/2005 15:05:16 3362 jsvc debug: | Remove service: No 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:null 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | PID File:/tmp/jsvc.pid 02/06/2005 15:05:16 3362 jsvc debug: | User Name: acruz 02/06/2005 15:05:16 3362 jsvc debug: | Extra Options: 5 02/06/2005 15:05:16 3362 jsvc debug: | -Dcatalina.home=/home/acruz/jakarta-tomcat-5.5.9 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.io.tmpdir=/var/tmp 02/06/2005 15:05:16 3362 jsvc debug: | -Xms256m 02/06/2005 15:05:16 3362 jsvc debug: | -Xmx256m 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.class.path=/home/acruz/jrockit-jdk1.5.0_02//lib/tools.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/commons-daemon.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/bootstrap.jar 02/06/2005 15:05:16 3362 jsvc debug: | Class Invoked: org.apache.catalina.startup.Bootstrap 02/06/2005 15:05:16 3362 jsvc debug: | Class Arguments: 0 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3363 jsvc debug: user changed to 'acruz' 02/06/2005 15:05:16 3362 jsvc debug: User 'acruz' validated 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate Java Home in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM configuration file at /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM jrockit definition in configuration 02/06/2005 15:05:16 3362 jsvc debug: Checking library /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Java Home located in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING JAVA HOME STRUCTURE 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | Java VM Config.: /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: | Found JVMs: 1 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:jrockit 02/06/2005 15:05:16 3362 jsvc debug: | /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3362 jsvc debug: Using default JVM in /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Invoking w/ LD_LIBRARY_PATH=/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit:/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386 02/06/2005 15:05:16 3362 jsvc.exec debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- 02/06/2005 15:05:16 3362 jsvc.exec debug: | Detach: True 02/06/2005 15:05:16 3362 jsvc.exec debug: | Show Version:No 02/06/2005 15:05:16 3362 jsvc.exec debug: | Show Help: No 02/06/2005 15:05:16 3362 jsvc.exec debug: | Check Only: Disabled 02/06/2005 15:05:16 3362 jsvc.exec debug: | Stop:False 02/06/2005 15:05:16 3362 jsvc.exec debug: | Wait
Re: [PATCH] HP-UX 11 port of JSVC (Commons::Daemon)
Max Zinal wrote: Hello and have a good time of day! This patch allows JSVC to compile and run on HP-UX 11 systems. It has been tested on PA_RISC2.0W architecture, but should also work on PA_RISC2.0. Compilation was performed with GCC 3.4.3, with JDK 1.4.2 provided by HP. There is a major problem with that patch. It links libjvm.sl directly to jsvc binary in addition of dlopen()ing it because of static TLS entry inside libjvm.sl. These TLS problems are native and common to HP-UX, and I don't know how to get rid of it. The LDFLAGS=$LDFLAGS -L/opt/java1.4/jre/lib/PA_RISC2.0W/server -ljvm probably cause the static linking. What happends if you remove it? Maybe using HP's ANSI-compatible C compiler could help. Please note that this patch is hard-coded to JDK 1.4, which always resides in /opt/java1.4. In addition, I had to decrease sleep() parameter in the child() wait-for-stop cycle. With the default value of 60 seconds there were significant delays (up to 60 seconds) in the response to SIGINT, SIGHUP and SIGTERM. With the value of 2 seconds the delay is always almost zero. I know it's strange, but it works after all. Hope this patch could be useful to people using HP-UX. -- Max Zinal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35188] - [daemon] JSVC does not work with JRockit
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35188. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35188 [EMAIL PROTECTED] changed: What|Removed |Added Summary|JSVC does not work with |[daemon] JSVC does not work |JRockit |with JRockit -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PATCH] HP-UX 11 port of JSVC (Commons::Daemon)
jean-frederic clere wrote: Max Zinal wrote: There is a major problem with that patch. It links libjvm.sl directly to jsvc binary in addition of dlopen()ing it because of static TLS entry inside libjvm.sl. These TLS problems are native and common to HP-UX, and I don't know how to get rid of it. The LDFLAGS=$LDFLAGS -L/opt/java1.4/jre/lib/PA_RISC2.0W/server -ljvm probably cause the static linking. What happends if you remove it? jsvc initialization fails when it tries to load appropriate libjvm.sl. I cannot give you the exact error message because I don't currently have access to HP-UX system, but it's something about a static TLS entry in libjvm.sl itself. The text in the error message suggests relinking libjvm.sl with dynamic TLS enabled. So we you cannot dlopen() libjvm.sl if it is not already linked to the calling binary (e.g. jsvc). So this is a major problem I've mentioned before. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35188] New: - JSVC does not work with JRockit
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35188. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35188 Summary: JSVC does not work with JRockit Product: Commons Version: 1.0.1 Final Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P4 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I have been using jsvc to manage my tomcat process for some time now and with no problems. But, now I'm trying to switch my JVM from SUN to BEA's jRockit and tomcat doesn't start anymore. JRockit just dumps at startup. Here are the versions of my programs: Sun JVM: java version 1.5.0_03 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07) Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing) Bea JVM: java version 1.5.0_02 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) BEA WebLogic JRockit(R) (build dra-43491-20050413-1952-linux-ia32, R25.1.0-104) Tomcat: 5.5.9 Jsvc: the version that comes with tomcat and downloaded 1.0.1 with the same results. Output from jsvc: 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- 02/06/2005 15:05:16 3362 jsvc debug: | Detach: True 02/06/2005 15:05:16 3362 jsvc debug: | Show Version:No 02/06/2005 15:05:16 3362 jsvc debug: | Show Help: No 02/06/2005 15:05:16 3362 jsvc debug: | Check Only: Disabled 02/06/2005 15:05:16 3362 jsvc debug: | Stop:False 02/06/2005 15:05:16 3362 jsvc debug: | Wait:0 02/06/2005 15:05:16 3362 jsvc debug: | Run as service: No 02/06/2005 15:05:16 3362 jsvc debug: | Install service: No 02/06/2005 15:05:16 3362 jsvc debug: | Remove service: No 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:null 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | PID File:/tmp/jsvc.pid 02/06/2005 15:05:16 3362 jsvc debug: | User Name: acruz 02/06/2005 15:05:16 3362 jsvc debug: | Extra Options: 5 02/06/2005 15:05:16 3362 jsvc debug: | -Dcatalina.home=/home/acruz/jakarta-tomcat-5.5.9 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.io.tmpdir=/var/tmp 02/06/2005 15:05:16 3362 jsvc debug: | -Xms256m 02/06/2005 15:05:16 3362 jsvc debug: | -Xmx256m 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.class.path=/home/acruz/jrockit-jdk1.5.0_02//lib/tools.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/commons-daemon.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/bootstrap.jar 02/06/2005 15:05:16 3362 jsvc debug: | Class Invoked: org.apache.catalina.startup.Bootstrap 02/06/2005 15:05:16 3362 jsvc debug: | Class Arguments: 0 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3363 jsvc debug: user changed to 'acruz' 02/06/2005 15:05:16 3362 jsvc debug: User 'acruz' validated 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate Java Home in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM configuration file at /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM jrockit definition in configuration 02/06/2005 15:05:16 3362 jsvc debug: Checking library /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Java Home located in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING JAVA HOME STRUCTURE 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | Java VM Config.: /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: | Found JVMs: 1 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:jrockit 02/06/2005 15:05:16 3362 jsvc debug: | /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3362 jsvc debug: Using default JVM in /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Invoking w/ LD_LIBRARY_PATH=/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit:/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386 02/06/2005 15
Jsvc and JRockit
Hello! I have been using jsvc to manage my tomcat process for some time now and with no problems. But, now I'm trying to switch my JVM from SUN to BEA's jRockit and tomcat doesn't start anymore. JRockit just dumps at startup. Is this a known problem? Is jsvc incompatible with JRockit? Is there an alternative? Here are the versions of my programs: Sun JVM: java version 1.5.0_03 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07) Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing) Bea JVM: java version 1.5.0_02 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) BEA WebLogic JRockit(R) (build dra-43491-20050413-1952-linux-ia32, R25.1.0-104) Tomcat: 5.5.9 Jsvc: the version that comes with tomcat and downloaded 1.0.1 with the same results. Output from jsvc: 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- 02/06/2005 15:05:16 3362 jsvc debug: | Detach: True 02/06/2005 15:05:16 3362 jsvc debug: | Show Version:No 02/06/2005 15:05:16 3362 jsvc debug: | Show Help: No 02/06/2005 15:05:16 3362 jsvc debug: | Check Only: Disabled 02/06/2005 15:05:16 3362 jsvc debug: | Stop:False 02/06/2005 15:05:16 3362 jsvc debug: | Wait:0 02/06/2005 15:05:16 3362 jsvc debug: | Run as service: No 02/06/2005 15:05:16 3362 jsvc debug: | Install service: No 02/06/2005 15:05:16 3362 jsvc debug: | Remove service: No 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:null 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | PID File:/tmp/jsvc.pid 02/06/2005 15:05:16 3362 jsvc debug: | User Name: acruz 02/06/2005 15:05:16 3362 jsvc debug: | Extra Options: 5 02/06/2005 15:05:16 3362 jsvc debug: | -Dcatalina.home=/home/acruz/jakarta-tomcat-5.5.9 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.io.tmpdir=/var/tmp 02/06/2005 15:05:16 3362 jsvc debug: | -Xms256m 02/06/2005 15:05:16 3362 jsvc debug: | -Xmx256m 02/06/2005 15:05:16 3362 jsvc debug: | -Djava.class.path=/home/acruz/jrockit-jdk1.5.0_02//lib/tools.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/commons-daemon.jar:/home/acruz/jakarta-tomcat-5.5.9/bin/bootstrap.jar 02/06/2005 15:05:16 3362 jsvc debug: | Class Invoked: org.apache.catalina.startup.Bootstrap 02/06/2005 15:05:16 3362 jsvc debug: | Class Arguments: 0 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3363 jsvc debug: user changed to 'acruz' 02/06/2005 15:05:16 3362 jsvc debug: User 'acruz' validated 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate Java Home in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/lib/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Attempting to locate VM configuration file /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM configuration file at /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: Found VM jrockit definition in configuration 02/06/2005 15:05:16 3362 jsvc debug: Checking library /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Java Home located in /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: +-- DUMPING JAVA HOME STRUCTURE 02/06/2005 15:05:16 3362 jsvc debug: | Java Home: /home/acruz/jrockit-jdk1.5.0_02 02/06/2005 15:05:16 3362 jsvc debug: | Java VM Config.: /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jvm.cfg 02/06/2005 15:05:16 3362 jsvc debug: | Found JVMs: 1 02/06/2005 15:05:16 3362 jsvc debug: | JVM Name:jrockit 02/06/2005 15:05:16 3362 jsvc debug: | /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: +--- 02/06/2005 15:05:16 3362 jsvc debug: Using default JVM in /home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit/libjvm.so 02/06/2005 15:05:16 3362 jsvc debug: Invoking w/ LD_LIBRARY_PATH=/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386/jrockit:/home/acruz/jrockit-jdk1.5.0_02/jre/lib/i386 02/06/2005 15:05:16 3362 jsvc.exec debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -- 02/06/2005 15:05:16 3362 jsvc.exec debug: | Detach: True 02/06/2005 15:05:16 3362 jsvc.exec debug: | Show Version:No 02/06/2005 15:05:16 3362 jsvc.exec debug: | Show Help: No 02/06/2005 15:05:16 3362 jsvc.exec debug: | Check Only: Disabled 02/06/2005 15:05:16 3362 jsvc.exec debug: | Stop:False 02/06/2005 15:05:16 3362 jsvc.exec debug: | Wait:0 02/06/2005 15:05:16 3362 jsvc.exec debug: | Run as service: No 02/06/2005 15:05:16 3362
[PATCH] HP-UX 11 port of JSVC (Commons::Daemon)
Hello and have a good time of day! This patch allows JSVC to compile and run on HP-UX 11 systems. It has been tested on PA_RISC2.0W architecture, but should also work on PA_RISC2.0. Compilation was performed with GCC 3.4.3, with JDK 1.4.2 provided by HP. There is a major problem with that patch. It links libjvm.sl directly to jsvc binary in addition of dlopen()ing it because of static TLS entry inside libjvm.sl. These TLS problems are native and common to HP-UX, and I don't know how to get rid of it. Maybe using HP's ANSI-compatible C compiler could help. Please note that this patch is hard-coded to JDK 1.4, which always resides in /opt/java1.4. In addition, I had to decrease sleep() parameter in the child() wait-for-stop cycle. With the default value of 60 seconds there were significant delays (up to 60 seconds) in the response to SIGINT, SIGHUP and SIGTERM. With the value of 2 seconds the delay is always almost zero. I know it's strange, but it works after all. Hope this patch could be useful to people using HP-UX. -- Max Zinal diff -ur daemon-1.0.1a/src/native/unix/configure daemon-1.0.1b/src/native/unix/configure --- daemon-1.0.1a/src/native/unix/configure 2005-05-17 15:00:45.0 +0400 +++ daemon-1.0.1b/src/native/unix/configure 2005-06-01 10:13:13.746683194 +0400 @@ -2413,6 +2413,10 @@ CFLAGS=$CFLAGS -pthread -DOS_TRU64 -DDSO_DLFCN -D_XOPEN_SOURCE_EXTENDED LDFLAGS=$LDFLAGS -pthread ;; + hpux11*) +CFLAGS=$CFLAGS -pthread -DOS_HPUX -DDSO_DLFCN +LDFLAGS=$LDFLAGS -pthread -lpthread +;; *) echo $as_me:$LINENO: result: failed 5 echo ${ECHO_T}failed 6 @@ -2444,6 +2448,16 @@ CFLAGS=$CFLAGS -DCPU=\\\alpha\\\ supported_os=alpha ;; + hppa2.0w) +CFLAGS=$CFLAGS -DCPU=\\\PA_RISC2.0W\\\ +supported_os=hp-ux +LDFLAGS=$LDFLAGS -L/opt/java1.4/jre/lib/PA_RISC2.0W/server -ljvm +;; + hppa2.0) +CFLAGS=$CFLAGS -DCPU=\\\PA_RISC2.0\\\ +supported_os=hp-ux +LDFLAGS=$LDFLAGS -L/opt/java1.4/jre/lib/PA_RISC2.0/server -ljvm +;; *) echo $as_me:$LINENO: result: failed 5 echo ${ECHO_T}failed 6 diff -ur daemon-1.0.1a/src/native/unix/native/jsvc-unix.c daemon-1.0.1b/src/native/unix/native/jsvc-unix.c --- daemon-1.0.1a/src/native/unix/native/jsvc-unix.c2005-05-30 15:50:34.0 +0400 +++ daemon-1.0.1b/src/native/unix/native/jsvc-unix.c2005-06-01 10:14:19.817823008 +0400 @@ -524,7 +524,7 @@ java_sleep(60); /* pause(); */ #else -sleep(60); /* pause() not threadsafe */ +sleep(2); /* pause() not threadsafe */ #endif } remove_tmp_file(args); diff -ur daemon-1.0.1a/src/native/unix/native/location.c daemon-1.0.1b/src/native/unix/native/location.c --- daemon-1.0.1a/src/native/unix/native/location.c 2005-04-27 20:28:57.0 +0400 +++ daemon-1.0.1b/src/native/unix/native/location.c 2005-06-01 10:13:13.747682969 +0400 @@ -40,6 +40,9 @@ #elif defined(OS_TRU64) /usr/opt/java142, /usr/opt/java13, +#elif defined(OS_HPUX) +/opt/java1.4, +/opt/java1.3, #endif NULL, }; @@ -99,6 +102,11 @@ $JAVA_HOME/jre/lib/ CPU /fast32/libjvm.so, $JAVA_HOME/lib/ CPU /fast64/libjvm.so, $JAVA_HOME/lib/ CPU /fast32/libjvm.so, +#elif defined(OS_HPUX) +$JAVA_HOME/jre/lib/ CPU /server/libjvm.sl, +$JAVA_HOME/jre/lib/ CPU /client/libjvm.sl, +$JAVA_HOME/jre/lib/ CPU /hotspot/libjvm.sl, +$JAVA_HOME/jre/lib/ CPU /classic/libjvm.sl, #endif NULL, }; @@ -114,6 +122,9 @@ #elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_FREEBSD) || defined(OS_TRU64) $JAVA_HOME/jre/lib/ CPU /$VM_NAME/libjvm.so,/* Sun JDK 1.3 */ $JAVA_HOME/lib/ CPU /$VM_NAME/libjvm.so,/* Sun JRE 1.3 */ +#elif defined(OS_HPUX) +$JAVA_HOME/jre/lib/ CPU /$VM_NAME/libjvm.sl, +$JAVA_HOME/lib/ CPU /$VM_NAME/libjvm.sl, #elif defined(OS_SYSV) $JAVA_HOME/jre/lib/ CPU /$VM_NAME/dce_threads/libjvm.so, $JAVA_HOME/jre/lib/ CPU /$VM_NAME/green_threads/libjvm.so, diff -ur daemon-1.0.1a/src/native/unix/support/apsupport.m4 daemon-1.0.1b/src/native/unix/support/apsupport.m4 --- daemon-1.0.1a/src/native/unix/support/apsupport.m4 2005-04-28 12:03:15.0 +0400 +++ daemon-1.0.1b/src/native/unix/support/apsupport.m4 2005-06-01 10:13:13.749682519 +0400 @@ -58,6 +58,10 @@ CFLAGS=$CFLAGS -pthread -DOS_TRU64 -DDSO_DLFCN -D_XOPEN_SOURCE_EXTENDED LDFLAGS=$LDFLAGS -pthread ;; + hpux11*) +CFLAGS=$CFLAGS -pthread -DOS_HPUX -DDSO_DLFCN +LDFLAGS=$LDFLAGS -pthread -lpthread +;; *) AC_MSG_RESULT([failed]) AC_MSG_ERROR([Unsupported operating system $host_os]) @@ -86,6 +90,16 @@ CFLAGS=$CFLAGS -DCPU=\\\alpha\\\ supported_os=alpha ;; + hppa2.0w) +CFLAGS=$CFLAGS -DCPU=\\\PA_RISC2.0W\\\ +supported_os=hp-ux +LDFLAGS=$LDFLAGS -L/opt/java1.4/jre/lib/PA_RISC2.0W/server -ljvm +;; + hppa2.0) +CFLAGS=$CFLAGS -DCPU=\\\PA_RISC2.0\\\ +supported_os=hp-ux
DO NOT REPLY [Bug 35017] New: - [commons-daemon]: jsvc hangs on JRE error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35017. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35017 Summary: [commons-daemon]: jsvc hangs on JRE error Product: Commons Version: Nightly Builds Platform: Other OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Daemon AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Configuration: Apache/2.0.40 (Red Hat Linux) mod_jk 1.2.8 Tomcat 5.5.7 Red Hat Linux 9 j2sdk-1_4_2_07 Expected behavior: jsvc should be able to exit on any JRE error and report that error. jsvc should not make repeated attempts to start the JVM under such an error condition and similar error conditions. Actual behavior: jsvc goes into a tight loop, consuming 99% CPU most of the time and the log file uses up disk space quickly. How to reproduce: To easily simulate the error that causes this, apply the following procedure: - In Linux, you are currently in a shell session we call session 1 for this purpose. - Compile the Java file DaemonTest.java. - Adapt the shell script to match your environment. - Execute the shell script. This should run normally. - Terminate the daemon. - Repeat the test with the following differences: - Make a subdirectory of your current directory. - Change to that new subdirectory. - Open an additional shell session (we call this session 2. - From session 2, delete the current directory of session 1. - Now in session 1, execute the jsvc script as before. The error is: 23/05/2005 21:14:43 3205 jsvc.exec debug: user changed to 'root' 23/05/2005 21:14:43 3205 jsvc.exec debug: Using default JVM in /usr/java/j2re1.4.2/lib/i386/client/libjvm.so 23/05/2005 21:14:43 3205 jsvc.exec debug: Attemtping to load library /usr/java/j2re1.4.2/lib/i386/client/libjvm.so 23/05/2005 21:14:43 3205 jsvc.exec debug: JVM library /usr/java/j2re1.4.2/lib/i386/client/libjvm.so loaded 23/05/2005 21:14:43 3205 jsvc.exec debug: JVM library entry point found (0x40364788) 23/05/2005 21:14:43 3205 jsvc.exec debug: +-- DUMPING JAVA VM CREATION ARGUMENTS - 23/05/2005 21:14:43 3205 jsvc.exec debug: | Version: 10004 23/05/2005 21:14:43 3205 jsvc.exec debug: | Ignore Unrecognized Arguments: False 23/05/2005 21:14:43 3205 jsvc.exec debug: | Extra options: 2 23/05/2005 21:14:43 3205 jsvc.exec debug: | -Djava.class.path=/home/globale/daemon/classes:/usr/java/j2re1.4.2/lib/tools.jar:/usr/local/tomcat5/bin/commons-daemon.jar (0x) 23/05/2005 21:14:43 3205 jsvc.exec debug: +--- Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine current working directory. 23/05/2005 21:14:44 1442 jsvc.exec debug: Reloading service 23/05/2005 21:14:44 3211 jsvc.exec debug: user changed to 'root' 23/05/2005 21:14:44 3211 jsvc.exec debug: Using default JVM in /usr/java/j2re1.4.2/lib/i386/client/libjvm.so 23/05/2005 21:14:44 3211 jsvc.exec debug: Attemtping to load library /usr/java/j2re1.4.2/lib/i386/client/libjvm.so 23/05/2005 21:14:44 3211 jsvc.exec debug: JVM library /usr/java/j2re1.4.2/lib/i386/client/libjvm.so loaded 23/05/2005 21:14:44 3211 jsvc.exec debug: JVM library entry point found (0x40364788) 23/05/2005 21:14:44 3211 jsvc.exec debug: +-- DUMPING JAVA VM CREATION ARGUMENTS - 23/05/2005 21:14:44 3211 jsvc.exec debug: | Version: 10004 23/05/2005 21:14:44 3211 jsvc.exec debug: | Ignore Unrecognized Arguments: False 23/05/2005 21:14:44 3211 jsvc.exec debug: | Extra options: 2 23/05/2005 21:14:44 3211 jsvc.exec debug: | -Djava.class.path=/home/globale/daemon/classes:/usr/java/j2re1.4.2/lib/tools.jar:/usr/local/tomcat5/bin/commons-daemon.jar (0x) 23/05/2005 21:14:44 3211 jsvc.exec debug: +--- Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine current working directory. 23/05/2005 21:14:45 1442 jsvc.exec debug: Reloading service This runs indefinitely and the log file eventually runs out of space. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35017] - [commons-daemon]: jsvc hangs on JRE error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35017. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35017 --- Additional Comments From [EMAIL PROTECTED] 2005-05-23 09:28 --- Created an attachment (id=15128) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=15128action=view) A simple test file DaemonTest.java -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35017] - [commons-daemon]: jsvc hangs on JRE error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35017. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35017 --- Additional Comments From [EMAIL PROTECTED] 2005-05-23 09:28 --- Created an attachment (id=15129) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=15129action=view) A simple shell script to launch jsvc -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 35017] - [daemon] jsvc hangs on JRE error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=35017. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=35017 [EMAIL PROTECTED] changed: What|Removed |Added Summary|[commons-daemon]: jsvc hangs|[daemon] jsvc hangs on JRE |on JRE error|error -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34140] - [daemon] jsvc does not block on Linux
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34140. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34140 [EMAIL PROTECTED] changed: What|Removed |Added Severity|critical|enhancement -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34852] - [daemon] jsvc crashes with -user root
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34852. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34852 --- Additional Comments From [EMAIL PROTECTED] 2005-05-17 10:10 --- Does java work as root (changing jsvc by java in your script)? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r170536 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Tue May 17 01:02:30 2005 New Revision: 170536 URL: http://svn.apache.org/viewcvs?rev=170536view=rev Log: Allow jsvc to start as normal user in linux. Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=170536r1=170535r2=170536view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue May 17 01:02:30 2005 @@ -142,8 +142,13 @@ static int linuxset_user_group(char *user, int uid, int gid) { /* set capabilities enough for binding port 80 setuid/getuid */ -if (set_caps(CAPS)!=0) -return(-1); +if (set_caps(CAPS)!=0) { +if (getuid()!= uid) { +log_error(set_caps(CAPS) failed); +return(-1); +} +log_debug(set_caps(CAPS) failed); +} /* make sure they are kept after setuid */ if (prctl(PR_SET_KEEPCAPS,1,0,0,0) 0) { @@ -158,8 +163,13 @@ } /* set capability to binding port 80 read conf */ -if (set_caps(CAPSMIN)!=0) -return(-1); +if (set_caps(CAPSMIN)!=0) { +if (getuid()!= uid) { +log_error(set_caps(CAPSMIN) failed); +return(-1); +} +log_debug(set_caps(CAPSMIN) failed); +} return(0); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169598 - /jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Author: jfclere Date: Wed May 11 01:01:33 2005 New Revision: 169598 URL: http://svn.apache.org/viewcvs?rev=169598view=rev Log: don't do check if starting (check intances the class). Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=169598r1=169597r2=169598view=diff == --- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Wed May 11 01:01:33 2005 @@ -479,8 +479,8 @@ } /* Do we have to do a check-only initialization? */ -if (java_check(args)!=true) return(2); -else if (args-chck==true) { +if (args-chck==true) { +if (java_check(args)!=true) return(2); printf(Service \%s\ checked successfully\n,args-clas); return(0); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34851] - [commons-daemon]: jsvc should instantiate server only once
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34851. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34851 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-05-11 10:48 --- It is fixed. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34851] - [daemon] jsvc should instantiate server only once
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34851. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34851 [EMAIL PROTECTED] changed: What|Removed |Added Summary|[commons-daemon]: jsvc |[daemon] jsvc should |should instantiate server |instantiate server only once |only once | -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34852] - [daemon] jsvc crashes with -user root
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34852. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34852 [EMAIL PROTECTED] changed: What|Removed |Added Summary|[commons-daemon]: jsvc |[daemon] jsvc crashes with - |crases with -user root |user root -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 34852] - [daemon] jsvc crashes with -user root
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=34852. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=34852 --- Additional Comments From [EMAIL PROTECTED] 2005-05-11 11:15 --- Check /root/.java.policy and the user one. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r169610 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/man: ./ jsvc.1.xml
Author: jfclere Date: Wed May 11 02:44:08 2005 New Revision: 169610 URL: http://svn.apache.org/viewcvs?rev=169610view=rev Log: Submitted by Arnaud Vandyck avdyk at debian dot org Added: jakarta/commons/proper/daemon/trunk/src/native/unix/man/ jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml Added: jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml?rev=169610view=auto == --- jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml (added) +++ jakarta/commons/proper/daemon/trunk/src/native/unix/man/jsvc.1.xml Wed May 11 02:44:08 2005 @@ -0,0 +1,156 @@ +?xml version=1.0 encoding=utf-8? +!DOCTYPE refentry PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN + http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; +refentry id='jsvc1' + refmeta +refentrytitleJSVC/refentrytitle +manvolnum1/manvolnum +refmiscinfo class='date'October 2004/refmiscinfo +refmiscinfo class='source'Jsvc version 1.0/refmiscinfo +refmiscinfo class='manual'Jakarta project/refmiscinfo + /refmeta + refnamediv id='name' +refnamejsvc/refname +refpurposeapplication to launch java daemon/refpurpose + /refnamediv + !-- body begins here -- + refsynopsisdiv id='synopsis' +cmdsynopsis + commandjsvc/command + arg choice='opt'-jvm replaceableJVM name/replaceable/arg + arg choice='opt'-classpath replaceablepath/replaceable/arg + arg choice='opt'-cp replaceablepath/replaceable/arg + arg choice='opt'-home replaceabledirectory/replaceable/arg + arg choice='opt'-version/arg + arg choice='opt'-help/arg + arg choice='opt'-?/arg + arg choice='opt'-nodetach/arg + arg choice='opt'-debug/arg + arg choice='opt'-check/arg + arg choice='opt'-user/arg + arg choice='opt'-verbosereplaceable:class|gc|jni/replaceable/arg + arg choice='opt'-outfile replaceable/full/path/to/file/replaceable/arg + arg choice='opt'-errfile replaceable/full/path/to/file/replaceable/arg + arg choice='opt'-pidfile replaceable/full/path/to/file/replaceable/arg + arg choice='opt'-Dproperty=replaceablevalue/replaceable/arg + arg choice='opt'-Xreplaceableoption/replaceable/arg + !-- end of the new arguments -- +/cmdsynopsis + /refsynopsisdiv + refsect1 id=description +titleDESCRIPTION/title +paracommandjsvc/command executes emphasis remap=Iclassfile/emphasis +that implements a Daemon interface./para + /refsect1 + + refsect1 id=options +titleOPTIONS/title + +variablelist remap=TP + varlistentry +termoption-jvm/option JVM name/term +listitem + parause a specific Java Virtual Machine./para +/listitem + /varlistentry + varlistentry +termoption-cp/ -classpath/option directory and zip/jar + files/term +listitem + paraset search path for service classes and resouces/para +/listitem + /varlistentry + varlistentry +termoption-home/option directory/term +listitem + paraset the path of your JDK or JRE installation (or set + the JAVA_HOME environment variable) + /para +/listitem + /varlistentry + varlistentry +termoption-version/option/term +listitem + parashow the current Java environment version (to check + correctness of -home and -jvm. Implies -nodetach)/para +/listitem + /varlistentry + varlistentry +termoption-help/option/term +listitem + parashow this help page (implies -nodetach)/para +/listitem + /varlistentry + varlistentry +termoption-nodetach/option/term +listitem + paradon't detach from parent process and become a daemon/para +/listitem + /varlistentry + varlistentry +termoption-debug/option/term +listitem + paraverbosely print debugging information/para +/listitem + /varlistentry + varlistentry +termoption-check/option/term +listitem + paraonly check service (implies -nodetach)/para +/listitem + /varlistentry + varlistentry +termoption-user/option/term +listitem + parauser used to run the daemon (defaults to current user)/para +/listitem + /varlistentry + varlistentry +termoption-verbose[:class|gc|jni]/option/term +listitem + paraenable verbose output/para +/listitem + /varlistentry + varlistentry +termoption-outfile/option /full/path/to/file/term +listitem + paraLocation for output from stdout (defaults to /dev/null). Use