java - Hazelcast 管理中心 - 成员无法沟通

标签 java spring-boot caching hazelcast

我有这个连接配置:

config.getManagementCenterConfig().setEnabled(true);
config.getManagementCenterConfig().setUrl("http://localhost:8096/hazelcast-mancenter");

管理中心控制台报错:

2019-05-29 12:44:27 [qtp873415566-15] WARN  org.eclipse.jetty.server.HttpChannel - /hazelcast-mancenter/collector.do
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.hazelcast.webmonitor.model.DeserializationException: nodeState field is null
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)

客户端 springboot 应用程序控制台错误:

2019-05-29 12:54:27.059  INFO [-,,,] 12068 --- [           main] c.h.i.m.ManagementCenterService          : [10.1.204.138]:5701 [dev] [3.7.7] Hazelcast will connect to Hazelcast Management Center on address: 
http://localhost:8096/hazelcast-mancenter
2019-05-29 12:54:27.090  INFO [-,,,] 12068 --- [           main] com.hazelcast.core.LifecycleService      : [10.1.204.138]:5701 [dev] [3.7.7] [10.1.204.138]:5701 is STARTED
2019-05-29 12:54:27.090  INFO [-,,,] 12068 --- [MC.State.Sender] c.h.i.p.impl.PartitionStateManager       : [10.1.204.138]:5701 [dev] [3.7.7] Initializing cluster partition table arrangement...
2019-05-29 12:54:27.115  INFO [-,,,] 12068 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'hazelcastInstance' of type [com.hazelcast.instance.HazelcastInstanceProxy] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-29 12:54:27.197  INFO [-,,,] 12068 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'cacheManager' of type [com.hazelcast.spring.cache.HazelcastCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-29 12:54:27.205  INFO [-,,,] 12068 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'cacheAutoConfigurationValidator' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$CacheManagerValidator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-29 12:54:27.292  INFO [-,,,] 12068 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$a3818d32] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-29 12:54:27.342  INFO [-,,,] 12068 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.web.client.feign.TraceFeignClientAutoConfiguration$FeignBeanPostProcessorConfiguration' of type [org.springframework.cloud.sleuth.instrument.web.client.feign.TraceFeignClientAutoConfiguration$FeignBeanPostProcessorConfiguration$$EnhancerBySpringCGLIB$$c6f962fb] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-29 12:54:27.385  INFO [-,,,] 12068 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration' of type [org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$$EnhancerBySpringCGLIB$$6f4b3654] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-29 12:54:28.645  INFO [-,,,] 12068 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8090 (http)
2019-05-29 12:54:28.667  INFO [-,,,] 12068 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-05-29 12:54:28.669  INFO [-,,,] 12068 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.15
2019-05-29 12:54:28.799  WARN [-,,,] 12068 --- [MulticastThread] c.h.i.cluster.impl.MulticastService      : [10.1.204.138]:5701 [dev] [3.7.7] Received a JoinRequest with a different packet version! This -> 4, Incoming -> -84, Sender -> /10.1.204.123
2019-05-29 12:54:29.260  INFO [-,,,] 12068 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-05-29 12:54:29.260  INFO [-,,,] 12068 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 12542 ms
2019-05-29 12:54:30.158  WARN [-,,,] 12068 --- [MC.State.Sender] c.h.i.m.ManagementCenterService          : [10.1.204.138]:5701 [dev] [3.7.7] Failed to send response, responseCode:405 url:http://localhost:8096/hazelcast-mancenter/collector.do

我没有看到任何配置来设置 nodeStatus,如 errorstack trace 中所述。

请告知要进行的配置。谢谢!

最佳答案

正如@emre 在评论中所说,有关于它的官方文本:

... the Management Center is compatible with Hazelcast IMDG cluster members having the same or the previous minor version. For example, Hazelcast Management Center version 3.12.x works with Hazelcast IMDG cluster members having version 3.11.x or 3.12.x.

来自 Hazelcast Management Center Documentation .

异常消息 ( DeserializationException: nodeState field is null ) 对实现这一点并没有真正的帮助。 同样的事情发生在我身上,我在版本 1.5.9.RELEASE 中使用 Spring boot parent因此它对 hazelcast ( 3.7.8 ) 的依赖性很旧。您始终可以在 spring-boot-dependencies 中检查 spring 自动配置依赖项的版本。项目的pom.xml文件。您可以在属性部分看到 hazelcast 版本,定义如下:

<hazelcast.version>3.7.8</hazelcast.version>

你可以

  • 更改spring-boot-starter-parent版本更新(例如 2.2.0.RELEASE )并且问题应该消失或
  • 只覆盖你自己的属性pom.xml使用较新的 hazelcast 版本。

关于java - Hazelcast 管理中心 - 成员无法沟通,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56355195/

相关文章:

java - java的内在对象锁有一个单独的关联条件对象是什么意思

java - IntelliJ IDEA 不显示任何端点选项卡 : "Failed to retrieve application JMX service URL"

java - Windows 上的 Docker 引擎会忽略 Spring Boot Web 应用程序的 server.port 属性

java - 未使用 Spring Webflux 路由器功能

c# - 如何在 NHibernate.Linq 中缓存 .Count() 查询?

ruby-on-rails - 停止在 Rails 和浏览器中缓存图像?

java - 更新方法不会保存到Grails中的数据库

Java 将字符串读取到二维 boolean 数组

java - Spring-Security:使用自定义身份 validator 和自定义登录页面

java - Spring 缓存抽象和 Ehcache 的问题