Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
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.
  1. #1
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    188

    [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!!!

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    try this
    Code:
    su -
    
    /opt/IBMJava2-141/bin/java -version
    does that report back the right java version?

    also while actually logged in as root try to start tomcat

    then maybe after its started
    Code:
    ps aux |grep tomcat
    
    lsof -i |grep tomcat
    let me know what you find

  3. #3
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    188
    Quote Originally Posted by jledhead View Post
    try this
    Code:
    su -
    
    /opt/IBMJava2-141/bin/java -version
    does that report back the right java version?

    also while actually logged in as root try to start tomcat

    then maybe after its started
    Code:
    ps aux |grep tomcat
    
    lsof -i |grep tomcat
    let me know what you find
    /opt/IBMJava2-141/bin/java -version : gives error no such directory
    i did to find java version
    Code:
     java -version
    which gives :
    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)
    Code:
    ps aux |grep tomcat
    gives
    root 2905 0.0 0.1 4212 732 pts/0 S+ 20:37 0:00 grep tomcat
    Code:
    lsof -i |grep tomcat
    gives nothing. i waited for a while to get nothing.
    also sever is still not responding.
    Sorry, Linux is not my passion .
    Its addiction!!!

  4. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    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
    Code:
    whereis java
    let me know if I can help more.

  5. #5
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    188
    Quote Originally Posted by jledhead View Post
    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
    Code:
    whereis java
    let me know if I can help more.
    Code:
    whereis java
    gives:
    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!!!

  6. #6
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    Quote Originally Posted by grishi_111 View Post
    Code:
    whereis java
    gives:
    java: /usr/bin/java
    just to make sure we know where java is

    Code:
    ls -l /usr/bin/java
    it is more than likely a symlink and that should give you the path to java

    whatever the path, for example, if its /opt/java/bin/java

    then make sure this gives info

    Code:
    /opt/java/bin/java -version
    obviously replacing the above paths with your symlink path we found above



    Code:
    export JAVA_HOME=/opt/IBMJava2-141
    there we go, taken from your /etc/profile, change that path to what we found above, the real path, not the link

    then either log out and back in or
    Code:
    source /etc/profile
    and try and start tomcat again.

  7. #7
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    188
    Quote Originally Posted by jledhead View Post
    just to make sure we know where java is

    Code:
    ls -l /usr/bin/java
    it is more than likely a symlink and that should give you the path to java

    whatever the path, for example, if its /opt/java/bin/java

    then make sure this gives info

    Code:
    /opt/java/bin/java -version
    obviously replacing the above paths with your symlink path we found above



    Code:
    export JAVA_HOME=/opt/IBMJava2-141
    there we go, taken from your /etc/profile, change that path to what we found above, the real path, not the link

    then either log out and back in or
    Code:
    source /etc/profile
    and try and start tomcat again.
    Code:
    ls -l /usr/bin/java
    gives
    lrwxrwxrwx 1 root root 22 2008-12-08 13:36 /usr/bin/java -> /etc/alternatives/java
    but
    Code:
    /opt/java/bin/java -version
    gives
    bash: /opt/java/bin/java: No such file or directory
    then i tried
    Code:
    /etc/alternatives/java -version
    which gives nothing.

    i tried manualy & find java in " /usr/java/jdk1.6.0_11".
    Sorry, Linux is not my passion .
    Its addiction!!!

  8. #8
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    I am guessing you have debian since you have /etc/alternatives

    so to be sure
    Code:
    ls -l /etc/alternatives/java
    which I am guessing will give you /usr/java/jdk1.6.0_11/bin/java

    so in your catalina.sh put /usr/java/jdk1.6.0_11 for JAVA_HOME, if thats where /etc/alternatives/java points to

  9. #9
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    188
    Quote Originally Posted by jledhead View Post
    I am guessing you have debian since you have /etc/alternatives

    so to be sure
    Code:
    ls -l /etc/alternatives/java
    which I am guessing will give you /usr/java/jdk1.6.0_11/bin/java

    so in your catalina.sh put /usr/java/jdk1.6.0_11 for JAVA_HOME, if thats where /etc/alternatives/java points to
    no! i m using fedora 10.
    Code:
     ls -l/etc/alternatives/java
    gives
    lrwxrwxrwx 1 root root 39 2008-12-28 21:39 /etc/alternatives/java -> /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
    Sorry, Linux is not my passion .
    Its addiction!!!

  10. #10
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    /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.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •