Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th July 2007, 02:01 AM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
Tomcat5 trouble on Fedora Core 6, how do I start tomcat 5?

I've tried to run the tomcat5 script everyway I know how, but I still get the following:

[root@localhost init.d]# tomcat5 start
Found JAVA_HOME: /usr/lib/java
Please complete your /etc/tomcat5/tomcat5.conf so we won't have to look for it next time
Using CATALINA_BASE: /usr
Using CATALINA_HOME: /usr
Using CATALINA_TMPDIR: /usr/temp
Using JRE_HOME:
touch: cannot touch `/usr/logs/catalina.out': No such file or directory
/usr/bin/dtomcat5: line 325: /usr/logs/catalina.out: No such file or directory
/usr/bin/dtomcat5: line 334: /var/run/tomcat5.pid: Permission denied
[root@localhost init.d]# exit

I've also tried running another script with the same name tomcat5 from the /usr/bin directory.
No help there. I am not sure why the CATALINA_BASE and HOME are being set the /usr directories.
I am very tired and have been at this a while. I could easily be missing something simple, but I must rest now.
Whatever help you can give to get tomcat5 running on my machine will be appreciated.!
Thank You
Tom Z.
  #2  
Old 18th July 2007, 02:09 AM
quark4181 Offline
Registered User
 
Join Date: Nov 2005
Location: Washington State
Posts: 15
How did you install tomcat? From a rpm or a tar? If you didn't install it via yum the start/stop bits are annoying.

You can reset your CATALINA_HOME and other variables using the export command to help you debug the problem. (you probably knew that).
__________________
Registered Linux User #447340
  #3  
Old 18th July 2007, 02:49 AM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
quark4181
I got/installed tomcat5 when I upgraded from fedora core 4 to fedora core 6. (I did a custom install of Fedora 6 - so I didn't overwrite some of my partitions [my /home partition for example]) After I did the install I did a yum update and put everything that comes with fedora 6 on my machine. That's how I got tomcat5. Now, I have to fiqure out how to run the darn thing.
Thanks for your sugestion of setting the CATALINA_HOME variables using the export command. - I would of thought of that myself If I wasn't as sleepy as I am now.
Thanks again.
- Tom Z.
  #4  
Old 18th July 2007, 05:11 PM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
Yes, I'm adding to my previous post.
I have some time now, so I'll be trying to debug this problem.
(The problem - how to get tomcat5 running on fedora core 6)
I'll post back when I have more information.
If anyone has any comments or advice in the meantime, it will be most appreciated.
Thanks in advance.

- Tom Z.
  #5  
Old 18th July 2007, 10:41 PM
drobbins Offline
Registered User
 
Join Date: Jan 2004
Location: North Carolina
Posts: 190
somehow it's setting CATALINA_BASE wrong
it should be the directory tomcat is installed in which shouldn't be /usr
when it tries to "touch /usr/logs/catalina.log" it can't because the directory /usr/logs doesn't exist I bet
(confirm that)
how did you install tomcat?

Dave
  #6  
Old 18th July 2007, 11:23 PM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
drobbins,
You are correct the directory /usr/logs does not exist.
I too realized that CATALINA_BASE is being incorrectly set and am trying to track that down.
As for installing TOMCAT ... I didn't. I just accepted what Fedora core 6 gave me. This worked fine for that other web server, Apache. [ I only had to make minor tweaks on apache, to make it work only on localhost - and then I was done.. I also had to run it as root]
So there may be an installation step I should be doing for tomcat5, does anyone know?
Thanks in advance.

- Tom Z
  #7  
Old 18th July 2007, 11:51 PM
drobbins Offline
Registered User
 
Join Date: Jan 2004
Location: North Carolina
Posts: 190
look in /etc/tomcat5/tomcat5.conf
mine has lines that look like this

Code:
# you could also override JAVA_HOME here
# Where your java installation lives
JAVA_HOME="/usr/lib/jvm/java"

# Where your tomcat installation lives
# That change from previous RPM where TOMCAT_HOME 
# used to be /var/tomcat.
# Now /var/tomcat will be the base for webapps only
CATALINA_HOME="/usr/share/tomcat5"
JASPER_HOME="/usr/share/tomcat5"
CATALINA_TMPDIR="/usr/share/tomcat5/temp"
as you can see those variables point to the tomcat install dir
I'm running F7 and installed tomcat with yum

Dave

Last edited by drobbins; 18th July 2007 at 11:53 PM.
  #8  
Old 19th July 2007, 12:13 AM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
Dave,

I too have the lines in my conf file:

# you could also override JAVA_HOME here
# Where your java installation lives
export JAVA_HOME="/usr/lib/jvm/java"
export JRE_HOME="/usr/lib/jvm/java"

# Where your tomcat installation lives
# That change from previous RPM where TOMCAT_HOME
# used to be /var/tomcat.
# Now /var/tomcat will be the base for webapps only
echo "In the config file"
CATALINA_HOME="/usr/share/tomcat5"
JASPER_HOME="/usr/share/tomcat5"
CATALINA_TMPDIR="/usr/share/tomcat5/temp"
JAVA_ENDORSED_DIRS="/usr/share/tomcat5/common/endorsed"

I threw the echo in there to make sure that this file is being included. It is. I also added the exportsabove. But somehow these variables get unset, or reset to something else.

In my investigations it looks like the file dtomcat5 is the culprit.

I've tried running tomcat5 a few ways:
from /usr/bin/tomcat5 start
which asks for a password for the tomcat user id (which I already have set up)
however still has the CATALINA_HOME problem
I've also run the command from /etc/init.d/tomcat5 start
and it too had the CATALINA_HOME problem


I however found out they are all invoking dtomcat5 to run the server.
So there is where I'm looking now to fix it.

As for how I got tomcat,
I did a general YUM update to get everyting and the YUM gave me tomcat5.

So, thanks so far - but I am still unable to run tomcat5

More help needed.

- Tom Z
  #9  
Old 19th July 2007, 12:27 AM
drobbins Offline
Registered User
 
Join Date: Jan 2004
Location: North Carolina
Posts: 190
what the heck is dtomcat5??
in the past I've always setup tomcat by downloading the tarball so I'm no expert
find that file

find / -name dtomcat5

why do you think it's being called?

Dave
  #10  
Old 19th July 2007, 12:45 AM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
Dave,
I know the dtomcat5 file is being called because I've put echo's into the file and those echo's are being printed out.

Also , the file is hard coded in the file tomcat5 as
TOMCAT_SCRIPT=/usr/bin/dtomcat5

which is later called with
su - $TOMCAT_USER -c "$TOMCAT_SCRIPT $@"

So I'm pretty sure.

The file (On fedora 6) is located at /usr/bin
so the complete path to the file is /us/bin/dtomcat5

Thanks again, and specifically for your interest.

- Tom Z
  #11  
Old 19th July 2007, 12:59 AM
drobbins Offline
Registered User
 
Join Date: Jan 2004
Location: North Carolina
Posts: 190
here

Also , the file is hard coded in the file tomcat5 as
TOMCAT_SCRIPT=/usr/bin/dtomcat5

I assume you mean that's in /etc/init.d/tomcat5?
if so you either need to change that to point to /etc/tomcat5/tomcat5.conf or change /usr/bin/dtomcat5 to set all those environment variables properly
I have no idea why it's messed up, but at this point it's all about fixing it isn't it ;-)

Dave
  #12  
Old 19th July 2007, 01:16 AM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
Dave,
Yes, it's about fixing it. And I think I have a work around - for now.

#my change
CATALINA_HOME=""
#my change The offending line is below here:

if [ -z "$CATALINA_HOME" ]; then
[ -r "$TOMCAT_CFG" ] && . "${TOMCAT_CFG}"
fi
# the above line(s) were not including the configuration file becasue at this point
CATALINA_HOME somehow had the value "/usr"
I reset CATALINA_HOME to the empty string and now the settings in the configuration file are being included.

After I did this, there was another error
/usr/bin/dtomcat5: line 352: /var/run/tomcat5.pid: Permission denied
But to overcome that - I somply started tomcat using dtomcat5 instead of tomcat5
I also had to run dtomcat5 while signed in as root.

I would love to know what the appropriate way is - to set this up.
Especially for me to be able to run it as a tomcat user and not as root.
But for now I can get tomcat up and running.
Thanks for your help Dave
- Tom Z.
  #13  
Old 19th July 2007, 01:23 AM
drobbins Offline
Registered User
 
Join Date: Jan 2004
Location: North Carolina
Posts: 190
hehe
sounds like a mess
I'm kinda undecided about yum
in the past I've always just installed things by hand which can certainly be a pain in the butt, but at least you know what you did
yum is great if it works right but if it messes up you don't know what's going on
I'm a week into playing with F7 and yum has been my friend so far
I can edit videos with cinelerra and beryl is a hoot, all thanks to yum
I've never tried to update from 1 distro to another with it, that would scare the crap out of me
sounds like you getting it sorted out, good luck

Dave
  #14  
Old 19th July 2007, 01:32 AM
tomzam Offline
Registered User
 
Join Date: Jul 2007
Posts: 11
Dave,
I'm pretty brave but not so much that I would upgrade with YUM.
I upgraded with a good old fashoined CD. After I got FEDORA CORE 6 up and running using the CD, I then used the YUM update command to get a boatload of software that wasn't included on the cd.
Hope that clears up any confusion.

Later,

- Tom Z
  #15  
Old 19th July 2007, 01:49 AM
drobbins Offline
Registered User
 
Join Date: Jan 2004
Location: North Carolina
Posts: 190
wow
I'm surprised with that straight forward of an approach you'd have such a problem
F7 has rocked for me so far other than a problem with firewire support which I found a fix for here

Dave

Last edited by drobbins; 19th July 2007 at 01:51 AM.
Closed Thread

Tags
core, fedora, start, tomcat, tomcat5, trouble

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 10 Tomcat 6 Won't Start ole_ersoy Using Fedora 0 27th December 2008 11:46 PM
Fedora 7 Tomcat5 tomcat-users.xml Sammy_Sam Security and Privacy 0 13th August 2007 04:46 PM
tomcat5 - FC6 - does not start zydoon Servers & Networking 6 25th April 2007 06:01 PM
tomcat5 started with error, cant not login to tomcat manager lnthai2002 Servers & Networking 1 10th January 2007 06:39 PM


Current GMT-time: 05:46 (Wednesday, 23-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat