31z4 / zookeeper-docker

Docker image packaging for Apache Zookeeper
MIT License
285 stars 243 forks source link

Version 3.6.3 failed to start on arm64 machine. #140

Closed IAseven closed 2 years ago

IAseven commented 2 years ago

Expected behavior

running

Actual behavior

aiops-zk           | /opt/java/openjdk/bin/java
aiops-zk           | ZooKeeper JMX enabled by default
aiops-zk           | Using config: /conf/zoo.cfg
aiops-zk           | Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain
aiops-zk           | Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.server.quorum.QuorumPeerMain

图片

Steps to reproduce the behavior

# 服务
services:
  aiops-zk:
    image: zookeeper:3.6.3
    container_name: aiops-zk
    # restart: always
    environment:
      - TZ=Asia/Shanghai
    volumes:
      - ./data/zookeeper/data:/data
    networks:
      - network

System configuration

Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  1
Core(s) per socket:  1
Socket(s):           2
NUMA node(s):        2
Vendor ID:           ARM
Model:               1
Model name:          Neoverse-N1
Stepping:            r3p1
BogoMIPS:            50.00
L1d cache:           64K
L1i cache:           64K
L2 cache:            512K
L3 cache:            32768K
NUMA node0 CPU(s):   0
NUMA node1 CPU(s):   1
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
31z4 commented 2 years ago

Hi @IAseven I could not reproduce the issue locally. I'm also running aarch64:

$ docker run -it --rm zookeeper:3.6.3 uname -a                                   
Linux 34b99dc70901 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Zookeeper starts normally:

$ docker run -it --rm --env TZ=Asia/Shanghai -v $(pwd)/data:/data zookeeper:3.6.3
ZooKeeper JMX enabled by default
Using config: /conf/zoo.cfg
2022-08-12 00:46:13,001 [myid:] - INFO  [main:QuorumPeerConfig@174] - Reading configuration from: /conf/zoo.cfg
2022-08-12 00:46:13,003 [myid:] - INFO  [main:QuorumPeerConfig@451] - clientPort is not set
2022-08-12 00:46:13,003 [myid:] - INFO  [main:QuorumPeerConfig@464] - secureClientPort is not set
2022-08-12 00:46:13,003 [myid:] - INFO  [main:QuorumPeerConfig@480] - observerMasterPort is not set
2022-08-12 00:46:13,004 [myid:] - INFO  [main:QuorumPeerConfig@497] - metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider
2022-08-12 00:46:13,007 [myid:] - ERROR [main:QuorumPeerConfig@722] - Invalid configuration, only one server specified (ignoring)
2022-08-12 00:46:13,015 [myid:1] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2022-08-12 00:46:13,015 [myid:1] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2022-08-12 00:46:13,015 [myid:1] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2022-08-12 00:46:13,015 [myid:1] - WARN  [main:QuorumPeerMain@138] - Either no config or no quorum defined in config, running in standalone mode
2022-08-12 00:46:13,017 [myid:1] - INFO  [main:ManagedUtil@44] - Log4j 1.2 jmx support found and enabled.
2022-08-12 00:46:13,020 [myid:1] - INFO  [main:QuorumPeerConfig@174] - Reading configuration from: /conf/zoo.cfg
2022-08-12 00:46:13,021 [myid:1] - INFO  [main:QuorumPeerConfig@451] - clientPort is not set
2022-08-12 00:46:13,021 [myid:1] - INFO  [main:QuorumPeerConfig@464] - secureClientPort is not set
2022-08-12 00:46:13,021 [myid:1] - INFO  [main:QuorumPeerConfig@480] - observerMasterPort is not set
2022-08-12 00:46:13,021 [myid:1] - INFO  [main:QuorumPeerConfig@497] - metricsProvider.className is org.apache.zookeeper.metrics.impl.DefaultMetricsProvider
2022-08-12 00:46:13,021 [myid:1] - ERROR [main:QuorumPeerConfig@722] - Invalid configuration, only one server specified (ignoring)
2022-08-12 00:46:13,024 [myid:1] - INFO  [main:ZooKeeperServerMain@122] - Starting server
2022-08-12 00:46:13,032 [myid:1] - INFO  [main:ServerMetrics@62] - ServerMetrics initialized with provider org.apache.zookeeper.metrics.impl.DefaultMetricsProvider@36b4fe2a
2022-08-12 00:46:13,034 [myid:1] - INFO  [main:FileTxnSnapLog@124] - zookeeper.snapshot.trust.empty : false
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] - 
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -   ______                  _                                          
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -  |___  /                 | |                                         
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -     / /    ___     ___   | | __   ___    ___   _ __     ___   _ __   
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -    / /    / _ \   / _ \  | |/ /  / _ \  / _ \ | '_ \   / _ \ | '__|
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -   / /__  | (_) | | (_) | |   <  |  __/ |  __/ | |_) | |  __/ | |    
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -  /_____|  \___/   \___/  |_|\_\  \___|  \___| | .__/   \___| |_|
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -                                               | |                     
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] -                                               |_|                     
2022-08-12 00:46:13,049 [myid:1] - INFO  [main:ZookeeperBanner@42] - 
2022-08-12 00:46:13,050 [myid:1] - INFO  [main:Environment@98] - Server environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT
2022-08-12 00:46:13,050 [myid:1] - INFO  [main:Environment@98] - Server environment:host.name=f10fa8bcca56
2022-08-12 00:46:13,050 [myid:1] - INFO  [main:Environment@98] - Server environment:java.version=11.0.16
2022-08-12 00:46:13,050 [myid:1] - INFO  [main:Environment@98] - Server environment:java.vendor=Eclipse Adoptium
2022-08-12 00:46:13,050 [myid:1] - INFO  [main:Environment@98] - Server environment:java.home=/opt/java/openjdk
2022-08-12 00:46:13,050 [myid:1] - INFO  [main:Environment@98] - Server environment:java.class.path=/apache-zookeeper-3.6.3-bin/bin/../zookeeper-server/target/classes:/apache-zookeeper-3.6.3-bin/bin/../build/classes:/apache-zookeeper-3.6.3-bin/bin/../zookeeper-server/target/lib/*.jar:/apache-zookeeper-3.6.3-bin/bin/../build/lib/*.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/zookeeper-prometheus-metrics-3.6.3.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/zookeeper-jute-3.6.3.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/zookeeper-3.6.3.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/snappy-java-1.1.7.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/slf4j-log4j12-1.7.25.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/slf4j-api-1.7.25.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/simpleclient_servlet-0.6.0.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/simpleclient_hotspot-0.6.0.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/simpleclient_common-0.6.0.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/simpleclient-0.6.0.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-transport-native-unix-common-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-transport-native-epoll-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-transport-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-resolver-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-handler-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-common-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-codec-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/netty-buffer-4.1.63.Final.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/metrics-core-3.2.5.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/log4j-1.2.17.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/json-simple-1.1.1.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jline-2.14.6.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jetty-util-ajax-9.4.39.v20210325.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jetty-util-9.4.39.v20210325.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jetty-servlet-9.4.39.v20210325.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jetty-server-9.4.39.v20210325.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jetty-security-9.4.39.v20210325.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jetty-io-9.4.39.v20210325.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jetty-http-9.4.39.v20210325.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/javax.servlet-api-3.1.0.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jackson-databind-2.10.5.1.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jackson-core-2.10.5.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/jackson-annotations-2.10.5.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/commons-cli-1.2.jar:/apache-zookeeper-3.6.3-bin/bin/../lib/audience-annotations-0.5.0.jar:/apache-zookeeper-3.6.3-bin/bin/../zookeeper-*.jar:/apache-zookeeper-3.6.3-bin/bin/../zookeeper-server/src/main/resources/lib/*.jar:/conf:
2022-08-12 00:46:13,050 [myid:1] - INFO  [main:Environment@98] - Server environment:java.library.path=/usr/java/packages/lib:/lib:/usr/lib:/usr/lib64:/lib64
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:java.io.tmpdir=/tmp
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:java.compiler=<NA>
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:os.name=Linux
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:os.arch=aarch64
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:os.version=5.10.104-linuxkit
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:user.name=zookeeper
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:user.home=/home/zookeeper
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:user.dir=/apache-zookeeper-3.6.3-bin
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:os.memory.free=111MB
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:os.memory.max=1000MB
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:Environment@98] - Server environment:os.memory.total=126MB
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:ZooKeeperServer@129] - zookeeper.enableEagerACLCheck = false
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:ZooKeeperServer@137] - zookeeper.digest.enabled = true
2022-08-12 00:46:13,051 [myid:1] - INFO  [main:ZooKeeperServer@141] - zookeeper.closeSessionTxn.enabled = true
2022-08-12 00:46:13,052 [myid:1] - INFO  [main:ZooKeeperServer@1461] - zookeeper.flushDelay=0
2022-08-12 00:46:13,052 [myid:1] - INFO  [main:ZooKeeperServer@1470] - zookeeper.maxWriteQueuePollTime=0
2022-08-12 00:46:13,052 [myid:1] - INFO  [main:ZooKeeperServer@1479] - zookeeper.maxBatchSize=1000
2022-08-12 00:46:13,052 [myid:1] - INFO  [main:ZooKeeperServer@243] - zookeeper.intBufferStartingSizeBytes = 1024
2022-08-12 00:46:13,052 [myid:1] - INFO  [main:BlueThrottle@141] - Weighed connection throttling is disabled
2022-08-12 00:46:13,053 [myid:1] - INFO  [main:ZooKeeperServer@1273] - minSessionTimeout set to 4000
2022-08-12 00:46:13,053 [myid:1] - INFO  [main:ZooKeeperServer@1282] - maxSessionTimeout set to 40000
2022-08-12 00:46:13,054 [myid:1] - INFO  [main:ResponseCache@45] - Response cache size is initialized with value 400.
2022-08-12 00:46:13,054 [myid:1] - INFO  [main:ResponseCache@45] - Response cache size is initialized with value 400.
2022-08-12 00:46:13,054 [myid:1] - INFO  [main:RequestPathMetricsCollector@109] - zookeeper.pathStats.slotCapacity = 60
2022-08-12 00:46:13,054 [myid:1] - INFO  [main:RequestPathMetricsCollector@110] - zookeeper.pathStats.slotDuration = 15
2022-08-12 00:46:13,054 [myid:1] - INFO  [main:RequestPathMetricsCollector@111] - zookeeper.pathStats.maxDepth = 6
2022-08-12 00:46:13,055 [myid:1] - INFO  [main:RequestPathMetricsCollector@112] - zookeeper.pathStats.initialDelay = 5
2022-08-12 00:46:13,055 [myid:1] - INFO  [main:RequestPathMetricsCollector@113] - zookeeper.pathStats.delay = 5
2022-08-12 00:46:13,055 [myid:1] - INFO  [main:RequestPathMetricsCollector@114] - zookeeper.pathStats.enabled = false
2022-08-12 00:46:13,056 [myid:1] - INFO  [main:ZooKeeperServer@1498] - The max bytes for all large requests are set to 104857600
2022-08-12 00:46:13,056 [myid:1] - INFO  [main:ZooKeeperServer@1512] - The large request threshold is set to -1
2022-08-12 00:46:13,056 [myid:1] - INFO  [main:ZooKeeperServer@339] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 clientPortListenBacklog -1 datadir /datalog/version-2 snapdir /data/version-2
2022-08-12 00:46:13,069 [myid:1] - INFO  [main:Log@169] - Logging initialized @260ms to org.eclipse.jetty.util.log.Slf4jLog
2022-08-12 00:46:13,104 [myid:1] - WARN  [main:ContextHandler@1660] - o.e.j.s.ServletContextHandler@c05fddc{/,null,STOPPED} contextPath ends with /*
2022-08-12 00:46:13,104 [myid:1] - WARN  [main:ContextHandler@1671] - Empty contextPath
2022-08-12 00:46:13,113 [myid:1] - INFO  [main:Server@375] - jetty-9.4.39.v20210325; built: 2021-03-25T14:42:11.471Z; git: 9fc7ca5a922f2a37b84ec9dbc26a5168cee7e667; jvm 11.0.16+8
2022-08-12 00:46:13,136 [myid:1] - INFO  [main:DefaultSessionIdManager@334] - DefaultSessionIdManager workerName=node0
2022-08-12 00:46:13,136 [myid:1] - INFO  [main:DefaultSessionIdManager@339] - No SessionScavenger set, using defaults
2022-08-12 00:46:13,136 [myid:1] - INFO  [main:HouseKeeper@132] - node0 Scavenging every 660000ms
2022-08-12 00:46:13,139 [myid:1] - WARN  [main:ConstraintSecurityHandler@759] - ServletContext@o.e.j.s.ServletContextHandler@c05fddc{/,null,STARTING} has uncovered http methods for path: /*
2022-08-12 00:46:13,143 [myid:1] - INFO  [main:ContextHandler@916] - Started o.e.j.s.ServletContextHandler@c05fddc{/,null,AVAILABLE}
2022-08-12 00:46:13,154 [myid:1] - INFO  [main:AbstractConnector@331] - Started ServerConnector@48075da3{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2022-08-12 00:46:13,155 [myid:1] - INFO  [main:Server@415] - Started @347ms
2022-08-12 00:46:13,155 [myid:1] - INFO  [main:JettyAdminServer@191] - Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands
2022-08-12 00:46:13,158 [myid:1] - INFO  [main:ServerCnxnFactory@169] - Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
2022-08-12 00:46:13,158 [myid:1] - WARN  [main:ServerCnxnFactory@309] - maxCnxns is not configured, using default value 0.
2022-08-12 00:46:13,159 [myid:1] - INFO  [main:NIOServerCnxnFactory@666] - Configuring NIO connection handler with 10s sessionless connection timeout, 2 selector thread(s), 16 worker threads, and 64 kB direct buffers.
2022-08-12 00:46:13,159 [myid:1] - INFO  [main:NIOServerCnxnFactory@674] - binding to port /0.0.0.0:2181
2022-08-12 00:46:13,168 [myid:1] - INFO  [main:WatchManagerFactory@42] - Using org.apache.zookeeper.server.watch.WatchManager as watch manager
2022-08-12 00:46:13,168 [myid:1] - INFO  [main:WatchManagerFactory@42] - Using org.apache.zookeeper.server.watch.WatchManager as watch manager
2022-08-12 00:46:13,169 [myid:1] - INFO  [main:ZKDatabase@132] - zookeeper.snapshotSizeFactor = 0.33
2022-08-12 00:46:13,169 [myid:1] - INFO  [main:ZKDatabase@152] - zookeeper.commitLogCount=500
2022-08-12 00:46:13,174 [myid:1] - INFO  [main:SnapStream@61] - zookeeper.snapshot.compression.method = CHECKED
2022-08-12 00:46:13,174 [myid:1] - INFO  [main:FileTxnSnapLog@470] - Snapshotting: 0x0 to /data/version-2/snapshot.0
2022-08-12 00:46:13,180 [myid:1] - INFO  [main:ZKDatabase@289] - Snapshot loaded in 11 ms, highest zxid is 0x0, digest is 1371985504
2022-08-12 00:46:13,180 [myid:1] - INFO  [main:FileTxnSnapLog@470] - Snapshotting: 0x0 to /data/version-2/snapshot.0
2022-08-12 00:46:13,184 [myid:1] - INFO  [main:ZooKeeperServer@529] - Snapshot taken in 4 ms
2022-08-12 00:46:13,189 [myid:1] - INFO  [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@136] - PrepRequestProcessor (sid:0) started, reconfigEnabled=false
2022-08-12 00:46:13,191 [myid:1] - INFO  [main:RequestThrottler@74] - zookeeper.request_throttler.shutdownTimeout = 10000
2022-08-12 00:46:13,199 [myid:1] - INFO  [main:ContainerManager@83] - Using checkIntervalMs=60000 maxPerMinute=10000 maxNeverUsedIntervalMs=0
2022-08-12 00:46:13,199 [myid:1] - INFO  [main:ZKAuditProvider@42] - ZooKeeper audit is disabled.
IAseven commented 2 years ago

Thank you very much, I will close this issue later.