Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

26

Ok I finally solved it. I was directed to try this and Henk's solution. Neither of which seemed to work with the remote virtual server. I'm guessing the fact that because I'm on a shared kernel space so the provider prevents this. In any case I added: JAVA_OPTS= $JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses to the catalina.sh ...


24

Many suggested updating catalina.sh startup script. Yes, that solution would work, but catalina.sh script is not meant to be customized/updated. All changes should go into the customization script instead, i.e. setenv.sh. NOTE: TOMCAT_HOME/bin/setenv.sh doesn't exist by default, you need to create it. Check the catalina.sh script and you will see the ...


14

Taken from this page add "digest" attribute on your element in server.xml with a hash algorithm as value (possible values are for example md5, sha-1 or sha-256, where the latter is strongly recommended). Run $CATALINE_HOME/bin/digest.sh -a <YOUR_HASH_ALGORITHM> <YOUR_PASSWORD> You will get an output in the following form <YOUR_PASSWORD>:&...


14

Don't touch the init script. Instead, edit the /etc/default/tomcat6 file and comment out the line enabling remote debugging there: # To enable remote debugging uncomment the following line. # You will then be able to use a java debugger on port 8000. JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"


14

We've been dealing with this issue too. It looks like Amazon found the root cause and corrected it. Here is the info they gave me. Hi, I am pasting below an explanation of what was causing this issue. Good news is that this has been fixed very recently by our engineering team. To get fix, all you'll have to do is STOP/START the Windows Server ...


9

share my experiences,hope it helps step1: enable tomcat plugins sudo ln -s /usr/share/munin/plugins/tomcat_access /etc/munin/plugins/tomcat_access sudo ln -s /usr/share/munin/plugins/tomcat_jvm /etc/munin/plugins/tomcat_jvm sudo ln -s /usr/share/munin/plugins/tomcat_threads /etc/munin/plugins/tomcat_threads sudo ln -s /usr/share/munin/plugins/tomcat_volume ...


8

You have to tell the Connector in the server.xml file that you want to use it on every address not only on 127.0.0.1 by changing the address attribute's value to 0.0.0.0 <Connector port="8080" protocol="HTTP/1.1" maxHttpHeaderSize="65536" connectionTimeout="20000" redirectPort="8443" address="0.0.0.0" /> ...


8

For anyone coming here looking for information about Tomcat 8.0.15 or newer, you should probably use SecretKeyCredentialHandler with PBKDF2 instead, since it's much more secure (i.e. harder to crack) than a simple message digest. For example, in your server.xml: <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="...


7

First, it's a great answer! However, when you mention manually running and checking using "/etc/munin/plugins/tomcat_jvm," this doesn't pick up the environment variables from /etc/munin/plugin-conf.d/munin-node (i.e. user/password), so it fails. The correct way is to use munin-run: $ sudo /etc/munin/plugins/tomcat_jvm free.value U used.value U max.value U $...


6

I had the same error with Windows 7, Tomcat 7.0, and JDK 1.6.0_31. I fixed it by changing the path to the JVM from C:\Program Files\Java\jre6\bin\server\jvm.dll to C:\Program Files\Java\jdk1.6.0_31\jre\bin\server\jvm.dll. To do that, run Tomcat7w.exe from the Tomcat bin directory, switch to the Java tab, and change the Java Virtual Machine entry.


5

Very late to this discussion, but it appears that the 03catalina.policy file in both tomcat5.5 & tomcat6 doesn't actually permit writing to logfiles. The simplest solution is to change the JULI permissions to: // These permissions apply to JULI grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" { permission java.security.AllPermission; }; ...


5

The first location you should take a look at is catalina.out, it will tell you what might be wrong. If you can't make it works with multicast, just try static membership (I think it will simpler). Below is my config: Put the <Cluster node inside the <Host element: <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1"> ...


5

How do I update for 3 web servers? Do the same as when doing with 2 nodes. On the deployment node, add one more member in StaticMembershipInterceptor: <Member className="org.apache.catalina.tribes.membership.StaticMember" port="4002" securePort="-1" host="192.168.5.208" ...


5

Try checking your rpmbuild root directory. In my case, the disk was full and rpm build had no space to create the rpm. It failed with cpio bad magic error which is a misleading error. NOTE: I tried the yum upgrade/update which did not help.


5

Problem The problem with the standard Tomcat shutdown script is that it is simply not tough enough. When you are using your distro's service scripts to stop Tomcat you'll eventually simply be calling Tomcat's own shutdown script. CentOS is no different in this respect. For this reason you need to be familiar with what Tomcat's shutdown script can do for you ...


5

Tomcat always returns status code 400 Because the webapps directory is empty: # ls -l /usr/share/tomcat6/webapps/ total 0 https://issues.apache.org/bugzilla/show_bug.cgi?id=50734 Either create a dummy ROOT context to get a 404 status: # mkdir /usr/share/tomcat6/webapps/ROOT # ls -l /usr/share/tomcat6/webapps/ total 4 drwxr-xr-x 2 root root 4096 Feb 22 ...


5

The OOTB configuration is typically 150 – 200 total accept threads for each connector. This default is intended for medium load / complexity applications on “average” hardware. As a general rule of thumb, a lightweight, high performance application should look at using a maximum of 150 (accept) threads per CPU core (so a total of 600 on a 4 core box). A ...


4

It is probably not a memory leak... Your Connector Thread Pool is of size 200 (default) and all 200 connections are in use, this shows you have 200 request that are not terminated... The rest of the logs are because you stop Tomcat with those 200 pending requests... So the question is why are your requests not responding ? You may make a threaddump to see ...


4

The correct syntax for modifying catalina.sh would be: JAVA_OPTS=" $JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true "


4

I would use at least an m1.small or better an m1.large Instance. The micro-instance really is for development only, because the 613MB may soon not be enough even with zero users. Besides that, you will most likely see a lot of CPU steal time and your Server will not react some time after you had a small cpu peak. That is very annoying. I would try to get ...


4

I've recently seen this problem as well and it appears to be isolated to a change made in the 32-bit Oracle JVM between Java 6 and 7. On Linux, running the 32-bit Java 7 VM with strace shows the following system call when ServerSocket.accept() is invoked without having set SO_TIMEOUT: 32369 poll([{fd=5, events=POLLIN|POLLERR}], 1, 4294967295 <unfinished ...


4

You get http in the response headers because the request that reaches Apache is HTTP - the SSL has been stripped away at the load balancer. So from what Apache sees, it's just an HTTP request. You can work around this by setting ServerName https://www.example.org in the global or virtual host configuration. This will override the default http scheme so ...


3

Looking at the SO question I don't know that this is a systems-level problem -- The description over there sounds like an app bug. Either way upgrading your environment is always something it's good to think about, so I'll take a swing :-) A general plan of action for a major software change or migration usually looks like this (From your SO question, ...


3

I completely randomly found this thread while looking to debug a separate issue, but this is a little-brought-up, but well-known issue with Windows on EC2. We used to have premium support, and discussed this with them in a non-public setting via that channel, but this is a related issue that we did discuss in the public forums. As others have mentioned, you ...


3

You can turn auto deployment on but it is not considered a best practice due to security concerns. With tomcat 7, you also have what is called "parallel deployment", which sounds cool but I have not read about other people's experiences with it. In theory, you will have your old version being served up alongside your new version. Established sessions would ...


3

This problem appears to be because port-specific options (typically for debugging purposes) should be specified in CATALINA_OPTS instead of JAVA_OPTS. On shutdown, any port options in JAVA_OPTS will apply to the shutdown JVM, hence the "address already in use" error and shutdown failing. Please see https://stackoverflow.com/a/8216921/571357 - Jaan has ...


3

I've had the same problem today. My solution was to just install the missing RPM by hand: rpm -Uvh https://github.com/downloads/pallet/pallet/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm No more problems after that.


3

For future visitors: I had a similar problem on a Linux server and none of the "solutions" I've found helped. Finally, I found that I just had firewall settings that blocked that port.


3

Use your main config file - you can do a graceful config reload by sending a USR1 signal to the process - your apache init script should have a reload command to do this. /etc/init.d/apache2 reload


Only top voted, non community-wiki answers of a minimum length are eligible