Differences between revisions 10 and 11
Revision 10 as of 2013-02-11 10:30:00
Size: 3759
Comment: Add an answer to the question of using pre-packaged versions of Tomcat.
Revision 11 as of 2014-03-03 10:19:28
Size: 3870
Comment: Amend "Linux distributions" section
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
Moreover, some of those packages are notably outdated.
Line 30: Line 32:
 * Download a "binary" version. Either a "tar.gz" or a "zip" file is fine. There is usually no need to re-compile Tomcat from the source code.
 *
The "tar.gz" files use GNU extensions to the tar file format. You need a GNU-compatible version of `tar` to unpack them.
 * Download a "binary" version. There is usually no need to re-compile Tomcat from the source code.
 *
Either a "tar.gz" or a "zip" file is fine. The "tar.gz" files use GNU extensions to the tar file format (as mentioned in "README" file in the download area). You need a GNU-compatible version of `tar` to unpack them.

Preface

Questions

  1. I have Tomcat x.y.z installed as part of my OS. Is it good to use?

  2. When I run ps (on Linux), why do I see my java process a bazillion times!

  3. How do I run without an X server and still get graphics?

  4. Tomcat dies after I log out!

  5. Catalina.log contains : "SEVERE: StandardServer.await: create[8005] : Throwable occurred: java.net.BindException: The socket name is not available on this system."

Answers

I have Tomcat x.y.z installed as part of my OS. Is it good to use?

Many Linux distributions provide a pre-packaged version of Apache Tomcat.

These packages work fine and are easy to install for a normal single-instance case, but they make it more difficult for more specific use cases, and more difficult for people on the Tomcat User mailing list to help you. That is because each of these packages distributes the files of Tomcat in different places on the disk, sets different environment variables, sets different links from one directory to the other in the filesystem, etc.. Moreover, some of those packages are notably outdated.

So it would be better to install a "standard" tomcat downloaded from the website http://tomcat.apache.org/, to some directory like /opt/tomcat, and follow the instructions that are given in the "RUNNING.txt" file.

This way, everyone here knows what you are talking about and has a good idea of where things are.

Several notes:

  • Download a "binary" version. There is usually no need to re-compile Tomcat from the source code.
  • Either a "tar.gz" or a "zip" file is fine. The "tar.gz" files use GNU extensions to the tar file format (as mentioned in "README" file in the download area). You need a GNU-compatible version of tar to unpack them.

  • Learn how to run Tomcat with separate values of CATALINA_HOME and CATALINA_BASE, as explained in "RUNNING.txt". This will simplify further upgrades and maintenance.

When I run ps (on Linux), why do I see my java process a bazillion times!

Linux implemented threads as processes. Due to other gory details that is beyond the scope of this FAQ - the ps command doesn't work correctly with respect to threads. You can get more gory details here and here .

How do I run without an X server and still get graphics?

You either need to run headless or run an alternate X-server. Some more information can be found here, here, or here. Or if your are using a JVM 1.4 or better, you can use the system property java.awt.headless=true

Tomcat dies after I log out!

This is a common complaint when using Solaris. Make sure you use nohup and see this thread

Error message: "SEVERE: StandardServer.await: create[8005]: Throwable occurred: java.net.BindException: The socket name is not available on this system."

This error message can have 2 causes:

  1. Java on AIX isn't supporting IPv6 properly. Fix by inserting -Djava.net.preferIPv4Stack=true into JAVA_OPTS

  2. Your networking configuration is not correct. If you attempt to ping localhost and don't see 127.0.0.1 you need to look into your /etc/host.conf (most Unixes/Linux) or /etc/netsvc.conf (AIX) file to ensure that something like "hosts = local, bind" is present.


CategoryFAQ

FAQ/Linux_Unix (last edited 2014-03-03 10:39:29 by KonstantinKolinko)