File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes startup.sh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "startup.sh" Watch "startup.sh" New topic
Author

startup.sh

Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
I've installed tomcat-jakarta 3.3 and java 1.3.1 on Linux. I set the JAVA_HOME, PATH and TOMCAT_HOME environment variables. However when I run bin/startup.sh, all that happens is my environment variables are echoed back to the screen. It also starts about 10 java processes, but if I try to load the home page, nothing happens.
Why is this not starting up correctly?
Thanks
Brian
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15646
    
  15

Are you talking to the correct TCP port? For Tomcat 3, you whant "http://localhost:8080", unless the conf/server.xml file has been customized.
You can also check the logs.


Customer surveys are for companies who didn't pay proper attention to begin with.
Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
yes, i'm using the default port. I haven't changed anything other than setting the environment variables. I had to install java as the root user and I installed tomcat as a different user. Could it be a permissions problem on reading the Java installation?
Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15646
    
  15

You can do:
ps --width 180 ax | grep java
to check if the Tomcat threads are still running after a minute or 2. If they are, chances are you're you're not addressing the right port. Use:
/usr/sbin/lsof | grep java | grep LISTEN
to see what ports Tomcat's listening on (you may need to install the "lsof" -- list open files) program.
The Catalina RPM version of Tomcat is using port 8180. The DOCUMENTED default port for Catalina is 8080. So much for documentation...
Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
I tried uninstalling tomcat, and reinstalling it. I still have the same problem. Only my environment variables are echoed back to the screen.
It creates about 12 java processes, looking like:
21752 pts/1 S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -D
java.security.policy==/usr/jakarta-tomcat-3.3/conf/tomcat.policy -Dtomcat.home=/
usr/jakarta-tomcat-3
These processes seem to hang around. I haven't changed any of the settings, so I would think that port 8080 would be correct. I have waited several minutes to see if it just takes a while to start up, and still nothing ever comes up.
The java I installed was java1.3.1_01 and there was already a jave runtime for 1.2 on the machine, but I would think that setting the Java home and Path would take care of a conflict there.
Thanks for the help
Brian
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15646
    
  15

Tomcat seems to be running OK. I'd definitely run "lsof" though. Don't assume the port's really 8080 just because you haven't done anything. Like I said, the Catalina RPM distro defaults to 8180!
Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
I installed lsof and ran it, but the command:
/usr/sbin/lsof | grep java | grep LISTEN
didn't bring anything back, so I'm not sure how to get the port number. If I just run:
/usr/bin/lsof | grep java
I get a bunch of things running. The other thing that I tried is running lynx to try and bring it up, and I do not get anything. I am on the box doing:
lynx http://localhost:8080
So I am kind of stuck. Does anyone else have any ideas or things that I should check?
Thanks
Brian
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: startup.sh
 
Similar Threads
JBOSS Installation in Solaris
Tomcat installation on Linux.. Please help..
Setting up JAVA_HOME variable in Ubuntu 10.10
Plz Help(Reg. TomCat Installation)
How to configure OSX for Tomcat?