gpt4 book ai didi

docker - 如何使Hazelcast Management Center在docker中找到其节点?

转载 作者:行者123 更新时间:2023-12-02 20:42:12 24 4
gpt4 key购买 nike

我正在尝试使用docker设置hazelcast和管理中心以进行开发。不幸的是,管理中心找不到hazelcast节点。

我按照此处的指示在计算机上启动hazelcast和管理中心https://hub.docker.com/r/hazelcast/hazelcast

进入管理中心时,我会收到以下消息:

enter image description here

我试图以这种形式输入缺少的信息:

enter image description here

但是我找不到正确的值来使它工作。
有什么想法怎么了?

我使用以下命令来启动docker:

docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=162.168.1.136:5701" -p 5701:5701 hazelcast/hazelcast:3.12.5
docker run -e MC_INIT_CMD="./mc-conf.sh cluster add -H=/data -ma 192.168.1.136:5701 -cn dev" -p 8080:8080 hazelcast/management-center:3.12.5

这给出了以下输出,对我来说看起来不错:
ue73011@K57176 ~                                                                                                                                                                                                                           
$ docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=162.168.1.136:5701" -p 5701:5701 hazelcast/hazelcast:3.12.5
+ exec java -server -Dhazelcast.mancenter.enabled=false -Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=/opt/hazelcast/logging.properties -Dhazelcast.local.publicAddress=162.168.1.136:5701 com.hazelcast.core.server.Star
tServer
########################################
# JAVA_OPTS=-Dhazelcast.mancenter.enabled=false -Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=/opt/hazelcast/logging.properties -Dhazelcast.local.publicAddress=162.168.1.136:5701
# CLASSPATH=/opt/hazelcast/*:/opt/hazelcast/lib/*
# starting now....
########################################
Apr 29, 2020 4:15:20 AM com.hazelcast.config.AbstractConfigLocator
INFO: Loading 'hazelcast.xml' from the working directory.
Apr 29, 2020 4:15:21 AM com.hazelcast.config.ConfigReplacerHelper
WARNING: Could not find a replacement for '${hazelcast.mancenter.url}' on node 'null'
Apr 29, 2020 4:15:21 AM com.hazelcast.config.AbstractXmlConfigHelper
WARNING: Name of the hazelcast schema location is incorrect, using default
Apr 29, 2020 4:15:21 AM com.hazelcast.instance.AddressPicker
INFO: [LOCAL] [dev] [3.12.5] Prefer IPv4 stack is true, prefer IPv6 addresses is false
Apr 29, 2020 4:15:21 AM com.hazelcast.instance.AddressPicker
INFO: [LOCAL] [dev] [3.12.5] Picked [172.17.0.2]:5701, using socket ServerSocket[addr=/0.0.0.0,localport=5701], bind any local is true
Apr 29, 2020 4:15:21 AM com.hazelcast.instance.AddressPicker
INFO: [LOCAL] [dev] [3.12.5] Using public address: [162.168.1.136]:5701
Apr 29, 2020 4:15:21 AM com.hazelcast.system
INFO: [162.168.1.136]:5701 [dev] [3.12.5] Hazelcast 3.12.5 (20191210 - 294ff46) starting at [162.168.1.136]:5701
Apr 29, 2020 4:15:21 AM com.hazelcast.system
INFO: [162.168.1.136]:5701 [dev] [3.12.5] Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
Apr 29, 2020 4:15:21 AM com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator
INFO: [162.168.1.136]:5701 [dev] [3.12.5] Backpressure is disabled
Apr 29, 2020 4:15:22 AM com.hazelcast.instance.Node
INFO: [162.168.1.136]:5701 [dev] [3.12.5] Creating MulticastJoiner
Apr 29, 2020 4:15:22 AM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl
INFO: [162.168.1.136]:5701 [dev] [3.12.5] Starting 2 partition threads and 3 generic threads (1 dedicated for priority tasks)
Apr 29, 2020 4:15:22 AM com.hazelcast.internal.diagnostics.Diagnostics
INFO: [162.168.1.136]:5701 [dev] [3.12.5] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
Apr 29, 2020 4:15:22 AM com.hazelcast.core.LifecycleService
INFO: [162.168.1.136]:5701 [dev] [3.12.5] [162.168.1.136]:5701 is STARTING
Apr 29, 2020 4:15:25 AM com.hazelcast.internal.cluster.ClusterService
INFO: [162.168.1.136]:5701 [dev] [3.12.5]

Members {size:1, ver:1} [
Member [162.168.1.136]:5701 - 84049f1a-2343-42ab-85b8-5edba08567b5 this
]

Apr 29, 2020 4:15:25 AM com.hazelcast.core.LifecycleService
INFO: [162.168.1.136]:5701 [dev] [3.12.5] [162.168.1.136]:5701 is STARTED

ue73011@K57176 ~
$ docker run -e MC_INIT_CMD="./mc-conf.sh cluster add -H=/data -ma 192.168.1.136:5701 -cn dev" -p 8080:8080 hazelcast/management-center:3.12.5
########################################
# JAVA_OPTS=-Dhazelcast.mancenter.home=/data -Djava.net.preferIPv4Stack=true
# MC_CLASSPATH=/opt/hazelcast/mancenter/hazelcast-mancenter-3.12.5.war
# starting now....
########################################
+ exec java --add-opens java.base/java.lang=ALL-UNNAMED -server -Dhazelcast.mancenter.home=/data -Djava.net.preferIPv4Stack=true -cp /opt/hazelcast/mancenter/hazelcast-mancenter-3.12.5.war Launcher 8080 8443 hazelcast-mancenter
2020-04-29 04:16:51 [main] INFO c.h.webmonitor.config.BuildInfo - Management Center 3.12.5
2020-04-29 04:16:55 [main] INFO c.h.w.storage.DiskUsageMonitor - Monitoring /data [mode=purge, interval=1000ms, limit=512 MB]
2020-04-29 04:17:07 [main] INFO c.h.webmonitor.config.SqlDbConfig - Checking DB for required migrations.
2020-04-29 04:17:08 [main] INFO c.h.webmonitor.config.SqlDbConfig - Number of applied DB migrations: 2.
2020-04-29 04:17:08 [main] INFO c.h.w.s.s.impl.DisableLoginStrategy - Login will be disabled for 5 seconds after 3 failed login attempts. For every 3 consecutive failed login attempts, disable period will be multiplied by 10.
2020-04-29 04:17:10 [main] INFO Launcher - Hazelcast Management Center successfully started at http://localhost:8080/hazelcast-mancenter

最佳答案

您使用Hazelcast(和管理中心)版本4.0的命令,但实际上运行的是图像3.12.5。管理中心的连接机制已更改。因此,您需要使用最新版本或应用instructions for 3.12.5,如下所示:

$ docker run -p 8080:8080 hazelcast/management-center:3.12.5
$ docker run -p 5701:5701 -e MANCENTER_URL="http://<host_ip>:8080/hazelcast-mancenter" -e JAVA_OPTS="-Dhazelcast.local.publicAddress=<host_ip>:5701" hazelcast/hazelcast:3.12.5

关于docker - 如何使Hazelcast Management Center在docker中找到其节点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61494457/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com