실패에 verticles 사이의 클러스터를 vert.x 설정하려면 내가 문제가 vert.x eventbus 사설 클라우드 환경에서 클러스터 구성하는 데실패는 클라우드 환경에 verticles 사이의 클러스터를 vert.x 설정하기 위해 클라우드 환경
.
실험실 테스트에서는 각자 자신의 컨테이너에서 실행중인 Hazelcast 클러스터 관리자를 사용하여 클러스터를 설정하기 위해 두 개의 verticle을 만들려고합니다.
Probally 문제는 잘못된 구성에 의해 발생하지만 찾을 수 없습니다. 이 클라우드에서는 멀티 캐스트 통화를 할 수 없으며 TCP IP 검색 전략을 사용하고 있습니다.
초기 계획은 "labatf-vtx"verticle에서 실행될 bussines 프로세싱을 이벤트 버스를 통해 전파하는 "labatf-api"버티 클 (REST 호출 수신기)을 만드는 것입니다. 다음은
, verticle "labatf-API"의 클러스터 조각 구성 할 수있는 코드 :
Config hazelcastConfig = new Config();
NetworkConfig networkConfig = new NetworkConfig();
networkConfig
.setPort(5701)
.getJoin()
.getMulticastConfig()
.setEnabled(false);
networkConfig
.getJoin()
.getAwsConfig()
.setEnabled(false);
networkConfig
.getJoin()
.getTcpIpConfig()
.setEnabled(true)
.addMember("labatf-vtx:5701");
hazelcastConfig.setNetworkConfig(networkConfig);
ClusterManager mgr = new HazelcastClusterManager(hazelcastConfig);
VertxOptions options = new VertxOptions()
.setClusterManager(mgr)
.setEventBusOptions(new EventBusOptions()
.setClusterPublicHost("labatf-api")
.setClusterPublicPort(5701))
.setClustered(true);
Vertx.clusteredVertx(options, res -> {
if (res.succeeded()) {
...
}
});
그리고 "labatf-API"verticle 코드 :
Config hazelcastConfig = new Config();
NetworkConfig networkConfig = new NetworkConfig();
networkConfig
.setPort(5701)
.getJoin()
.getMulticastConfig()
.setEnabled(false);
networkConfig
.getJoin()
.getAwsConfig()
.setEnabled(false);
networkConfig
.getJoin()
.getTcpIpConfig()
.setEnabled(true)
.addMember("labatf-api:5701");
hazelcastConfig.setNetworkConfig(networkConfig);
ClusterManager mgr = new HazelcastClusterManager(hazelcastConfig);
VertxOptions options = new VertxOptions()
.setClusterManager(mgr)
.setEventBusOptions(new EventBusOptions()
.setClusterPublicHost("labatf-vtx")
.setClusterPublicPort(5701))
.setClustered(true);
Vertx.clusteredVertx(options, res -> {
if (res.succeeded()) {
...
}
});
주 "그 labatf-API를 "및"labatf-vtx "는 클라우드 환경의 모듈 이름이지만 IP를 제공하는 도메인 이름이기도하므로 각 모듈의 컨테이너 복제본간에 호출의 균형이 조정됩니다 (있는 경우).
시작 verticles 용기 후각 모듈 발견 다른하지만 몇 초 후에 연결 이하 로그로서, 목적지 피어 중단 :
"labatf-API"에서 verticle :
INFO: [192.168.84.205]:5701 [dev] [3.9] Accepting socket connection from /192.168.80.253:52191
INFO: [192.168.84.205]:5701 [dev] [3.9] Established socket connection between /192.168.84.205:5701 and /192.168.80.253:52191
WARNING:[192.168.84.205]:5701 [dev] [3.9] Wrong bind request from [192.168.80.253]:5701! This node is not the requested endpoint: [labatf-api]:5701
INFO: [192.168.84.205]:5701 [dev] [3.9] Connection[id=2, /192.168.84.205:5701->/192.168.80.253:52191, endpoint=null, alive=false, type=MEMBER] closed. Reason: Wrong bind request from [192.168.80.253]:5701! This node is not the requested endpoint: [labatf-api]:5701
INFO: [192.168.84.205]:5701 [dev] [3.9] Connection[id=5, /192.168.84.205:45323->labatf-vtx/10.36.232.241:5701, endpoint=[labatf-vtx]:5701, alive=false, type=MEMBER] closed. Reason: Connection closed by the other side
"labatf-VTX"verticle에서
:
INFO: [192.168.80.253]:5701 [dev] [3.9] Accepting socket connection from /192.168.84.205:60711
INFO: [192.168.80.253]:5701 [dev] [3.9] Established socket connection between /192.168.80.253:5701 and /192.168.84.205:60711
WARNING: [192.168.80.253]:5701 [dev] [3.9] Wrong bind request from [192.168.84.205]:5701! This node is not the requested endpoint: [labatf-vtx]:5701
INFO: [192.168.80.253]:5701 [dev] [3.9] Connection[id=3, /192.168.80.253:5701->/192.168.84.205:60711, endpoint=null, alive=false, type=MEMBER] closed. Reason: Wrong bind request from [192.168.84.205]:5701! This node is not the requested endpoint: [labatf-vtx]:5701
INFO: [192.168.80.253]:5701 [dev] [3.9] Connection[id=4, /192.168.80.253:55987->labatf-api/10.36.212.47:5701, endpoint=[labatf-api]:5701, alive=false, type=MEMBER] closed. Reason: Connection closed by the other side
어떤 도움 웰컴 될 것입니다!
답장을 보내 주셔서 감사합니다. vertex를 사용하여이 시나리오를 해결하려고 다른 클러스터 관리자를 탐색 할 것입니다. –