使用docker在WSO2 APIpipe理器集群中设置AWS hazelcast集群

我曾尝试使用docker在AWS EC-2环境中部署APIpipe理器集群。 我正在关注WSO2 AWS集群文章。 我正在使用API​​M 2.1.0的集群模式-3 。

我已经使用了一个EC-2实例作为一个主机,每个实例将部署一个容器。 总共有7个EC-2实例用作模式-3中描述的发布者,商店,工作者,pipe理者,密钥pipe理者,stream量pipe理者和分析容器的容器。

我已经启用了hazelcast聚类,并使用“AWS”作为hazelcast聚类scheme。 我已经提供

<parameter name="domain">wso2.pub.store.domain</parameter> <parameter name="accessKey">${aws.client.id}</parameter> <parameter name="secretKey">${aws.client.secret}</parameter> <parameter name="securityGroup">${aws.security.group}</parameter> <parameter name="region">${aws.security.region}</parameter> <parameter name="tagKey">${aws.tag.key}</parameter> <parameter name="tagValue">${aws.tag.value}</parameter> <parameter name="localMemberPort">5701</parameter> 

在worker-manager容器和publisher-store容器中的axis2.xml文件中。 (我检查是否按照预期正确应用了值。)以上是我在axis2.xml中完成的唯一更改

我也join了catalina-server.xml的密码。

 <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <Server port="8005" shutdown="SHUTDOWN"> <Service className="org.wso2.carbon.tomcat.ext.service.ExtendedStandardService" name="Catalina"> <!-- optional attributes: proxyPort="80" --> <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="9763" proxyPort="80" redirectPort="9443" bindOnInit="false" maxHttpHeaderSize="8192" acceptorThreadCount="2" maxThreads="250" minSpareThreads="50" disableUploadTimeout="false" connectionUploadTimeout="120000" maxKeepAliveRequests="200" acceptCount="200" server="WSO2 Carbon Server" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg" URIEncoding="UTF-8"/> <!-- optional attributes: proxyPort="443" Added sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" for poodle vulnerability fix --> <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="9443" proxyPort="443" bindOnInit="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" maxHttpHeaderSize="8192" acceptorThreadCount="2" maxThreads="250" minSpareThreads="50" disableUploadTimeout="false" enableLookups="false" connectionUploadTimeout="120000" maxKeepAliveRequests="200" acceptCount="200" server="WSO2 Carbon Server" clientAuth="false" compression="on" scheme="https" ciphers="SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA" secure="true" SSLEnabled="true" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg" keystoreFile="${carbon.home}/repository/resources/security/wso2carbon.jks" keystorePass="wso2carbon" URIEncoding="UTF-8"/> <Engine name="Catalina" defaultHost="localhost"> <!--Realm className="org.apache.catalina.realm.MemoryRealm" pathname="${carbon.home}/repository/conf/tomcat/tomcat-users.xml"/--> <Realm className="org.wso2.carbon.tomcat.ext.realms.CarbonTomcatRealm"/> <Host name="localhost" unpackWARs="true" deployOnStartup="false" autoDeploy="false" appBase="${carbon.home}/repository/deployment/server/webapps/"> <Valve className="org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve"/> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="${carbon.home}/repository/logs" prefix="http_access_" suffix=".log" pattern="combined"/> <Valve className="org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve" threshold="600"/> <Valve className="org.wso2.carbon.tomcat.ext.valves.CompositeValve"/> </Host> </Engine> </Service> </Server> 

以上参数需要在本文中解释。

然而,AWS集群似乎没有正确configuration。 例如,在worker-manager集群中,worker和manager节点中都显示了以下相同的日志。

INFO – HazelcastClusteringAgent集群域:wso2.am.domain INFO – HazelcastClusteringAgent从axis2集群configuration加载hazelcastconfigurationINFO – HazelcastClusteringAgent使用基于aws的成员资格pipe理schemeINFO – HazelcastClusteringAgent Hazelcast在12531ms初始化信息 – HazelcastClusteringAgent本地成员:[$ {member.Id} ] – 主机: $ {container-ip}远程主机:null ,端口:5701,HTTP:8280,HTTPS:8243,域:wso2.am.domain,子域:worker,活动:true信息 – HazelcastClusteringAgent选中此项成员[$ {member.Id}]作为协调者节点信息 – HazelcastClusteringAgent集群初始化完成

请注意,主机使用容器IPparsing,远程主机为空。 这是预期的行为?

AFAIK的期望是有第二个节点join为成员。 有什么configuration,我失踪了?

在另一个问题上 ,build议在networking中设置公共地址属性。

无论如何,当我们手动设置集群的时候,用axis2.xml来做到这一点? [在AWS设置中自动执行是另一个问题,因为公共IP在编排过程中发生了变化。]