Zookeeper(独立)java.net.ConnectException:连接被拒绝

时间:2020-06-03 16:34:24

标签: apache-zookeeper

我只是在Mac(运行10.14.6 Mojave)中解压缩了Zookeeper(版本3.6.1),并且需要在独立配置中使用它。

我在java.net.ConnectException中收到错误堆栈:尝试执行zkCli.sh时连接被拒绝

我也找不到使用同一端口的任何其他服务。

完成错误堆栈-> http://dpaste.com/308GRY8

我可以通过执行zkServer.sh来启动它。 然后,当我检查状态时,将显示以下内容:

(base) ardey-macOS-1:conf ardey$ ../bin/zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /Users/ardey/Personal/zookeeper/apache-zookeeper-3.6.1-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost.
Error contacting service. It is probably not running.

在浏览器localhost:2181中什么也没有。也许它甚至没有按照状态指示运行。

zoo.cfg

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=5
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=2
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/Users/ardey/Personal/zookeeper/apache-zookeeper-3.6.1-bin/data/
# the port at which the clients will connect
clientPort=2181
server.1=localhost:2888:3888
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

## Metrics Providers
#
# https://prometheus.io Metrics Exporter
#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true

将感谢您的帮助。不知道我是否搞砸了。 TIA

0 个答案:

没有答案