Hot answers tagged

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

I've finally solved the issue. The breakthrough occured when I followed @john ktejik's directives: https://stackoverflow.com/questions/4390134/failed-to-load-resource-under-chrome/26742627 I came to realize that the involved resource was encompassed within a .jar file. Therefore, I had to tell Apache2 to explicitely use "SetOutputFilter INFLATE;proxy-html;...


5

I had similar problems when running a confluence instance (within a tomcat server) behind apache2 using either mod_jk or mod_proxy. When I tried to view the confluence wiki pages, I received following error messages: Chrome: ERR_CONNECTION_RESET Firefox: The connection was reset The subtle problem was that some of the pages (like the login screen) could ...


4

I've successfully used: SetEnvIf Origin "http(s)?://(domaine1\.com|domain2\.com)$" AccessControlAllowOrigin=$0 Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin from http://www.cameronstokes.com/2010/12/26/cross-origin-resource-sharing-and-apache-httpd/


4

Over the years there have been a number of connectors developed to enable Apache httpd to communicate with Tomcat that have used a variety of protocols. When searching the web for information on how to do this, it isn't unusual to stumble across some really bad, out of date advice. So first of all the only options you should consider for this are: mod_jk ...


4

There's a problem initializing the shared memory that is needed by the workers. Check whether the directory /etc/httpd/logs/ exists and is writable by the user that's running the tomcat instance. If it isn't, either change the permissions on the directory, or create a separate directory to keep the shm files in. (I'd recommend the latter, simply because it'...


3

For creating the sticky we need to add the following line in your configuration(mod_proxy) Header add Set-Cookie "BALANCEID=hej.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED Then specify the route name in the config <Proxy balancer://mycluster> BalancerMember http://tomcat sever1.ip:8080 route=AcZxv BalancerMember http://...


3

From the look of things, I would guess that it's the mod_proxy sections in the middle: ProxyPass /ourapp http://127.0.0.1:8180/ourapp ProxyPassReverse /ourapp http://127.0.0.1:8180/ourapp ProxyPass /pbsEasyRequester http://127.0.0.1:8180/pbsEasyRequester ProxyPassReverse /pbsEasyRequester http://127.0.0.1:8180/pbsEasyRequest ProxyPass /ordertracking http://...


3

How good is Glassfish at serving static content? Name-based vhosting? Redirects? I'm willing to bet that Apache is better at it all. If you're particularly interested in a small footprint frontend webserver, though, look at nginx instead of Apache.


3

I found the reason. Problem was caused by default configuration of Apache module mod_reqtimeout: <IfModule reqtimeout_module> # mod_reqtimeout limits the time waiting on the client to prevent an # attacker from causing a denial of service by opening many connections # but not sending requests. This file tries to give a sensible default # ...


3

I believe that you need the tomcat admin package (for me, it's tomcat6-admin) to provide jk-manager and jk-status. After installing that, you just need to configure these two items in your workers.properties file. If you can't find workers.properties file, have a look at your apache config, for example: grep -r JkWorkersFile /etc/apache2. The config should ...


3

mod_proxy is the Apache HTTP server module, not an Apache Tomcat module. What this page is saying is that Tomcat supports either JK1.2 or the AJP protocol provided by the mod_proxy module within Apache HTTP. Historically what you had to do was use mod_jk to provide AJP1.3 support to the Apache HTTP server, as of Apache HTTP 2.2 this is now provided within ...


3

The correct answer is online: http://www.laliluna.de/articles/2008/09/14/apache_tomcat_mod_jk_selinux.html The part you need is near the bottom, which I will copy and paste here in case that page goes away: # mkdir /var/run/mod_jk # semanage fcontext -a -t httpd_var_run_t "/var/run/mod_jk(/.*)?" This apparently configures SELinux to allow mod_jk to work. ...


2

If your backend servers (tomcat) are clustered, they should replicate sessions too. In the event of an http failure, connections to 1 http node should go to another node. The jsessionid parameter should give the http / mod_jk enough info to know which node to route to (e.g. jsessionid=lkj234lkj2ljk234lj.jvmRoute1 will tell mod_jk that this session is due for ...


2

Given that you're using Ubuntu 10.04, have you tried sudo apt-get install libapache2-mod-jk? That should work, and then all you need to do is sudo a2enmod jk and sudo /etc/init.d/apache2 restart And it should work..


2

These are not error, but informational messages ("info"). As you can see here, here or here, a message like sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) usually means means that the client disconnected by pressing the stop or back button in their browser during or after a request, thus Tomcat cannot send ...


2

Dynamic Shared Objects might solve your problem more readily. This not only would allow you to use a statically compiled mod_rails, but also any other compiled module you wish to load as you need. Essentially once you statically compile the mod_so module, any other statically compiled modules can be added or removed via the LoadModule command in httpd.conf. ...


2

http proxy would open many connections between your balabcer and app server. mod_jk should be less resource hungry because AJP protocol handles many requests through a single connection. Also with mod_jk should be easier to serve static contents through the apache httpd. btw mod_cluster has advantages dealing with dynamically adding and removing servers ...


2

Check the output of apache2ctl -S - a second SSL vhost that is loading first on the port will get requests instead of the desired vhost.


2

You have a couple of questions here, i'll try and answer them in order. That is, I thought the concept of ports was to facilitate machine-to-machine communication. If everything's on the same machine, do they even need a port number open to communicate? Yes, and no. What ports are used for is to allow multiple IP based services talk to each other. It ...


2

You place the JkMount directives inside the httpd.conf virtual host you want them to apply to.


2

SSL is used to encrypted communications between a client and your web service. If you are putting Apache in front of Tomcat, then you need to configure Apache with the SSL certificate...and you don't need it at all for Tomcat, because Apache is handling all of the client communication. If certificate paths need to be configured in both apache and ...


2

Your OS might prevent access to the shared memory file. Try adding # Set this to a location allowed to the 'Apache' user JkShmFile /var/log/httpd/mod_jk.shm in your mode-jk.conf (I am using the filename spelling from your post but it might be mod_jk.conf or similar)


2

Generally Varnish can deliver a cache hit several orders of magnitude faster than Tomcat - typically TTFB is microseconds for Varnish and milliseconds for Tomcat. So, the performance of the connector (AJP vs HTTP) probably won't matter when Varnish is involved. So, go for the simpler setup - have Tomcat speak directly to Varnish. The marginal effect AJP ...


2

The remote port number is available to your application in the environment variable JK_REMOTE_PORT. There's no corresponding JkRequestLogFormat string to log the remote port, but it can be logged in a standard Apache mod_log_config request log with %{remote}p in LogFormat.


2

I've figured that out using mod_proxy instead of mod_jk and adding these lines : ProxyPass / http:// SERVER_IP:8080/ ProxyPass /myapp/ http:// SERVER_IP:8080/myapp And this line for cookies : ProxyPassReverseCookiePath /myapp /"


1

You are pretty close on your config, there are just a few things that are off. First, AJP does not run over port 8080, by default it runs over port 8009. It's a different connector. You can verify which port AJP is setup for by looking at your server.xml file for a line that looks like this: <Connector port="8009" redirectPort="8443" protocol="AJP/1.3"/...


1

The DocumentRoot from the httpd.conf is only in charge for the global Apache settings. If you set on your server on a VirtualHostconfiguration it shouldn't interfere with your VH at all. I'd recommend for now to increase yourLogLeveland check the log file after that. Additionally, if it ain't on productive server yet, you can drop the DocumentRoot lines in ...


1

What is controlling whether the Apache is searching in DocumentRoot dir or forwarding the requests to Tomcat? Two factors: the order and definition of <Directory> and related directives, and the JKMount location(s). I am curious why you think you need two - just use /cas/* (apache will redirect a request for /cas to /cas/ automatically if /cas does ...


1

I don't know exactly for your problem but you should: 1/ Setup timeouts to your config file http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html 2/ If it's not already done, log or graph your ajp connection pool. You can get values from jboss for ajp threads and ajp connections using the jmx console or snmp https://community.jboss.org/wiki/...


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