Tag Info

Hot answers tagged

13

Inside the Service tag change: <Connector port="8080" protocol="HTTP/1.1" ... to: <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1" ... For more information: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html


10

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


9

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


6

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"


6

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


5

Taken from this page 1) add "digest" attribute on your <Realm> element in server.xml with value "md5". For now it's strongly algorithm for password encoding in tomcat 2) go to your CATALINA_HOME and run > java -cp lib/catalina.jar:bin/tomcat-juli.jar org.apache.catalina.realm.RealmBase -a md5 <YOUR_PASSWORD> You will get ...


5

It looks way too "procedural," IMO. You have to think in a "declarative" way. I would personally just create .rpm's or .deb's from those tarballs, and specify another repo to use so all you would have to do is something like this: class tomcat { Package { "tomcat": ensure => installed, } File { "/etc/init.d/tomcat": source => ...


4

Ok first thing: Do you really need to use a Java Security Policy? The simplest solution by far is to disable this in tomcat's startup script: in /etc/init.d/tomcat6 replace TOMCAT6_SECURITY=yes with TOMCAT6_SECURITY=no Assuming you must use the security manager, and you must match an existing installation, I would suggest un-installing ...


4

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


4

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


3

I don't have enough reputation to add a comment to @Michael's answer above, so I'm adding as an answer - 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 ...


3

Trade-off. Apache HTTP Server is almost certainly faster at serving static content than Tomcat - I don't have any nice graphs to back up that claim, but, Apache's written in C and Tomcat's in Java; C is generally faster. However, keep in mind that having two web services is a resource drain in other ways - and neither of those web servers are known for ...


3

If I were looking into this myself, I would run sudo apt-get remove --purge tomcat6 (again). Once that was completed, I would run ps -eaf | grep tomcat | grep -v -e grep to check for any stray running Tomcat processes. Once I had confirmed that Tomcat was no longer running, I would reinstall: sudo apt-get install tomcat6.


3

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


3

Install apache and use mod_rewrite to proxy the requests to the backend tomcat applications. Here's a sample snippet of apache config that should do it: RewriteEngine on #Optional - setup a log, useful for debugging #RewriteLog logs/rewrite.log #RewriteLogLevel 3 RewriteRule ^/myAPP1(.*) http://10.XXX.XXX.XXX:8080/myAPP1$1 [P,L] RewriteRule ^/myAPP2(.*) ...


3

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


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

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


3

I've seen this problem a few times with Tomcat. A couple of things that might help: Give it some time to make sure the process really isn't shutting down; the Tomcat shutdown script tries to do a clean shutdown, and that can take a while if the Tomcat server had a large number of threads open when you called the shutdown script. If it takes more than 5 ...


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

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; }; ...


3

You are trying to install a compat library for a different version of the JDK than you have install from Sun. You are trying to install compat-1.6.0.03 which would match up to JDK 1.6.0_03. Your java version is 1.6.0_18. You can get 1.6.0_03 here It looks like they haven't updated the compat libraries since U3 (1.6.0_03) This gem is a little hidden in ...


3

If you're using the standard packages, I believe they send it to syslog. You can check the /etc/init.d/tomcat6 file and look to see where -outfile and -errfile are set to. If it's SYSLOG then it's going to syslog, otherwise it's a filename. The reason for this is because if it's set to a filename, it's impossible to rotate the logs as they're always kept ...


3

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.


3

I serve multiple apps off of one Tomcat instance and proxy them through Apache on the same box as virtual hosts. Here is my basic configuration for Apache. The Tomcat instance is left nearly in defaults (only minimal modifications for security). You'll need to enable mod-proxy_ajp in Apache and configuration virtual hosts. This is a copy and paste of my ...


2

Are you using Gentoo? When you stop a service, Baselayout checks if there are other services depending on the service you are stopping. If it is the case, they are stopped before, in order of dependencies. Whenever you restart a service in a distro based on Baselayout, it runs the /sbin/depscan.sh script, which stores dependencies in ...


2

You can use mod_rewrite in Apache to do this. Load mod_rewrite in your Apache and in your www.xyz.com vhost add the following rule: RewriteRule ^/(.*) http://www.abc.com:8080/myApp/$1 This should do the magic. More info about mod_rewrite here. EDIT: In order to keep the site name in the browsers, use mod_proxy as well by just appending a [P] at the end ...


2

The details in the context.xml file are used for all contexts. If you want to specify specific details for one particular context create a file with a context tag in $CATALINA_BASE/conf/[enginename]/[hostname]/ eg. conf/catalina/localhost/manager.xml that contains: <Context privileged="true" docBase="/usr/share/tomcat6/webapps/manager"> ...



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