[JBoss AS 7 Development] - Session replication using AS7 clustering, S3 PING, Amazon EC2
by H R
H R [https://community.jboss.org/people/silverdev] created the discussion
"Session replication using AS7 clustering, S3 PING, Amazon EC2"
To view the discussion, visit: https://community.jboss.org/message/783143#783143
--------------------------------------------------------------
Hello all,
I am trying to setup session replication using AS7 clustering, S3 PING and Amazon EC2 for the Seam booking EAR app.
So far, I have managed to get session replication working with two different local servers running on the same network using S3 ping and AS7:
1. The S3 bucket is created with two files.
2. I can restart one server and continue my browser session.
I am running into a problem when trying to get this same setup running on Amazon EC2. Here's how far I could get on the Amazon cloud:
1. I start JBoss using the following command:standalone.sh -c standalone-ha.xml -Djboss.server.base.dir=standalone -b 10.X.Y.Z -Djboss.default.jgroups.stack=tcp -Djboss.node.name=node1 &
2. The S3 bucket is created with two files. Relevant part of standalone-ha.xml: <protocol type="S3_PING">
<property name="access_key">
xxx
</property>
<property name="secret_access_key">
xxx
</property>
<property name="prefix">
jbossas7-s3ping
</property>
<property name="timeout">
60000
</property>
</protocol>
3. JGroups logs says:09:59:23,254 INFO org.jboss.as.clustering.jgroups org.jboss.as.clustering.jgroups (ServerService Thread Pool -- 37) JBAS010260: Activating JGroups subsystem.10:00:08,631 INFO org.infinispan.remoting.transport.jgroups.JGroupsTransport org.infinispan.remoting.transport.jgroups.JGroupsTransport (pool-15-thread-1) ISPN000078: Starting JGroups Channel
10:00:08,636 DEBUG org.infinispan.remoting.transport.jgroups.JGroupsTransport org.infinispan.remoting.transport.jgroups.JGroupsTransport (pool-15-thread-1) New view accepted: https://community.jboss.org/message/783143#783143#783143/0 node1/web https://community.jboss.org/message/783143#783143#783143/node1/web Session replication using AS7 clustering, S3 PING, Amazon EC2
10:00:08,636 INFO org.infinispan.remoting.transport.jgroups.JGroupsTransport org.infinispan.remoting.transport.jgroups.JGroupsTransport (pool-15-thread-1) ISPN000094: Received new cluster view: https://community.jboss.org/message/783143#783143#783143/0 node1/web https://community.jboss.org/message/783143#783143#783143/node1/web Session replication using AS7 clustering, S3 PING, Amazon EC2
10:00:08,637 INFO org.infinispan.remoting.transport.jgroups.JGroupsTransport org.infinispan.remoting.transport.jgroups.JGroupsTransport (pool-15-thread-1) ISPN000079: Cache local address is node1/web, physical addresses are https://community.jboss.org/message/783143#783143#783143/10.194.93.149:7600 Session replication using AS7 clustering, S3 PING, Amazon EC2
10:00:08,638 DEBUG org.infinispan.remoting.transport.jgroups.JGroupsTransport org.infinispan.remoting.transport.jgroups.JGroupsTransport (pool-15-thread-1) Waiting on view being accepted
Note:
1. I have opened ICMP,TCP ports for EC2 Security Groups on both EC2 instances
2. I have disabled firewall on both instances
3. I can telnet from instance to the other on port 7600.
4. I have attached my AS7 config.
Can anyone help?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783143#783143]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[JBoss AS 7 Development] - Cached Web Service Client sends wrong SoapAction in HTTP header
by Wilhelm Berger
Wilhelm Berger [https://community.jboss.org/people/greendale] created the discussion
"Cached Web Service Client sends wrong SoapAction in HTTP header"
To view the discussion, visit: https://community.jboss.org/message/782733#782733
--------------------------------------------------------------
Hi all,
I have a problem with an application which I have migrated from JBoss AS5 to AS7. Parts of the application contain a JaxWS webservice client which makes calls to a remote web service. The former implementation was based on the +jboss-ws native+ stack. For performance reasons the web service client instance was cached and reused. When migrating to AS7 I have not changed the webservice client code so far, at least at first glance it looked like everything is working fine.
But, whenever a JaxWS client is reused - taken from the pool - it sends a wrong *SoapAction* in the HTTP Headers. For Example
server.log:
---------------------------
ID: 3
Address: http://server:8080/....ServiceInterface
Encoding: UTF-8
Content-Type: text/xml
Headers: {Accept=[*/*], Accept-Encoding=[gzip], SOAPAction=["http://..../wsdl:*GetConfigurations*"]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<nsh:AuthenticationHeader xmlns:nsh="http:....">...</nsh:AuthenticationHeader>
</soap:Header>
<soap:Body>
<*GetTemplates* xmlns="....."> ... </*GetTemplates*>
</soap:Body></soap:Envelope>
--------------------------------------
So as one sees, the actual call is '*GetTemplates*' but the SoapAction in the header is '*GetConfigurations*', which causes an Error-500 on the remote server.
For the moment - as a hack - I remove the SoapAction from the HttpHeaders, before putting back the client stup into the pool:
Map httpHeaders = ((BindingProvider)stub).getRequestContext();
httpHeaders.remove("org.apache.cxf.message.Message.PROTOCOL_HEADERS");
But I do not feal very comfortable with this hack. Does any ody know about this issue, or have I missed something during migration?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/782733#782733]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[PicketBox Development] - JBoss AS7 Security Auditing
by Peter Skopek
Peter Skopek [https://community.jboss.org/people/pskopek] modified the document:
"JBoss AS7 Security Auditing"
To view the document, visit: https://community.jboss.org/docs/DOC-17277
--------------------------------------------------------------
h2.
h2. Configure the Domain Model Logging Subsystem
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<console-handler name="CONSOLE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<periodic-rotating-file-handler name="AUDIT" autoflush="true">
<level name="TRACE"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="audit.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="org.jboss.security.audit">
<level name="TRACE"/>
<handlers>
<handler name="AUDIT"/>
</handlers>
</logger>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
</subsystem>
The key changes to the logging subsystem are:
* A new logger category for "org.jboss.security.audit" is defined.
* A periodic rotating file handler called "AUDIT" is defined.
To crate audit.log one can you following CLI commands:
/subsystem=logging/periodic-rotating-file-handler=AUDIT/:add(suffix=.yyyy-MM-dd,formatter=%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n,level=TRACE,file={"relative-to" => "jboss.server.log.dir","path" => "audit.log"})
/subsystem=logging/logger=org.jboss.security.audit/:add(level=TRACE,category=org.jboss.security.audit,handlers=["AUDIT"])
h2. Web Applications
To enable auditing in your web applications, please configure your jboss-web.xml for your web archive. The <disable-audit> flag should be set to false.
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>form-auth</security-domain>
<disable-audit>false</disable-audit>
</jboss-web>
h2.
h2. Quick Testing
1. Attached is the form-auth.war. Deploy it in standalone/deployments
2. Make the standalone/configuration/standalone.xml changes to the logging subsystem as defined above.
3. Start JBoss AS7
4. Access http://localhost:8080/form-auth/ http://localhost:8080/form-auth/ (User: anil Password: anil)
5. If things are working, you should see audit.log under standalone/log
1:32:27,751 TRACE [org.jboss.security.audit.providers.LogAuditProvider] (http--127.0.0.1-8080-1) [Success]principal=GenericPrincipal[anil(user,)];
Note: You will need the following security domain added to standalone.xml
<security-domain name="form-auth" cache-type="default">
<authentication>
<login-module code="UsersRoles" flag="required">
<module-option name="usersProperties" value="users.properties"/>
<module-option name="rolesProperties" value="roles.properties"/>
</login-module>
</authentication>
</security-domain>
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-17277]
Create a new document in PicketBox Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 5 months