【问题标题】:Pivotal Gemfire gfsh Locator could not find a JMX ManagerPivotal Gemfire gfsh 定位器找不到 JMX 管理器
【发布时间】:2019-07-24 12:39:50
【问题描述】:

geode 定位器和服务器由运行在 Spring Boot 应用程序中的嵌入式 Spring Data Geode 启动

尝试连接gfsh:

gfsh>connect
Connecting to Locator at [host=localhost, port=10334] ..
Locator could not find a JMX Manager

我得到了这个:

定位器找不到 JMX 管理器

gemfire 的应用日志显示:

分发定位器的起始服务器位置 本地主机/127.0.0.1[10334]

此外,日志确认已应用这些设置:

jmx-manager=true 
jmx-manager-start=true 
locators=localhost[10334]

那为什么是这个消息?

也许还有其他方法可以连接到现有的 gemfire 缓存?

【问题讨论】:

    标签: gemfire spring-data-gemfire geode gfsh


    【解决方案1】:

    我建议直接使用spring-boot-data-geodde 并按如下方式启动您的服务器和定位器:

    @SpringBootApplication
    @CacheServerApplication(name = "MySpringBootApacheGeodeCacheServerApplication")
    @EnableLocator
    @EnableManager
    public SpringBootApacheGeodeCacheServerApplication {
    
        public static void main(String[] args) {
            SpringApplication.run(SpringBootApacheGeodeCacheServerApplication.class, args);
        }
    }
    
    

    请查看Embedded (Peer & Server) Cache Applications 了解更多详情。 希望这会有所帮助,干杯。

    【讨论】:

    • 谢谢@Juan Ramos,但添加@CacheServerApplication(name = "MySpringBootApacheGeodeCacheServerApplication") @EnableLocator @EnableManager 并没有帮助......
    • 什么意思?我刚刚从头开始再次尝试,它工作得很好......你有什么具体的错误吗?。
    • 让我从头开始尝试,我只是尝试在现有应用程序上添加这些注释,但我会从头开始尝试。我正在尝试Locator could not find a JMX Manager 然后尝试连接。这就是我所得到的。不,spring 应用程序本身运行良好,没有例外
    • 另外,查看带有代码/配置的示例,尤其是pom.xml,将帮助我们验证所有星星是否对齐(例如,像产品版本一样)。例如,GemFire/Geode 有一个不便的限制,即 Gfsh 版本必须与 Locator/Manager 节点版本匹配,但这通常也很明确。无论如何,我明白你在问什么,我只是不太清楚你是如何处理事情的,从技术上讲。我不想假设任何事情。因此,除了结果之外,提供您的步骤将更清楚地说明您的问题。提前谢谢你。
    • @ACV:你能用@EnableManager(start = true)@EnableLogging(logLevel = "fine")吗?定位器启动并运行后,您应该会在日志中看到类似以下内容:Starting jmx manager agent on port 1099。通常不需要start = true,因为一旦请求到达(如果jmx-manager=true),管理器就会自动启动,但是手动设置它将强制定位器在启动期间启动管理器。正如@John 所说,无论如何,提供更多详细信息甚至是示例都会非常有帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多