LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-21-2007, 11:24 AM   #1
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Rep: Reputation: 30
Installing Tomcat on Ubuntu 7.10


Hi Guys

I've tried to install tomcat5.5 on ubuntu 7.10 using Synaptic, I also checked the webadmin feature and the webapps package for tomcat, and installed anything else it prompted me to as dependancies

Synaptic goes and downloads whatever it needs, then tries to install and I'm presented with the following error message...

Code:
E: tomcat5.5: subprocess post-installation script returned error exit status 1
E: tomcat5.5-admin: dependency problems - leaving unconfigured
E: tomcat5.5-webapps: dependency problems - leaving unconfigured
I'm not sure whats going on here, is it a case of that it has installed, just didnt set it up for me?

Please advise me as to what to do here

Thanks for your time
 
Old 12-21-2007, 12:01 PM   #2
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Original Poster
Rep: Reputation: 30
Just to add

I've tried installing on my second ubuntu PC, but getting the same errors
 
Old 12-28-2007, 08:15 AM   #3
islandBilly
LQ Newbie
 
Registered: Dec 2007
Location: Bahamas
Distribution: Mint 19.3 Tricia
Posts: 19

Rep: Reputation: 0
I too have tried to install Tomcat5.5 on Ubuntu 7.04, with the same result. Looking around the various etc and usr directories, I think Tomcat has indeed been installed, but as the messages indicate, there is a problem with post-installation configuration, meaning the startup script that was written to init.d has errors that make Tomcat fail to start up. It is not listed as a service. So I came here hoping for help in fixing the script. There was some mention of Tomcat5.5 being intended for a java version beyond 1.4, which is what Ubuntu seems to be running, so I am going to check on that part of it - but let me know if you get a fix before I can come back with mine ;-)
 
Old 12-28-2007, 09:52 AM   #4
islandBilly
LQ Newbie
 
Registered: Dec 2007
Location: Bahamas
Distribution: Mint 19.3 Tricia
Posts: 19

Rep: Reputation: 0
Okay, here is what I'm seeing:
In /etc/init.d/tomcat5.5, the startup script as I understand, the JAVA_HOME variable is not being set, because the lines:

# Look for the right JVM to use
for jdir in $JDK_DIRS; do
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
JAVA_HOME_TMP="$jdir"
# checks for a real JDK like environment, needed to check if
# really the java-gcj-compat-dev package is installed
if [ -r "$jdir/bin/jdb" ]; then
JAVA_HOME="$JAVA_HOME_TMP"
fi
fi
done
export JAVA_HOME


do not find a directory in $JDK_DIRS that contains /bin/jdb. For me, the closest value in $JDK_DIRS (which is set near the top of the script) was /usr/lib/jvm/java-gcj .

So it looks to me as if the fix is to find the real location of the jdk, as evidenced by the presence of both a /bin/java and a /bin/jdb directory, and put that into $JAVA_HOME in the /etc/default/tomcat5.5 script file.

I have looked all through the usual suspects and cannot find a /bin directory with both of those subdirectories, so I'm stuck. Any ideas on where the jdk got installed on Ubu7.04?

Last edited by islandBilly; 12-28-2007 at 12:07 PM.
 
Old 12-28-2007, 01:20 PM   #5
islandBilly
LQ Newbie
 
Registered: Dec 2007
Location: Bahamas
Distribution: Mint 19.3 Tricia
Posts: 19

Rep: Reputation: 0
Progress: I have found the right value to give JAVA_HOME in /etc/default/tomcat5.5:
/usr/lib/jvm/java-gcj


Let me point out that I am running Eclipse 3.2, and what I did was go into /etc/eclipse/java_home and see what it was running. The top choice was the one above, which I knew from a lot of previous searching actually exists on my machine. Once I put it into the default file, the startup script ran. :-)

BUT even though it starts, Tomcat does not show up in the Services box as a service, and it doesn't process a jsp. When I ran /etc/inti.d/tomcat5.5 status, it said Tomcat is not running.
 
Old 12-29-2007, 11:45 AM   #6
islandBilly
LQ Newbie
 
Registered: Dec 2007
Location: Bahamas
Distribution: Mint 19.3 Tricia
Posts: 19

Rep: Reputation: 0
One more thing: after Tomcat seemed to start but not run, I re-installed sun-6-jdk. Then I found that the /usr/lib/jvm/java-6-sun-1.6.0.00/bin directory contained the mysterious jdb, as well as java and javac; so I made that the JAVA_HOME. That resulted in an error, so on a hunch I took away the bin part, and just made JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00/

That has resulted in the now-familiar behaviour that tomcat starts ok, but is not running when you go check status. So what does it take to get tomcat to run??
 
Old 12-31-2007, 12:45 PM   #7
islandBilly
LQ Newbie
 
Registered: Dec 2007
Location: Bahamas
Distribution: Mint 19.3 Tricia
Posts: 19

Rep: Reputation: 0
Final bit: today, when I booted up, Tomcat started working! Honestly, I don't know why. The only change I made since last entry was to get rid of the gcj java in Eclipse and replace it with java-sun-6. That made ant start working properly. But what made Tomcat start working, or rather, why it didn't start working before, I do not know.

Now I just need to figure out where my connect/J jar file went!
 
Old 12-31-2007, 10:19 PM   #8
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Rep: Reputation: 30
Just wanted to let you know that if you check ubuntuforums you will find a nice tutorial about installing tomcat. It says that there is a problem with the tomcat available in the synaptics. In that tutorial they show how to install the latest version of tomcat and jre from the binary files available in sun website. Unfortunately I have not bookmarked the address, but a quick search on google should direct you to the tutorial.
 
Old 01-01-2008, 05:08 PM   #9
islandBilly
LQ Newbie
 
Registered: Dec 2007
Location: Bahamas
Distribution: Mint 19.3 Tricia
Posts: 19

Rep: Reputation: 0
Smile now it's really working

thanks very much - I chucked the synaptic version and downloaded the official Tomcat one, following directions here:http://ubuntuforums.org/showthread.p...omcat+install:)
 
  


Reply

Tags
tomcat



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any problems using Ubuntu desktop as an apache/tomcat/mysql server? glennyboi Ubuntu 2 05-18-2007 01:51 PM
can't installing tomcat nukeu666 Linux - General 3 12-21-2005 04:13 PM
Installing Tomcat 5.5 where did I go WRONG? bstuart Linux - Software 3 06-14-2005 06:28 PM
Installing Tomcat Hiper1 Linux - Newbie 1 03-12-2005 10:07 PM
Installing Tomcat on RedHat 8 shadowbird Programming 7 06-30-2003 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration