You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Konstantin Kolinko (Confluence)" <no...@apache.org> on 2019/11/25 00:40:08 UTC

[CONF] Apache Tomcat > Linux Unix

There's **1 new edit** on this page  
---  
|  
---  
|  | [![page icon](cid:page-
icon)](https://cwiki.apache.org/confluence/display/TOMCAT/Linux+Unix?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1574642408358&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa9809569d423cd016a0413306f00db&src.mail.action=view
"page icon")  
---  
[Linux
Unix](https://cwiki.apache.org/confluence/display/TOMCAT/Linux+Unix?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1574642408358&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa9809569d423cd016a0413306f00db&src.mail.action=view
"Linux Unix")  
|  |  |  |  | ![](cid:avatar_892fc5b633a433d86a56f192323474ea) |  | Konstantin
Kolinko edited this page  
---  
|  
|  | Here's the version comment  
---  
|  
---  
|  |  | ![](cid:avatar_892fc5b633a433d86a56f192323474ea) |  | Konstantin
Kolinko edited at [12:33
AM](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=103098909)  
---  
|  |  |  Add a permalink. Fix formatting and links.  
---  
|  
|  | Here's what changed:  
---  
|

_Permalink_ to this page: [
https://cwiki.apache.org/confluence/x/HSolBg](https://cwiki.apache.org/confluence/x/HSolBg)

## Preface

## Questions

  1. [I have Tomcat x.y.z installed as part of my OS. Is it good to use?](/confluence/pages/viewpage.action?pageId=103098909)
  2. [When I run ps (on Linux), why do I see my java process a bazillion times!](/confluence/pages/viewpage.action?pageId=103098909)
  3. [How do I run without an X server and still get graphics?](/confluence/pages/viewpage.action?pageId=103098909)
  4. [Tomcat dies after I log out!](/confluence/pages/viewpage.action?pageId=103098909)
  5. [Catalina.log contains : "SEVERE: StandardServer.await: create[8005] : Throwable occurred: java.net.BindException: The socket name is not available on this system.](/confluence/pages/viewpage.action?pageId=103098909)

  6. [Examples web application does not start. A ClassNotFoundException occurs.](/confluence/pages/viewpage.action?pageId=103098909)

## Answers

###  |
![](https://cwiki.apache.org/confluence/s/en_GB/8100/6ef1ce95c788ac159314a8fa6387047b8d1cc9fb/_/images/icons/macrobrowser/dropdown/anchor.png)
Anchor  
---  
|  | Q5  
---|---  
| Q5  
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](https://tomcat.apache.org/lists.html#tomcat-users) 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 [https://tomcat.apache.org/](https://tomcat.apache.org/), to some
directory like `/opt/tomcat`, and follow the instructions that are given in
the "RUNNING.txt" file.

...

  * 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.

###
![](https://cwiki.apache.org/confluence/s/en_GB/8100/6ef1ce95c788ac159314a8fa6387047b8d1cc9fb/_/images/icons/macrobrowser/dropdown/anchor.png)
Anchor  
---  
|  | Q1  
---|---  
| Q1  
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](http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html) and
[here](http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html#D) .

###
![](https://cwiki.apache.org/confluence/s/en_GB/8100/6ef1ce95c788ac159314a8fa6387047b8d1cc9fb/_/images/icons/macrobrowser/dropdown/anchor.png)
Anchor  
---  
|  | Q2  
---|---  
| Q2  
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](https://marc.info/?t=104803047600003&r=1&w=2),
[here](https://marc.info/?l=tomcat-user&m=102335321103262&w=2), or
[here](https://marc.info/?l=tomcat-user&m=101614645312259&w=2). Or if your are
using a JVM 1.4 or better, you can use the system property
`java.awt.headless=true`

###
![](https://cwiki.apache.org/confluence/s/en_GB/8100/6ef1ce95c788ac159314a8fa6387047b8d1cc9fb/_/images/icons/macrobrowser/dropdown/anchor.png)
Anchor  
---  
|  | Q3  
---|---  
| Q3  
Tomcat dies after I log out!

This is a common complaint when using Solaris. Make sure you use `nohup` and
see [this thread](https://marc.info/?l=tomcat-user&m=104809785114238&w=2)

###
![](https://cwiki.apache.org/confluence/s/en_GB/8100/6ef1ce95c788ac159314a8fa6387047b8d1cc9fb/_/images/icons/macrobrowser/dropdown/anchor.png)
Anchor  
---  
|  | Q4  
---|---  
| Q4  
  
...

###  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\. 
  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.

###
![](https://cwiki.apache.org/confluence/s/en_GB/8100/6ef1ce95c788ac159314a8fa6387047b8d1cc9fb/_/images/icons/macrobrowser/dropdown/anchor.png)
Anchor  
---  
|  | Q6  
---|---  
| Q6  
Examples web application does not start. A ClassNotFoundException occurs.

Go into `webapps/examples/WEB-INF/classes` and check whether the class file
mentioned in the error message does exist.

If you downloaded a tar.gz file and used a non-GNU version of tar (e.g. on
Solaris) it may use wrong (truncated) file names on files that are deep in the
hierarchy. This occurs silently: there may be no error or warning during
unpacking. One place that is known to suffer from this is the examples web
application. The workaround is to download a "zip" file instead of a "tar.gz"
one. [thread](https://marc.info/?t=139353831200006&r=1&w=2)

  

  
  
  
|  |  | [Go to page
history](https://cwiki.apache.org/confluence/pages/viewpreviousversions.action?pageId=103098909&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1574642408358&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa9809569d423cd016a0413306f00db "Go to page
history")  
---  
---  
| [View
page](https://cwiki.apache.org/confluence/display/TOMCAT/Linux+Unix?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1574642408358&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa9809569d423cd016a0413306f00db&src.mail.action=view)  
---  
  
|  | [Stop watching
space](https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=TOMCAT&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1574642408358&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa9809569d423cd016a0413306f00db&src.mail.action=stop-
watching&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDk1NjlkNDIzY2QwMTZhMDQxMzMwNmYwMGRiIiwicXNoIjoiZDhkNDkxNzgxMjY0Zjk1OWRlZDRmNjQ1ZDQyZGFjNWQ1MjgwM2IwNGYzNDg3ZTM5NDE4M2U4ZmRiMWZhMmMwZiIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE1NzUyNDcyMDgsImlhdCI6MTU3NDY0MjQwOH0.XyrfeMRAd-
waNWNjCqU7ZPse9FnM3ESTnJdsvG2EhkQ) | •  
---|---  
[Manage
notifications](https://cwiki.apache.org/confluence/users/editmyemailsettings.action?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1574642408358&src.mail.notification=com.atlassian.confluence.plugins.confluence-
notifications-batch-plugin%3Abatching-
notification&src.mail.recipient=8aa9809569d423cd016a0413306f00db&src.mail.action=manage)  
---  
| ![Confluence logo big](cid:footer-desktop-logo)  
---  
This message was sent by Atlassian Confluence 6.15.8  
![](cid:footer-mobile-logo)  
---