两个 Wildfly 实例不在同一个会话中。
我已经配置了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 是 apache 实例私有 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>
然后我启动了实例(server1 和 server2):
./standalone.sh -Djboss.node.name=server1 -c standalone-full-ha.xml
在服务器日志记录中,我做对了:
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 识别这两个节点。在 S3 中,我已将“wildfly-bucket”的所有权限授予经过身份验证的用户、每个人以及我自己。我还尝试添加存储桶策略:
{
"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"
}
]
}
用户“laura”在具有 AdministratorAccess 的组中。
我已将两个实例+apache 设置在同一个安全组中,甚至尝试使用同一个可用区。
对于安全组,我设置了以下入站规则:
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
出境:
Custom TCP Rule TCP 7600 0.0.0.0/0
All traffic All All 0.0.0.0/0
我错过了什么?
你能帮我么?
谢谢你。