Re: can't run tomcat with jsvc

2005-01-03 Thread Haluk Durmus
Thanks for your response :)
Here is the output of strace:
execve(./Tomcat5.sh, [./Tomcat5.sh, start], [/* 47 vars */]) = 0
brk(0) = 0x80f
access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory)
open(/opt/wx/2.5/lib/i686/libtermcap.so.2, O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat64(/opt/wx/2.5/lib/i686, 0xbfffeb28) = -1 ENOENT (No such file or 
directory)
open(/opt/wx/2.5/lib/libtermcap.so.2, O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64(/opt/wx/2.5/lib, 0xbfffeb28) = -1 ENOENT (No such file or 
directory)
open(/etc/ld.so.cache, O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=110821, ...}) = 0
old_mmap(NULL, 110821, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open(/lib/libtermcap.so.2, O_RDONLY) = 3
read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\\r\0..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=11008, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40031000
old_mmap(NULL, 13992, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0x40032000
old_mmap(0x40035000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x40035000
close(3) = 0
open(/lib/libdl.so.2, O_RDONLY) = 3
read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\f\0..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=10897, ...}) = 0
old_mmap(NULL, 10640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0x40036000
old_mmap(0x40038000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x40038000
close(3) = 0
open(/lib/libc.so.6, O_RDONLY) = 3
read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0V\1\000..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1340609, ...}) = 0
old_mmap(NULL, 1152420, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 
3, 0) = 0x40039000
old_mmap(0x40149000, 28672, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10f000) = 0x40149000
old_mmap(0x4015, 9636, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4015
close(3) = 0
munmap(0x40015000, 110821) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
open(/dev/tty, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
close(3) = 0
brk(0) = 0x80f
brk(0x80f1000) = 0x80f1000
brk(0x80f2000) = 0x80f2000
getuid32() = 0
getgid32() = 0
geteuid32() = 0
getegid32() = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
time(NULL) = 1104745550
brk(0x80f3000) = 0x80f3000
brk(0x80f4000) = 0x80f4000
open(/etc/mtab, O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=181, ...}) = 0
old_mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40153000
read(3, /dev/hda2 / reiserfs rw 0 0\nproc..., 131072) = 181
close(3) = 0
munmap(0x40153000, 131072) = 0
open(/proc/meminfo, O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40153000
read(3, MemTotal: 448664 kB\nMemFre..., 1024) = 644
close(3) = 0
munmap(0x40153000, 4096) = 0
brk(0x80f5000) = 0x80f5000
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
uname({sys=Linux, node=mobil-data, ...}) = 0
brk(0x80f6000) = 0x80f6000
brk(0x80f7000) = 0x80f7000
stat64(/opt/tomcat/bin/jsvc-src/native, {st_mode=S_IFDIR|0755, 
st_size=1080, ...}) = 0
stat64(., {st_mode=S_IFDIR|0755, st_size=1080, ...}) = 0
getpid() = 4827
getppid() = 4826
brk(0x80f8000) = 0x80f8000
getpgrp() = 4826
rt_sigaction(SIGCHLD, {0x807abe0, [], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
open(./Tomcat5.sh, O_RDONLY|O_LARGEFILE) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xb19c) = -1 ENOTTY 
(Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR) = 0
read(3, #!/bin/sh\n##..., 80) = 80
_llseek(3, 0, [0], SEEK_SET) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
dup2(3, 255) = 255
close(3) = 0
fcntl64(255, F_SETFD, FD_CLOEXEC) = 0
fcntl64(255, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat64(255, {st_mode=S_IFREG|0755, st_size=2162, ...}) = 0
_llseek(255, 0, [0], SEEK_CUR) = 0
brk(0x80f9000) = 0x80f9000
brk(0x80fa000) = 0x80fa000
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
read(255, #!/bin/sh\n##..., 2162) = 2162
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0

Re: can't run tomcat with jsvc

2005-01-03 Thread Wolfgang Hackl
Haluk Durmus wrote:
I wan't to use Tomcat 5.5.6 as our default Webserver on port 80.
That's why I start it with jsvc, that should give the chance
to run on prots 1024  for nonroot-user.
but get Error-Message in log file:
[...]
jsvc.exec error: syscall failed in set_caps
jsvc.exec error: Service exit with a return value of 4

Hi Haluk,
I had the same problem on my Debian after a distribution upgrade from 
Woody with kernel 2.4.18 to Sarge and kernel 2.6.8. I traced the jsvc 
call with strace -f. So I got the following messages:

[pid 11313] capset(0x19980330, 0, {CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE}) = -1 EPERM (Operation not 
permitted)
[pid 11313] write(2, jsvc.exec error: , 17) = 17
[pid 11313] write(2, syscall failed in set_caps, 26) = 26
It seems that some things regarding security and/or cryptography have 
changed in the kernels. What helped me out of my situation was:
modprobe capability

Unfortunately, you did not post furter details describing your system. I 
Hope this helps anyway.

Wolfgang
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: can't run tomcat with jsvc

2005-01-03 Thread Haluk Durmus
Thanks,
I had the same problem on my Debian after a distribution upgrade from 
Woody with kernel 2.4.18 to Sarge and kernel 2.6.8. I traced the jsvc 
call with strace -f. So I got the following messages:

[pid 11313] capset(0x19980330, 0, 
{CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE}) = -1 EPERM (Operation not 
permitted)
[pid 11313] write(2, jsvc.exec error: , 17) = 17
[pid 11313] write(2, syscall failed in set_caps, 26) = 26

It seems that some things regarding security and/or cryptography have 
changed in the kernels. What helped me out of my situation was:
modprobe capability

This solved my problem with the Error set_caps.
My kernel:
Linux mobil-data 2.6.9 #3 Thu Dec 23 15:40:24 CET 2004 i686 unknown 
unknown GNU/Linux

But now I have an other one!
jsvc didn't bind to port 80
I start:
[EMAIL PROTECTED]:/opt/jakarta-tomcat-5.5.6/bin/jsvc-src/native# 
./Tomcat5.sh start

Error in catalino.out log:
Jan 3, 2005 2:24:34 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Permission denied:80
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
   at 
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:181)
   at org.apache.catalina.connector.Connector.start(Connector.java:990)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:459)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:218)
Jan 3, 2005 2:24:34 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  Protocol handler start failed: 
java.net.BindException: Permission denied:80
   at org.apache.catalina.connector.Connector.start(Connector.java:992)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:459)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2010)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:218)
Jan 3, 2005 2:24:34 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3041 ms




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: can't run tomcat with jsvc

2005-01-03 Thread Wolfgang Hackl
Haluk Durmus wrote:
Thanks,
I had the same problem on my Debian after a distribution upgrade from 
Woody with kernel 2.4.18 to Sarge and kernel 2.6.8. I traced the jsvc 
call with strace -f. So I got the following messages:

[pid 11313] capset(0x19980330, 0, 
{CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, 
CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE}) = -1 EPERM (Operation 
not permitted)
[pid 11313] write(2, jsvc.exec error: , 17) = 17
[pid 11313] write(2, syscall failed in set_caps, 26) = 26

It seems that some things regarding security and/or cryptography have 
changed in the kernels. What helped me out of my situation was:
modprobe capability

This solved my problem with the Error set_caps.

Nice to hear.
But now I have an other one!
jsvc didn't bind to port 80
Error in catalino.out log:
Jan 3, 2005 2:24:34 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Permission denied:80

Please verify that no http server (apache, squid etc.) is running -- 
only one process may use a port.

Wolfgang
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: can't run tomcat with jsvc

2005-01-03 Thread Haluk Durmus

Wolfgang Hackl wrote:
Please verify that no http server (apache, squid etc.) is running -- 
only one process may use a port.
No  Service is runing on port 80.
[EMAIL PROTECTED]:~# netstat -ltun
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 0.0.0.0:37  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:5190  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:1863  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:139 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:587 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:10125 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:110   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:79  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:111 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:4080  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:810.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:113 0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:820.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:915 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:21  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:22  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:119   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:631 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:25  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:5050  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:33371   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:445 0.0.0.0:*   LISTEN
udp0  0 0.0.0.0:512 0.0.0.0:*
udp0  0 0.0.0.0:518 0.0.0.0:*
udp0  0 192.168.0.235:137   0.0.0.0:*
udp0  0 0.0.0.0:137 0.0.0.0:*
udp0  0 192.168.0.235:138   0.0.0.0:*
udp0  0 0.0.0.0:138 0.0.0.0:*
udp0  0 0.0.0.0:37  0.0.0.0:*
udp0  0 0.0.0.0:111 0.0.0.0:*
udp0  0 0.0.0.0:631 0.0.0.0:*
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


can't run tomcat with jsvc

2005-01-02 Thread Haluk Durmus
Hello,
I wan't to use Tomcat 5.5.6 as our default Webserver on port 80.
That's why I start it with jsvc, that should give the chance
to run on prots 1024  for nonroot-user.
I start Tomcat5.sh with root-user (change to tomcat-user):
JAVA_HOME=/usr/lib/java
CATALINA_HOME=/opt/tomcat
DAEMON_HOME=${CATALINA_HOME}/bin/jsvc-src
TOMCAT_USER=tomcat
TMP_DIR=/var/tmp
CATALINA_OPTS=
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar
case $1 in
 start)
   #
   # Start Tomcat
   #
   $DAEMON_HOME/jsvc \
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -outfile $CATALINA_HOME/logs/catalina.out \
   -errfile '1' \
   $CATALINA_OPTS \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap \
   -verbose \
   -debug \
   ;;
 stop)
   #
   # Stop Tomcat
   #
   PID=`cat /var/run/jsvc.pid`
   kill $PID
   ;;
 *)
   echo Usage tomcat.sh start/stop
   exit 1;;
esac
but get Error-Message in log file:
jsvc.exec error: syscall failed in set_caps
jsvc.exec error: Service exit with a return value of 4



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: can't run tomcat with jsvc

2005-01-02 Thread QM
On Sun, Jan 02, 2005 at 09:41:07PM +0100, Haluk Durmus wrote:
: I wan't to use Tomcat 5.5.6 as our default Webserver on port 80.
: That's why I start it with jsvc, that should give the chance
: to run on prots 1024  for nonroot-user.
: but get Error-Message in log file:
: 
: jsvc.exec error: syscall failed in set_caps
: jsvc.exec error: Service exit with a return value of 4

Are you sure you're calling the Tomcat start script as root?

Send the output from strace and that will help us determine what's going
on.

I found my post from a long time ago, concerning this same error:

http://www.junlu.com/msg/87123.html

However, my hypothesis at the time was based on trying to call jsvc as a
nonroot user.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]