mod_jk and load balancing '.method' - mod-jk

Apache 2.2.3, mod_jk 1.2.37 in front of jboss eap 6.
In my JKWorkersFile I specify 'worker.list=' with all my loadbalancers.
Everything seems to work - I can
change '.host=' or '.port=' setting for a node, or
change a loadbalancers '.balance_workers=' setting to different nodes.
My loadbalancers are sticky - and that part works.
But the log persistently shows my loadbalancers are
using method 'Request'
regardless of my loadbalancers '.method=' setting.
I found a reference in the download
(0/r="Requests", 1/t="Traffic", 2/b="Busyness", 3/s="Sessions", 4/n="Next"; case insensitive, only first character is used)
Has anyone successfully used a '.method=' setting other than 'Request'?

Solved.
User error.
The workers.properties file I had been given
contained loadbalancer entries that were not case consistent...
worker.loadbalancerPartition1.<property>
worker.loadBalancerPartition1.<property>
-----------^

Related

I get an error when I start with two different yml

I encountered a problem when I was learning Eureka today.
I tried to start a SpringBoot with two different configuration files (yml), A is called application-replica1, and B is called application-replica2. There are only these two files, and there is no separate application. Below is a screenshot of the two files
I want to build an Eureka cluster, but when I start it with the first configuration file, my "server.port" function does not work. I want to set port 18081 to no effect, but port 8080 is enabled。
I tried: 1. Create a new application, and then specify the profile to start (application.profiles.,active:application-replica1), but it still doesn't work.
2.Edit Configuration, also does not work
I went out and smoked a cigarette, and it was resolved when I came back. Below is my configuration。
1 Modify the attributes of replica1 and replica2, register-with-eureka and fetch-registry are changed to true.
2. Added VM options in Edit Configuration
3. Set spring.profiles.active: replica1/replica2

How does one run Spring XD in distributed mode?

I'm looking to start Spring XD in distributed mode (more specifically deploying it with BOSH). How does the admin component communicate to the module container?
If it's via TCP/HTTP, surely I'll have to tell the admin component where all the containers are? If it's via Redis, I would've thought that I'll need to tell the containers where the Redis instance is?
Update
I've tried running xd-admin and Redis on one box, and xd-container on another with redis.properties updated to point to the admin box. The container starts without reporting any exceptions.
Running the example stream submission curl -d "time | log" http://{admin IP}:8080/streams/ticktock yields no output to either console, and not output to the logs.
If you are using the xd-container script, then the redis.properties is expected to be under "XD_HOME/config" where XD_HOME points the base directory where you have bin, config, lib & modules of xd.
Communication between the Admin and Container runtime components is via the messaging bus, which by default is Redis.
Make sure the environment variable XD_HOME is set as per the documentation; if it is not you will see a logging message that suggests the properties file has been loaded correctly when it has not:
13/06/24 09:20:35 INFO support.PropertySourcesPlaceholderConfigurer: Loading properties file from URL [file:../config/redis.properties]

Websphere Name Space Bindings affect the JNDI scope resolution order

Here is the situation:
I'm on websphere Network Deployment v8.0.0.3
I've an application which use 2 queuese
One Queue is for internal application usage (Publisher and Consumer are inside the same application) the other queue is used by other modules deployed on Other application server inside the cell.
So I have configured the 1st queue at Cell Scope level and the second queue at Cluster scope level.
Everything was working until I added a Name Space Binding.
After that every jms jndi object Cluster Scoped are not present anymore inside a dumpNameSpace.sh output.
Seams like the resolution of the scopes are modified by the presence of a Name Space Binding.
Which indeed is really odd but I got the same behaviour on 2 different installations of WAS.
Thanks for anyone which knows this.
Update
This is the diff between the jndi dump that works and the one which not.
--- clsdumpOk 2012-08-07 11:49:43.000000000 +0200
+++ clsdumpKo2 2012-08-07 11:49:59.000000000 +0200
## -454,28 +454,12 ##
(top)/clusters/TestCluster/jdbc/modulobase
(top)/clusters/TestCluster/jms
(top)/clusters/TestCluster/jms/as
-(top)/clusters/TestCluster/jms/as/BatchRequest
-(top)/clusters/TestCluster/jms/as/BatchResponse
(top)/clusters/TestCluster/jms/as/ciccio
-(top)/clusters/TestCluster/jms/as/FSCleaner
(top)/clusters/TestCluster/jms/as/License
(top)/clusters/TestCluster/jms/as/Mailer
-(top)/clusters/TestCluster/jms/as/Plans
-(top)/clusters/TestCluster/jms/as/RiaResponse
-(top)/clusters/TestCluster/jms/ConnectionFactory
-(top)/clusters/TestCluster/jms/pac
-(top)/clusters/TestCluster/jms/pac/as
-(top)/clusters/TestCluster/jms/pac/as/Events
(top)/clusters/TestCluster/jms/queue
-(top)/clusters/TestCluster/jms/queue/batch-request
-(top)/clusters/TestCluster/jms/queue/batch-response
-(top)/clusters/TestCluster/jms/QueueConnectionFactory
-(top)/clusters/TestCluster/jms/queue/events
-(top)/clusters/TestCluster/jms/queue/filesystem-cleaner
(top)/clusters/TestCluster/jms/queue/license
(top)/clusters/TestCluster/jms/queue/mailer
-(top)/clusters/TestCluster/jms/queue/plans
-(top)/clusters/TestCluster/jms/TopicConnectionFactory
(top)/clusters/TestCluster/jta
(top)/clusters/TestCluster/jta/usertransaction
(top)/clusters/TestCluster/SecurityServer
## -495,8 +479,10 ##
(top)/clusters/TestCluster/url/casCfgFile
(top)/clusters/TestCluster/UserRegistry
(top)/clusters/TestCluster/wb25
-(top)/clusters/TestCluster/wb25/topic
-(top)/clusters/TestCluster/wb25/topic/ria-response
+(top)/clusters/TestCluster/wb25/conf
+(top)/clusters/TestCluster/wb25/conf/locking
+(top)/clusters/TestCluster/wb25/conf/locking/lockingEnabled
+(top)/clusters/TestCluster/wb25/conf/rootFolder
(top)/clusters/TestCluster/wm
(top)/clusters/TestCluster/wm/ard
(top)/clusters/TestCluster/wm/default
as you can see once the
+(top)/clusters/TestCluster/wb25/conf/locking/lockingEnabled
is added
all the rest is removed.
It's really weird.
The problem in WebSphere for Environment -> Naming -> Namespace Bindings
is the following:
If you set some JNDI nodes with the naming:
url/someVariable
or generically
something/someVar
and than you use the same "something" for some other object like:
URL
or
JDBC
or
JMS
The Name space binding put "something" in read-only mode and when WebSphere try to configure other resources will fail.
You cannot spot this during configuration because only at the first reboot of the Application Server you will get this.
So be carefull when chose names inside jndi.

Configuring Solr running on Tomcat & Windows

I'm new to Solr, and am having trouble getting my setup to work. I'm using Solr 3.5.0 running on Tomcat 7.0.23, on Windows 7 Professional. If I copy the single core example into my Solr home, it doesn't work - I get 404 errors from Tomcat for both http://foo/solr/admin/ and http://foo/solr/collection1/admin/. I've tried to convert the multicore example (which works, probably because solrconfig.xml is a lot simpler) to use a single core by deleting the additional folder and changing solr.xml to this:
<solr persistent="false">
<cores adminPath="/admin/cores" defaultCoreName="core0">
<core name="core0" instanceDir="core0" />
</cores>
</solr>
As I understand it, this should mean that I can access core0 using either http://localhost/solr/admin/ or http://localhost/solr/core0/admin/, but only the second URL works - the other just returns a 404 stating "missing core name in path". I thought that defaultCoreName meant I didn't need to specify the core name in the path. Should the defaultCoreName attribute work the way I expected it to, and if so please could you suggest areas of the configuration that I ought to have a look at in order to fix this?
The behaviour you expect is correct. http://localhost/solr/admin/ should give the same result as http://localhost/solr/core0/admin/
Not sure what the problem is, are you running Tomcat on port 80 instead of 8080?

sharing session between WARs

Is it possible for the session data of one war file to be shared by other war file
To the point, you just need to configure the server somehow to store the session in a cookie without a path. In case of Tomcat, you can just set emptySessionPath attribute of the <Connector> element to true in /conf/server.xml. Also see this Tomcat Configuration Reference.
<Connector ... emptySessionPath="true">
This however affects all webbaps deployed on the same server.
Update: as you are actually using Websphere (which uses Tomcat under the hoods), you need to alter the Tomcat connector in Websphere's config.xml to include the following attribute:
<attribute name="emptySessionPath">true</attribute>
Its not easy to do. but I have been able to do this using tomcat. Here is a link http://www.fwd.at/tomcat/sharing-session-data-howto.html I'm not sure what server you are using though. Also, why do you need to do this, there may another solution depending on what you need to do.
Tomcat has the Signle-Sign-On Valve:
The Single Sign On Vale is utilized when you wish to give users the ability to sign on to any one of the web applications associated with your virtual host, and then have their identity recognized by all other web applications on the same virtual host.
You may also try to implement single-sign-on using cookies (though this has security drawbacks).

Resources