AWS EC2 with S3 PING Wildfly 8.2 session not shared - apache

The two wildfly instances are not in the same session.
I have configured the following parts of the standalone-full-ha.xml :
<subsystem xmlns="urn:jboss:domain:modcluster:1.2">
<mod-cluster-config advertise-socket="modcluster" proxy- list="10.0.0.146:6666" balancer="mycluster" advertise="false" connector="ajp">
</subsystem>
10.0.0.146 is the apache instance private IP.
<subsystem xmlns="urn:jboss:domain:jgroups:2.0" default-stack="tcp">
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="S3_PING">
<property name="access_key">
XXXXXXXXXXXXXXXX
</property>
<property name="secret_access_key">
XXXXXXXXXXXXXXXXXXXXXXX
</property>
<property name="location">
wildfly-bucket
</property>
<property name="timeout">
16000
</property>
</protocol>
<protocol type="MERGE2"/>
<protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
<protocol type="RSVP"/>
</stack>
</subsystem>
....
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:10.0.0.210}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:10.0.0.210}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
then I have started the instances (server1 and server2):
./standalone.sh -Djboss.node.name=server1 -c standalone-full-ha.xml
In the server logging i get it right:
07:41:27,019 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 63) ISPN000094: Received new cluster view: [server2/web|1] (2) [server2/web, server1/web]
Apache mod_cluster recognizes the two nodes.
In S3 I have granted all the permission to the “wildfly-bucket” to authenticated user, everyone and to myself.
I have also tried adding a bucket policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::XXXXXXXXXXXXXX:user/laura"
},
"Action": [
"s3:GetObjectVersion",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::wildfly-bucket/*"
},
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::XXXXXXXXXXX:user/laura"
},
"Action": [
"s3:ListBucketVersions",
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::wildfly-bucket"
}
]
}
The user “laura” is in a Group with AdministratorAccess.
I have set the two instances+apache in the same security group and even tried with the same availability zone.
For the security group I have set the following rules
INBOUND:
Custom TCP Rule TCP 7600 0.0.0.0/0
Custom TCP Rule TCP 8080 0.0.0.0/0
SSH TCP 22 0.0.0.0/0
HTTP TCP 80 0.0.0.0/0
All traffic All All 0.0.0.0/0
Custom ICMP Rule Echo Reply N/A 0.0.0.0/0
All ICMP All N/A 0.0.0.0/0
Custom TCP Rule TCP 9990 0.0.0.0/0
OUTBOUND:
Custom TCP Rule TCP 7600 0.0.0.0/0
All traffic All All 0.0.0.0/0
What am I missing?
Can you please help me?
Thank you.

Related

WSO2 EI 6.6.0 with RabbitMQ 3.8.5 - Unable to get exact posted payload in rabbitmq console

I am just trying to post incoming payload to rabbitmq by using messageStore in WSO2 EI 6.6.0.
API-Code:
<api context="/testmqload" name="Test" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST">
<inSequence>
<log level="custom">
<property expression="json-eval($)" name="Test"/>
</log>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<property name="messageType" value="application/json" scope="axis2"/>
<store messageStore="SafaricomRequestStore"/>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>
MessageStore:
<?xml version="1.0" encoding="UTF-8"?>
<messageStore class="org.apache.synapse.message.store.impl.rabbitmq.RabbitMQStore" name="SafaricomRequestStore" xmlns="http://ws.apache.org/ns/synapse">
<parameter name="store.rabbitmq.host.name">puffin.rmq2.cloudamqp.com</parameter>
<parameter name="store.producer.guaranteed.delivery.enable">false</parameter>
<parameter name="store.rabbitmq.host.port">5672</parameter>
<parameter name="store.rabbitmq.route.key">SafaricomRequestQueue</parameter>
<parameter name="store.rabbitmq.username">username</parameter>
<parameter name="store.rabbitmq.virtual.host">host</parameter>
<parameter name="rabbitmq.connection.ssl.enabled">false</parameter>
<parameter name="store.rabbitmq.exchange.name">amq.direct</parameter>
<parameter name="store.rabbitmq.queue.name">SafaricomRequestQueueTest4</parameter>
<parameter name="store.rabbitmq.password">password</parameter>
</messageStore>
Incoming Request:
{
"result": {
"message": {
"M-PESA_Cash_Out": "10.00",
"M-PESA_Fee": "15.27",
"Transaction_Fee": "0.44",
"acct_no": "4000000009",
"date": "04-JAN-2022",
"power_id": "cab48a3b620e4b3f8d7c2d13a9efced7",
"receiving_mobile": "799999999",
"time": "17:47:29",
"total_amount": "25.71",
"transaction_id": "1002201040000053",
"wallet_bank": "M-PESA"
},
"new_txn_id": 1002201040000053,
"status": "S"
}
}
Message is posted in rabbitMQ like below
when i decoded above screenshot value by using base64 decoder online, getting below values.
If you notice above screenshot, i am geting some other values in addition to posted payload which is marked as yellow above.
By using Inbound endpoint, i tried to fetch message from queue which will print message structure like below in sequence.
{
"text":"base64 encoded value...."
}
may i know why it is having other extra values too in addition with posted payload? or what can i do to fetch only posted payload from queue?
As per tmoasz suggested in comment, modified Code- which are mentioned below.
Modified API :
<?xml version="1.0" encoding="UTF-8"?>
<api context="/rabbitmqtest" name="RabbitMQTestAPI" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST">
<inSequence>
<log level="custom">
<property name="RabbitMQTestAPI" value="is called***"/>
<property name="IncomingRequest" expression="json-eval($)"/>
</log>
<property description="Initiate asynchronous mediation flow" name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<property description="Generate 202 response from mediation flow" name="FORCE_SC_ACCEPTED" scope="axis2" type="STRING" value="true"/>
<send description="Publish request payload to AMQP endpoint">
<endpoint key="RabbitMQ-QueueEP"/>
</send>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>
Endpoint Code:
<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="RabbitMQ-QueueEP" xmlns="http://ws.apache.org/ns/synapse">
<address uri="rabbitmq:/RabbitMQTestQueue?rabbitmq.server.host.name=puffin.rmq2.cloudamqp.com&rabbitmq.server.port=5672&rabbitmq.server.user.name=username&rabbitmq.server.password=password&rabbitmq.queue.name=RabbitMQTestQueue&rabbitmq.exchange.name=amq.direct">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>-1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
Wire logs:
[2022-01-06 19:01:11,282] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "POST /rabbitmqtest HTTP/1.1[\r][\n]"
[2022-01-06 19:01:11,283] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Content-Type: application/json[\r][\n]"
[2022-01-06 19:01:11,285] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "User-Agent: PostmanRuntime/7.28.4[\r][\n]"
[2022-01-06 19:01:11,286] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Accept: */*[\r][\n]"
[2022-01-06 19:01:11,289] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Cache-Control: no-cache[\r][\n]"
[2022-01-06 19:01:11,290] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Postman-Token: 75a4502d-7df0-444e-8ba8-39bcd6265204[\r][\n]"
[2022-01-06 19:01:11,290] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Host: localhost:8280[\r][\n]"
[2022-01-06 19:01:11,291] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Accept-Encoding: gzip, deflate, br[\r][\n]"
[2022-01-06 19:01:11,292] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Connection: keep-alive[\r][\n]"
[2022-01-06 19:01:11,292] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "Content-Length: 25[\r][\n]"
[2022-01-06 19:01:11,293] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "[\r][\n]"
[2022-01-06 19:01:11,300] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "{[\r][\n]"
[2022-01-06 19:01:11,301] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> " "name":"justin"[\r][\n]"
[2022-01-06 19:01:11,302] DEBUG {org.apache.synapse.transport.http.wire} - HTTP-Listener I/O dispatcher-4 >> "}"
[2022-01-06 19:01:11,306] INFO {org.apache.synapse.mediators.builtin.LogMediator} - RabbitMQTestAPI = is called***, IncomingRequest = {
"name":"justin"
}
[2022-01-06 19:01:11,309] INFO {org.apache.axis2.transport.rabbitmq.RabbitMQConnectionFactory} - Initializing channel pool of 20
[2022-01-06 19:01:11,879] ERROR {org.apache.axis2.transport.rabbitmq.RabbitMQConnectionFactory} - [puffin.rmq2.cloudamqp.com_5672_username_passwordI_null_null_null_null_null_null_null_null_null] Error creating connection to RabbitMQ Broker. Reattempting to connect. java.io.IOException
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:105)
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:101)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:123)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:382)
at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:58)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:103)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:877)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:839)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:661)
at org.apache.axis2.transport.rabbitmq.utils.RabbitMQUtils.createConnection(RabbitMQUtils.java:56)
at org.apache.axis2.transport.rabbitmq.RabbitMQConnectionFactory.createConnection(RabbitMQConnectionFactory.java:159)
at org.apache.axis2.transport.rabbitmq.RMQChannelPool.<init>(RMQChannelPool.java:20)
at org.apache.axis2.transport.rabbitmq.RabbitMQConnectionFactory.initializeConnectionPool(RabbitMQConnectionFactory.java:392)
at org.apache.axis2.transport.rabbitmq.RabbitMQConnectionFactoryManager.getConnectionFactory(RabbitMQConnectionFactoryManager.java:105)
at org.apache.axis2.transport.rabbitmq.RabbitMQSender.getConnectionFactory(RabbitMQSender.java:135)
at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:81)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:634)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:571)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:408)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:74)
at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:56)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.rest.Resource.process(Resource.java:331)
at org.apache.synapse.rest.API.process(API.java:441)
at org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:135)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:113)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:71)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:327)
at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:98)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:368)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:427)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:182)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method<connection.close>(reply-code=530, reply-text=NOT_ALLOWED - access to vhost '/' refused for user 'username', class-id=10, method-id=40)
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:32)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:366)
at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:229)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:117)
... 42 more
If you want to send, just JSON message as payload to RabbitMQ, don't use message store. Message stores, are storing all synapse message context with payload for later processing - that is their purpose. So that is why you see in decoded RabbitMQ Payload not only the message, but also additional properties.
For sending JSON to RabbitMQ you can use just <send/> to a proper endpoint.
Look as this documentation sample.
I have also have made some sequance template for more easy use of sending messages to rabitmq, so next you can may look at this helpful post, and adapt to your own needs.
I have resolved above issue by making endpoint call with the use of send mediator as #tmoasz suggested instead of message store.
API Code:
<?xml version="1.0" encoding="UTF-8"?>
<api context="/rabbitmqtest" name="RabbitMQTestAPI" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST">
<inSequence>
<log level="custom">
<property name="RabbitMQTestAPI" value="is called***"/>
<property name="IncomingRequest" expression="json-eval($)"/>
</log>
<property description="Initiate asynchronous mediation flow" name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<property description="Generate 202 response from mediation flow" name="FORCE_SC_ACCEPTED" scope="axis2" type="STRING" value="true"/>
<send description="Publish request payload to AMQP endpoint">
<endpoint key="RabbitMQ-QueueEP"/>
</send>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>
RabbitMQ-QueueEP :
<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="RabbitMQ-QueueEP" xmlns="http://ws.apache.org/ns/synapse">
<address uri="rabbitmq:/AMQPConnectionFactory?rabbitmq.server.host.name=puffin.rmq2.cloudamqp.com&rabbitmq.server.port=5672&rabbitmq.server.user.name=username&rabbitmq.server.password=password&rabbitmq.queue.name=RabbitMQTestQueue&rabbitmq.queue.routing.key=RabbitMQTestQueue&rabbitmq.server.virtual.host=hostname&rabbitmq.exchange.name=amq.direct">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>-1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
API Hit:
RabbitMQ Console:

Infinispan, cross-dc replication: java.lang.IllegalStateException: Site <sitename> not defined in all the cluster members

I'm trying to setup a cross-datacenter replication mode between two infinispans 9.4.x as per Keycloak documentation, but the thing is that I'm trying to do this in sligtly modified environment:
multicast doesn't work between DC for obvious reasons
I have to use the port 7601 because 7600 is already used on this host by Keycloak JGroups transport (yup, by it's internal infinispan, and my future question would be "why do I need to use external extra Infinispan instance instead of setiing up replication between internal Keycloak's Infinispans, but first things first).
These a parts of my config that I added/modified:
[...]
<replicated-cache-configuration name="sessions-cfg" mode="SYNC" start="EAGER" batching="false">
<backups>
<backup site="site2" failure-policy="FAIL" strategy="SYNC" enabled="true">
<take-offline after-failures="3" min-wait="60000"/>
</backup>
</backups>
<locking acquire-timeout="0"/>
</replicated-cache-configuration>
[...]
<subsystem xmlns="urn:infinispan:server:jgroups:9.4">
<channels default="infinicluster">
<channel name="infinicluster" stack="tcp"/>
<channel name="xsite" stack="tcp"/>
</channels>
<stacks default="${jboss.default.jgroups.stack:udp}">
<stack name="udp">
<transport type="UDP" socket-binding="jgroups-udp"/>
<protocol type="PING"/>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC_NB"/>
<protocol type="MFC_NB"/>
<protocol type="FRAG3"/>
<relay site="site1">
<remote-site name="site2" channel="xsite"/>
</relay>
</stack>
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPPING">
<property name="initial_hosts">
host1.tld[7601],host2.tld[7601]
</property>
<property name="ergonomics">
false
</property>
</protocol>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2">
<property name="use_mcast_xmit">
false
</property>
Of course, I changed the port numbers in JGroups socket bindings accordingly.
Both instances seem to be starting okay (complaining only about rest https bindings, which seems to be a minor error), I can even see the communications between instances in the logs:
2020-05-06 23:28:54,713 INFO [org.infinispan.CLUSTER] (remote-thread--p2-t20)[Context=___hotRodTopologyCache]ISPN100002: Starting rebalance with members [host1.tld, host2.tld], phase READ_OLD_WRITE_ALL, topology id 2
2020-05-06 23:28:54,779 INFO [org.infinispan.CLUSTER] (remote-thread--p2-t2) [Context=___hotRodTopologyCache]ISPN100009: Advancing to rebalance phase READ_ALL_WRITE_ALL, topology id 3
2020-05-06 23:28:54,807 INFO [org.infinispan.CLUSTER] (remote-thread--p2-t21)[Context=___hotRodTopologyCache]ISPN100009: Advancing to rebalance phase READ_NEW_WRITE_ALL, topology id 4
2020-05-06 23:28:54,834 INFO [org.infinispan.CLUSTER] (remote-thread--p2-t4)[Context=___hotRodTopologyCache]ISPN100010: Finished rebalance with members [host1.tld,host2.tld], topology id 5
The main issue is, that as soon as I open the web management page of any of the instances, I get the error on the logs (suppose I open the management page from site1, host1.tld):
2020-05-06 23:30:49,057 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("subsystem" => "datagrid-infinispan"),
("cache-container" => "clustered")]): java.lang.IllegalStateException: Site host2.tld not defined in all the cluster members
at org.infinispan.xsite.XSiteAdminOperations.clusterStatus(XSiteAdminOperations.java:78)
at org.infinispan.xsite.GlobalXSiteAdminOperations.globalStatus(GlobalXSiteAdminOperations.java:93)
at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.filterSitesByStatus(CacheContainerMetricsHandler.java:343)
at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:297)
at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:59)
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1411)
at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:265)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:231)
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
at org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:212)
at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72)
at org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:93)
at org.jboss.as.domain.http.server.security.ElytronIdentityHandler.lambda$handleRequest$0(ElytronIdentityHandler.java:62)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:246)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
at org.jboss.as.domain.http.server.security.ElytronIdentityHandler.handleRequest(ElytronIdentityHandler.java:61)
at io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:56)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
If I open the web management page from another site, the error is mirrored - this time it complains about host1.tld. It's obvious that I did something wrong, but I have no idea what exactly. Will be glad if someone could help me.

IHS not redirecting the request to WAS

So, I have installed WAS, and IHS.
I'm able to access the application directly from WAS. But IHS is trying to reply the request and its not using the plugin to reply the request.
I'm able to access the default IHS page, but not to the test application.
To create the IHS, I have done the standard stuff:
1- Install IHS and Plugin
2- Configure the plugin within the IHS
3- Create an unmanaged node on the DMGR
4- Create the webserver instance on the DMGR
I'm just trying to call a sample application called hello (for helloworld)
I see the request on the webservers logs, but they are not being redirected to the WAS.
This is the mention of the plugin on the httpd.conf:
LoadModule was_ap22_module /opt/ibm/plugin-ihs-85/test_webserver_instance1/bin/64bits/mod_was_ap22_http.so
WebSpherePluginConfig /opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-cfg.xml
This is the plugin-cfg.xml:
<?xml version="1.0" encoding="ISO-8859-1"?><!--HTTP server plugin config file for the webserver test_Cell.test_webserver_01_unmanagedNode_1.test_webserver_instance1 generated on 20
17.06.25 at 07:37:51 PM CDT-->
<Config ASDisableNagle="false" AcceptAllContent="true" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" FailoverToNext="false" HTTPMaxHeaders="
300" IISDisableFlushFlag="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" KillWebServerStartUpOnParseErr="false" MarkBusyDown="false" OS400C
onvertQueryStringToJobCCSID="false" RefreshInterval="60" ResponseChunkSize="64" SSLConsolidate="true" StrictSecurity="false" TrustedProxyEnable="false" VHostMatchingCompat="f
alse">
<Log LogLevel="Error" Name="/opt/ibm/plugin-ihs-85/test_webserver_instance1/logs/test_webserver_instance1/http_plugin.log"/>
<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="false"/>
<Property Name="ESIEnableToPassCookies" Value="false"/>
<Property Name="ESICacheidFull" Value="false"/>
<Property Name="PostSizeLimit" Value="-1"/>
<Property Name="PostBufferSize" Value="0"/>
<Property Name="PluginInstallRoot" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/"/>
<Property Name="Keyfile" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.kdb"/>
<Property Name="Stashfile" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.sth"/>
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9080"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9443"/>
<VirtualHost Name="*:5060"/>
<VirtualHost Name="*:5061"/>
<VirtualHost Name="*:443"/>
<VirtualHost Name="*:9061"/>
<VirtualHost Name="*:9044"/>
<VirtualHost Name="*:9062"/>
<VirtualHost Name="*:9081"/>
<VirtualHost Name="*:9444"/>
<VirtualHost Name="*:9045"/>
</VirtualHostGroup>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="false" LoadBalance="Round Robin" Name="test" PostBufferSize="0" PostSizeLimit="-1"
RemoveSpecialHeaders="true" RetryInterval="60" ServerIOTimeoutRetry="-1">
<Server CloneID="1bjgscrk8" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="test_app_01_node_1_test1" ServerIOTimeout="900" W
aitForContinue="false">
<Transport Hostname="test_app_01" Port="9080" Protocol="http"/>
<Transport Hostname="test_app_01" Port="9443" Protocol="https">
<Property Name="keyring" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.kdb"/>
<Property Name="stashfile" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.sth"/>
</Transport>
</Server>
<Server CloneID="1bjgscsei" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="test_app_01_node_1_test2" ServerIOTimeout="900" W
aitForContinue="false">
<Transport Hostname="test_app_01" Port="9081" Protocol="http"/>
<Transport Hostname="test_app_01" Port="9444" Protocol="https">
<Property Name="keyring" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.kdb"/>
<Property Name="stashfile" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.sth"/>
</Transport>
</Server>
<Server CloneID="1bjgscstv" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="test_app_02_node_1_test3" ServerIOTimeout="900" W
aitForContinue="false">
<Transport Hostname="test_app_02" Port="9080" Protocol="http"/>
<Transport Hostname="test_app_02" Port="9443" Protocol="https">
<Property Name="keyring" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.kdb"/>
<Property Name="stashfile" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.sth"/>
</Transport>
</Server>
<Server CloneID="1bjgsctbv" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="test_app_02_node_1_test4" ServerIOTimeout="900" W
aitForContinue="false">
<Transport Hostname="test_app_02" Port="9081" Protocol="http"/>
<Transport Hostname="test_app_02" Port="9444" Protocol="https">
<Property Name="keyring" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.kdb"/>
<Property Name="stashfile" Value="/opt/ibm/plugin-ihs-85/test_webserver_instance1/config/test_webserver_instance1/plugin-key.sth"/>
</Transport>
</Server>
<PrimaryServers>
<Server Name="test_app_01_node_1_test1"/>
<Server Name="test_app_01_node_1_test2"/>
<Server Name="test_app_02_node_1_test3"/>
<Server Name="test_app_02_node_1_test4"/>
</PrimaryServers>
</ServerCluster>
<UriGroup Name="default_host_test_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hello/*"/>
</UriGroup>
<Route ServerCluster="test" UriGroup="default_host_test_URIs" VirtualHostGroup="default_host"/>
<RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
<filters enable="false" type="URI">
<filterValues enable="false" value="/snoop"/>
<filterValues enable="false" value="/hitcount"/>
</filters>
<filters enable="false" type="SOURCE_IP">
<filterValues enable="false" value="255.255.255.255"/>
<filterValues enable="false" value="254.254.254.254"/>
</filters>
<filters enable="false" type="JMS">
<filterValues enable="false" value="destination=aaa"/>
</filters>
<filters enable="false" type="WEB_SERVICES">
<filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
</filters>
</RequestMetrics>
</Config>
Normally IHS is going to use port 80 to receive communication and rely to the application server.
The port 80 is in the default virtual host. So I added the listening port I'm using (1080) to the default virtual host.

How to Set Jgroups UDP to unicast instead of default multicast in standalone-ha.xml

Jgroups use "IP multicasting by default to send messages to all members (UDP) and for discovery of the initial members . However, if multicasting cannot be used, the UDP can be configured to send multiple unicast messages instead of one multicast message. To configure UDP to use multiple unicast messages to send a group message instead of using IP multicasting, the ip_mcast property has to be set to false." (as per jboss documentation https://developer.jboss.org/ )
My question is how can I pass "ip_mcast" value to false in wildfly? Below is the sample jgroups subsystem in the standalone-ha.xml. In the xsd I don't see a way to pass this value. Please help!!
<subsystem xmlns="urn:jboss:domain:jgroups:4.0">
<channels default="ee">
<channel name="ee" stack="udpgossip"/>
</channels>
<stacks>
<stack name="udpgossip">
<transport type="UDP" socket-binding="jgroups-tcp"/>
<protocol type="TCPGOSSIP">
<property name="initial_hosts">172.17.0.2[12001]</property>
</protocol>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
</stack>
</stacks>
</subsystem>
In the schema, <transport/> extends <protocol/>, and protocols can have properties, as your config sample already shows. So the correct way to set it should be
<transport type="UDP" socket-binding="jgroups-tcp">
<property name="ip_mcast">false</property>
</transport>

WildFly 10 Jgroups allways binding to localhost interface

Hi I'm trying to develop a clustered application that uses Infinispan for caching. First I tried to run in replicated mode by starting two instance of wildfly using the localhost as binding interface (with port offsets). This worked fine. But once I start the server using interface IP, cluster is not forming. Still I can access other services using the interface IP.
I tried to telnet the Jgroups port using interface IP address and it failed. But telnetting to localhost works for Jgorups port.
(Then entered localhsot[port] IP's to initial host configuration element in tcpping. Then cluster formation worked.)
So my question is why does it bind to localhost even after starting wildfly using interface IP.
Here is my configuration. (I cant use UDP, therefore need to use tcpping for cluster formation)
Started the wilfly server using
standalone.bat -Djboss.server.base.dir=../standalone_isuru -c standalone-full-ha.xml -b 192.168.17.33 -Djboss.node.name=isuru -Djboss.socket.binding.port-offset=1
Jgourps configuration
<subsystem xmlns="urn:jboss:domain:jgroups:4.0">
<channels default="ee">
<channel name="ee" stack="tcpping"/>
</channels>
<stacks>
<stack name="udp">
.
.
</stack>
<stack name="tcp">
.
.
</stack>
<stack name="tcpping">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPPING">
<property name="initial_hosts">
192.168.17.33[7601], 192.168.14.39[7700], 192.168.17.33[7800]
</property>
<property name="num_initial_members">
2
</property>
<property name="port_range">
5
</property>
<property name="timeout">
1000
</property>
</protocol>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
</stack>
</stacks>
Infinispan cache config
<cache-container name="replicated_cache" default-cache="default" module="org.wildfly.clustering.server" jndi-name="infinispan/replicated_cache">
<transport lock-timeout="60000"/>
<replicated-cache name="customer" jndi-name="infinispan/replicated_cache/customer" mode="SYNC">
<transaction locking="OPTIMISTIC" mode="FULL_XA"/>
<eviction strategy="NONE"/>
</replicated-cache>
</cache-container>
I posted the same question in Jboss developer since I didn't get any answer here.
And this is the answer I got from there.
By default Jgroups bind to private interface. When starting the server this IP can be provided as well.
standalone.bat -b 192.168.17.39 -bprivate=192.168.17.39
You can refer to the interfaces section for interface configuration.
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="private">
<inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
socket bindings, binds jgroups to private interface
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
.
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
.
</socket-binding-group>
Jgroups subsystem
<stack name="tcpping">
<transport type="TCP" socket-binding="jgroups-tcp"/>
.
</stack>