[Installation, Configuration & DEPLOYMENT] - Re: Strange workers.properties problem (Apache / mod_jk)
by Spuds
Here are all of the entries going back to when I created the block in workers.properties:
[Mon Dec 24 10:07:01 2007][10229:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-bpp
[Mon Dec 24 10:07:01 2007][10229:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-bpp
[Mon Dec 24 11:13:18 2007][10229:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-bpp
[Mon Dec 24 11:13:18 2007][10229:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-bpp
[Tue Dec 25 01:26:43 2007][10229:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-bpp
[Tue Dec 25 01:26:43 2007][10229:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-bpp
[Tue Dec 25 08:08:19 2007][10229:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-bpp
[Tue Dec 25 08:08:19 2007][10229:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-bpp
[Fri Jan 04 15:49:15 2008][26514:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-avd
[Fri Jan 04 15:49:15 2008][26514:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-avd
[Tue Jan 08 09:32:28 2008][14659:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-avd
[Tue Jan 08 09:32:28 2008][14659:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-avd
[Tue Jan 08 09:36:48 2008][14659:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-avd
[Tue Jan 08 09:36:48 2008][14659:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-avd
[Tue Jan 08 12:13:11 2008][14659:5216] [error] wc_create_worker::jk_worker.c (149): factory for lb failed for qa-avd
[Tue Jan 08 12:13:11 2008][14659:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-avd
[Tue Jan 08 12:54:32 2008][14659:5216] [error] wc_create_worker::jk_worker.c (137): Unknown worker type 1 for worker qa-bpp2
[Tue Jan 08 12:54:32 2008][14659:5216] [error] wc_create_worker::jk_worker.c (161): validate failed for qa-bpp
[Tue Jan 08 12:54:32 2008][14659:5216] [error] build_worker_map::jk_worker.c (259): failed to create worker qa-bpp
Thanks in advance to anyone that can give me some direction.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118025#4118025
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118025
18 years, 6 months
[Security & JAAS/JBoss] - Basic auth apache fronting JBoss!
by java123
Our webapp is deployed in JBoss which is fronted by apache web server.
I have configured Basic authorization in my webapp and JBoss. When I do try to access the protected pages from http://localhost:8080/protected/testpage.jsp I get promoted to enter user name and password. Once everything is entered correctly I proceed to the page.
Now the problem occurs when I try to access the same page from my web server URL(http://myserver.bfm.com/protected/testpage.jsp). Now I am prompted by web server realm to enter user name and password (I set my user name and password to be the same both on JBoss and apache). Once the I enter my credentials I am never prompted by JBoss to enter my credentials again. That can be understandable since the request already had my Basic auth but I get a NullpointerException on the JBoss with following stack trace:
[08-01-2008 12:23:12.904] [3774275] [org.apache.catalina.connector.CoyoteAdapter] [ERROR] [TP-Processor3] An exception or error occurred in the container du
ring the request processing
java.lang.NullPointerException
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.hasRole(JBossSecurityMgrRealm.java:286)
at org.apache.catalina.realm.RealmBase.hasResourcePermission(RealmBase.java:763)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:464)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Any ideas to why I am getting this exception everytime I try to access the protected page from my web server. I need to do this to protect access from both localhost or web server.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118019#4118019
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118019
18 years, 6 months
[Clustering/JBoss] - HASingletonElectionPolicy
by smeng@unique
I have setup 2 nodes (say Node A and B) in a cluster using Jboss 4.2.2 GA.
My requirement is:
1. Node A is set as the preferred master. If both nodes are running, Node A will always become the master i.e. in the event Node B was started before Node A, it will stop the service and Node A will take over running as the master.
2. If the master node goes down, then the next available node in the cluster becomes the master.
My problem is:
When Nodes A & B are running, Node A as master, and Node A is properly shutdown, Node B still detects Node A in the cluster view and continues to elect Node A as the master rather than taking over.
Here is my HASingletonElectionPolicy implementation:
package com.unique.ha.singleton;
|
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
| import org.jboss.ha.framework.interfaces.ClusterNode;
| import org.jboss.ha.framework.interfaces.HAPartition;
| import org.jboss.ha.singleton.HASingletonElectionPolicySimple;
|
| public class HASingletonElectionPolicyUnique extends HASingletonElectionPolicySimple
| implements HASingletonElectionPolicyUniqueMBean {
|
| private String preferredMasterAddress;
|
| private static final Log log = LogFactory.getLog(HASingletonElectionPolicyUnique.class);
|
| public void setPreferredMasterAddress(String preferredMasterAddress) {
|
| this.preferredMasterAddress = preferredMasterAddress;
| }
|
| public String getPreferredMasterAddress() {
|
| return this.preferredMasterAddress;
| }
|
| public ClusterNode pickSingleton() {
|
| return pickSingleton(getHAPartition());
| }
|
| public ClusterNode pickSingleton(HAPartition partition) {
|
| log.info( "Running HASingletonElectionPolicyUnique..." );
|
| ClusterNode[] nodes = partition.getClusterNodes();
| log.info( "CurrentView for " + partition.getPartitionName() + " is " + partition.getCurrentView().toString() );
|
| if( this.preferredMasterAddress != null ) {
|
| for ( int x=0; x < nodes.length; x++ ) {
|
| ClusterNode node = nodes[x];
|
| if ( node.getIpAddress().getHostAddress().equals( this.preferredMasterAddress ) ) {
|
| log.info("Set Master Status to preferred master address " + this.preferredMasterAddress);
| return node;
| }
| }
| }
|
| log.warn("Unable to select preferred Master at address " +
| this.preferredMasterAddress + ". Will select next available node.");
|
| return super.pickSingleton(partition);
| }
|
|
| }
|
jboss-service.xml
<server>
|
| <mbean code="com.unique.ha.singleton.HASingletonElectionPolicyUnique"
| name="com.unique.ha:name=HASingletonElectionPolicyUnique">
| <attribute name="PreferredMasterAddress">${unique.ha.preferred_master_address}</attribute>
| </mbean>
|
| <mbean code="com.unique.system.mbean.MyService"
| name="com.unique.system.mbean:name=MyService">
| </mbean>
|
| <mbean code="org.jboss.ha.singleton.HASingletonController"
| name="com.unique.system.mbean:service=MyService-HASingletonController">
| <depends>jboss:service=${jboss.partition.name}</depends>
| <depends optional-attribute-name="ElectionPolicy" proxy-type="attribute">com.unique.ha:name=HASingletonElectionPolicyUnique</depends>
| <depends optional-attribute-name="TargetName">com.unique.system.mbean:name=MyService</depends>
| <attribute name="PartitionName">${jboss.partition.name}</attribute>
| <attribute name="TargetStartMethod">startSingleton</attribute>
| <attribute name="TargetStopMethod">stopSingleton</attribute>
| </mbean>
|
| </server>
Thanks
Meng
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118011#4118011
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118011
18 years, 6 months
[JBoss Seam] - Re: Creating a simple selectOneMenu
by mars1412
i think this should be possible using s:enumItem and s:convertEnum,
but you should also consider using a java-enumeration at entity-bean level:
public enum CustomerStatus {
| INACTIVE,
| ACTIVE;
| public String getLabel() {
| return this.name(); //return whatever name you wanna see
| }
| }
then use this enum on your entity bean:
| @Enumerated(EnumType.STRING)
| @NotNull
| public CustomerStatus getStatus() {
| return status;
| }
|
then make the enum values available in the pages via a factory:
| @Name("customerStatusFactory")
| public class CustomerStatusFactory {
|
| @Factory("customerStatus")
| public CustomerStatus[] getCustomerStatus() {
| return CustomerStatus.values();
| }
| }
|
in your page, use the enum:
| <h:selectOneMenu value="#{customerHome.instance.status}">
| <s:selectItems value="#{customerStatus}" var="cus"
| label="#{cus.label}"
| noSelectionLabel="Please select" />
| <s:convertEnum />
| </h:selectOneMenu>
|
U may also checkout the examples\ui\src\org\jboss\seam\example\ui example (Person-entity)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117994#4117994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117994
18 years, 6 months
[Installation, Configuration & DEPLOYMENT] - Strange workers.properties problem (Apache / mod_jk)
by Spuds
We have a production cluster and a qa / dev cluster.
All are using Apache and mod_jk.
We have staging sites set up on the production cluster that point to the QA site and IP addresses in the QA cluster... we have several of these "staging" sites that work just fine and point to the same QA cluster with no problems.
I just recently added another, but when I uncomment the block in workers.properties, suddenly all of the sites on the whole box go down EXCEPT for the staging site, which works fine.
Comment the block out, restart apache-- now everything comes right back instantly, but of course the staging site doesn't work.
Here is the relevant block in workers.properties:
########################################################
#qa.bpp worker configuration
#Q-bpp Node1
worker.qa-bpp1.port=8009
worker.qa-bpp1.host=10.2.2.185
worker.qa-bpp1.type=ajp13
worker.qa-bpp1.lbfactor=1
#
#Q-bpp Node2
worker.qa-bpp2.port=8009
worker.qa-bpp2.host=10.2.2.186
worker.qa-bpp2.type=ajp13
worker.qa-bpp2.lbfactor=1
#
# Load-balancing behaviour
worker.qa-bpp.type=lb
worker.qa-bpp.balance_workers=qa-bpp1,qa-bpp2
##########################################################
Here is what I have in mod_jk.conf:
<VirtualHost *:80>
ServerAdmin ULadmin
DocumentRoot /var/www/html
ServerName stag.bpp
ErrorLog /var/log/http/stag.bpp-error_log
CustomLog /var/log/http/stag.bpp-access_log common
JkMount /* qa-bpp
The blocks look right to me, I have looked at the file for extra whitespace / codes and have found none, I have looked at the block before and after this block to see if there are any errors in those and have found none.
The QA and DEV site are working fine in those clusters.
The block above *IS* in the workers.list list.
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117993#4117993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117993
18 years, 6 months
[JBossCache] - Re: newbie question - ReplicationException
by manik.surtani@jboss.com
Both locking schemes will have one node fail in the described scenario. The differences are, using the original poster's example, with PL the commit on JVM2 will fail while with OL the commit on JVM1 will fail.
Other differences are that with OL, the fail on JVM1 is local, i.e., it will fail before any remote calls are made and hence more efficient. also with OL if the tx on JVM1 hangs, other txs on other JVMs (or even the same JVM) can proceed.
If you want proper atomicity, then you get into the realm of distributed locks (or fail-fast cooperative locks) but either way, we're talking about extremely non-scalable solutions, especially since in a cache, you're looking at a mostly-read use-case which should make such a failure rare and a retry acceptable.
If you are looking at using the cache to store a heavily updated value, like a counter, for example, then a cache is almost certainly the wrong tool for the job.
That said, enough folk have asked for distributed locking and it is on the roadmap (albeit low prio - JBCACHE-1098) . It will almost certainly not be enabled by default for scalability reasons though.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117966#4117966
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117966
18 years, 6 months
[JBossCache] - Re: JDBCCacheLoader and MySQL problems
by hmesha
Looking at the error you're getting doesn't look like that has anything to do with the 4k limitation on the blob data type in MySQL or JBCACHE-320. In the blob case you'd get NPE upon truncation of the data stored.
I think the problem has to do with the serialization of the objects that you're persisting. the failure doesn't happen in MySQL but rather on deserialization.
>From Java doc for the exception, Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream.
Please review your object serialization / deserialization mechanism and if you're sure that it's working correctly then please turn up JBC logging level to debug and post the log part that pertain to the database retrieve so I can examine it further.
Cheers,
Hany
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117951#4117951
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117951
18 years, 6 months