Results 1 to 10 of 15
hi everyone!!!
i have installed tomcat-6.0.18
everything was allright.
this commond gives output:
su - tomcat -c /opt/tomcat/bin/startup.sh
Password: ********
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-28-2008 #1
[SOLVED] tomcat not working
hi everyone!!!
i have installed tomcat-6.0.18
everything was allright.
this commond gives output:
su - tomcat -c /opt/tomcat/bin/startup.sh
Password: ********
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /opt/IBMJava2-141
and
su - tomcat -c /opt/tomcat/bin/shutdown.sh
Password:
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /opt/IBMJava2-141
/opt/tomcat/bin/catalina.sh: line 314: /opt/IBMJava2-141/bin/java: No such file or directory
i tried to access server by browser by: "http://localhost:8080"
but no response except [b] failled to connect.
what went wrong?
plz help!!!Sorry, Linux is not my passion
.
Its addiction
!!!
- 12-30-2008 #2
try this
does that report back the right java version?Code:su - /opt/IBMJava2-141/bin/java -version
also while actually logged in as root try to start tomcat
then maybe after its started
let me know what you findCode:ps aux |grep tomcat lsof -i |grep tomcat
- 12-31-2008 #3
/opt/IBMJava2-141/bin/java -version : gives error no such directory
i did to find java version
which gives :Code:java -version
java version "1.6.0_0"
IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 10.0-b19, mixed mode)
givesCode:ps aux |grep tomcat
root 2905 0.0 0.1 4212 732 pts/0 S+ 20:37 0:00 grep tomcat
gives nothing. i waited for a while to get nothing.Code:lsof -i |grep tomcat
also sever is still not responding.Sorry, Linux is not my passion
.
Its addiction
!!!
- 12-31-2008 #4
you have a jre_home variable defined somewhere that is wrong. have you created that variable, like in your /etc/profile or bash.rc file?
probably the easist will be to edit the startup script you are using. I don't have a tomcat install available right now so this is from memory, there should already be a JAVA_HOME or JRE_HOME variable defined, either in the startup script or the catalina.sh script (looking at your error again it looks like its line 314 in catalina.sh, check that first)
you need to find java first
let me know if I can help more.Code:whereis java
- 12-31-2008 #5gives:Code:
whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz
i tried to explore /etc/profile
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|
$1($|
" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
#ksh workaround
export JAVA_HOME=/opt/IBMJava2-141
export CATALINA_HOME=/opt/tomcat
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
pathmunge /sbin after
fi
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
unset i
unset pathmunge
61,1 Bot
sorry for icons that appeared.Sorry, Linux is not my passion
.
Its addiction
!!!
- 12-31-2008 #6
just to make sure we know where java is
it is more than likely a symlink and that should give you the path to javaCode:ls -l /usr/bin/java
whatever the path, for example, if its /opt/java/bin/java
then make sure this gives info
obviously replacing the above paths with your symlink path we found aboveCode:/opt/java/bin/java -version
there we go, taken from your /etc/profile, change that path to what we found above, the real path, not the linkCode:export JAVA_HOME=/opt/IBMJava2-141
then either log out and back in or
and try and start tomcat again.Code:source /etc/profile
- 12-31-2008 #7givesCode:
ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2008-12-08 13:36 /usr/bin/java -> /etc/alternatives/java
but
givesCode:/opt/java/bin/java -version
bash: /opt/java/bin/java: No such file or directory
then i tried
which gives nothing.Code:/etc/alternatives/java -version
i tried manualy & find java in " /usr/java/jdk1.6.0_11".Sorry, Linux is not my passion
.
Its addiction
!!!
- 12-31-2008 #8
I am guessing you have debian since you have /etc/alternatives
so to be sure
which I am guessing will give you /usr/java/jdk1.6.0_11/bin/javaCode:ls -l /etc/alternatives/java
so in your catalina.sh put /usr/java/jdk1.6.0_11 for JAVA_HOME, if thats where /etc/alternatives/java points to
- 12-31-2008 #9
- 12-31-2008 #10
/usr/lib/jvm/jre-1.6.0-openjdk
there you go, try adding that for your JAVA_HOME or JRE_HOME in catalina.sh and see if it works.




