Cannot open local storage '/opt/sonatype-work/nexus3/db/config' with mode=rw - orientdb

I am upgrading the nexus to 3.22.0 in my ubuntu machine. For that i have followed this guide "https://help.sonatype.com/repomanager3/installation/run-as-a-service". Nexus is running locally with nexus user, but when I check the ui getting 502 bad gateway error and in logs i found this. Please help on this.
2020-04-15 04:20:48,643+0000 ERROR [FelixStartLevel] *SYSTEM Felix - Framework listener delivery error.
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage '/opt/sonatype-work/nexus3/db/config' with mode=rw
DB name="config"
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:323)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
at org.sonatype.nexus.orient.DatabaseManagerSupport.connect(DatabaseManagerSupport.java:178)
at org.sonatype.nexus.orient.DatabaseManagerSupport.createInstance(DatabaseManagerSupport.java:312)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.sonatype.nexus.orient.DatabaseManagerSupport.instance(DatabaseManagerSupport.java:289)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NullPointerException: null
at com.orientechnologies.orient.core.storage.impl.local.paginated.wal.ODiskWriteAheadLog.cutTill(ODiskWriteAheadLog.java:919)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.makeFullCheckpoint(OAbstractPaginatedStorage.java:3706)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.recoverIfNeeded(OAbstractPaginatedStorage.java:3937)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:288)
... 14 common frames omitted
2020-04-15 04:20:48,671+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Uptime: 22 seconds and 114 milliseconds (nexus-oss-edition/3.22.0.02)
2020-04-15 04:20:48,672+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Shutting down
2020-04-15 04:20:48,673+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop STORAGE
2020-04-15 04:20:48,676+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - OrientDB Server is shutting down...
2020-04-15 04:20:48,676+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - Shutting down protocols
2020-04-15 04:20:48,676+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.plugin.OServerPluginManager - Shutting down plugins:
2020-04-15 04:20:48,676+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.plugin.OServerPluginManager - - jmx
2020-04-15 04:20:48,677+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - OrientDB Server shutdown complete
2020-04-15 04:20:48,677+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - Orient Engine is shutting down...
2020-04-15 04:20:48,678+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: component...
2020-04-15 04:20:48,700+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: config...
2020-04-15 04:20:48,700+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: OSystem...
2020-04-15 04:20:49,312+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - OrientDB Engine shutdown complete
2020-04-15 04:20:49,313+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl - Shutdown
2020-04-15 04:20:49,313+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop KERNEL

Related

How to solve Invalid value javax.net.ssl.SSLHandshakeException:for confluent-platform in docker?

Below is my Docker-compose file for adding Confluent-platform broker security
i tried so much ways,but it is not working.
i created the keys from my local and mounting to docker,thats works fine but i didnt understand the exception.
---
---
version: "2.3"
services:
zookeeper1:
image: confluentinc/cp-zookeeper:5.5.1
restart: always
hostname: zookeeper1
container_name: zookeeper1
ports:
- 2181:2181
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka1:
image: confluentinc/cp-server:5.5.1
hostname: kafka1
container_name: kafka1
depends_on:
- zookeeper1
volumes:
- //d/tmp/keys/:/etc/kafka/secrets
ports:
- 8091:8091
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper1:2181
KAFKA_BROKER_ID: 0
KAFKA_BROKER_RACK: "r1"
KAFKA_DELETE_TOPIC_ENABLE: "true"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: SSL:SSL
KAFKA_SECURITY_INTER_BROKER_PROTOCOL: SSL
KAFKA_LISTENERS: SSL://kafka1:8091
KAFKA_ADVERTISED_LISTENERS: SSL://kafka1:8091
KAFKA_SSL_PROTOCOL: "TLSV1.2"
KAFKA_SSL_KEYSTORE_FILENAME: kafka.broker.keystore.jks
KAFKA_SSL_KEYSTORE_CREDENTIALS: password.txt
KAFKA_SSL_KEY_CREDENTIALS: password.txt
KAFKA_SSL_TRUSTSTORE_FILENAME: kafka.broker.truststore.jks
KAFKA_SSL_TRUSTSTORE_CREDENTIALS: password.txt
KAFKA_SSL_CLIENT_AUTH: "none"
KAFKA_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: ""
But in the log i am seein glike this truststore is not detected
ssl.key.password = [hidden]
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = /etc/kafka/secrets/kafka.broker.keystore.jks
ssl.keystore.password = [hidden]
ssl.keystore.type = JKS
ssl.principal.mapping.rules = DEFAULT
ssl.protocol = TLSV1.2
ssl.provider = null
ssl.secure.random.implementation = null
ssl.trustmanager.algorithm = PKIX
ssl.truststore.location = null
ssl.truststore.password = null
But i am facing the below error:
[2021-03-10 07:45:20,758] INFO Awaiting socket connections on 0.0.0.0:8091. (kafka.network.Acceptor)
[2021-03-10 07:45:21,049] ERROR [KafkaServer id=0] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.apache.kafka.common.KafkaException: org.apache.kafka.common.config.ConfigException: **Invalid value javax.net.ssl.SSLHandshakeException: General SSLEngine problem for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.**
at org.apache.kafka.common.network.SslChannelBuilder.configure(SslChannelBuilder.java:77)
at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:157)
at org.apache.kafka.common.network.ChannelBuilders.serverChannelBuilder(ChannelBuilders.java:97)
at kafka.network.Processor.<init>(SocketServer.scala:769)
at kafka.network.SocketServer.newProcessor(SocketServer.scala:396)
at kafka.network.SocketServer.$anonfun$addDataPlaneProcessors$1(SocketServer.scala:281)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158)
at kafka.network.SocketServer.addDataPlaneProcessors(SocketServer.scala:280)
at kafka.network.SocketServer.$anonfun$createDataPlaneAcceptorsAndProcessors$1(SocketServer.scala:243)
at kafka.network.SocketServer.$anonfun$createDataPlaneAcceptorsAndProcessors$1$adapted(SocketServer.scala:240)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
at kafka.network.SocketServer.createDataPlaneAcceptorsAndProcessors(SocketServer.scala:240)
at kafka.network.SocketServer.startup(SocketServer.scala:123)
at kafka.server.KafkaServer.startup(KafkaServer.scala:406)
at io.confluent.support.metrics.SupportedServerStartable.startup(SupportedServerStartable.java:140)
at io.confluent.support.metrics.SupportedKafka.main(SupportedKafka.java:66)
Caused by: org.apache.kafka.common.config.ConfigException: Invalid value javax.net.ssl.SSLHandshakeException: General SSLEngine problem for configuration A client SSLEngine created with the provided settings can't connect to a server SSLEngine created with those settings.
at org.apache.kafka.common.security.ssl.SslFactory.configure(SslFactory.java:111)
at org.apache.kafka.common.network.SslChannelBuilder.configure(SslChannelBuilder.java:75)
... 17 more
[2021-03-10 07:45:21,051] INFO [KafkaServer id=0] shutting down (kafka.server.KafkaServer)
[2021-03-10 07:45:21,052] INFO [SocketServer brokerId=0] Stopping socket server request processors (kafka.network.SocketServer)
[2021-03-10 07:45:21,053] INFO [SocketServer brokerId=0] Stopped socket server request processors (kafka.network.SocketServer)
[2021-03-10 07:45:21,059] INFO Shutting down. (kafka.log.LogManager)
[2021-03-10 07:45:21,060] INFO Shutting down the log cleaner. (kafka.log.LogCleaner)
[2021-03-10 07:45:21,061] INFO [kafka-log-cleaner-thread-0]: Shutting down (kafka.log.LogCleaner)
[2021-03-10 07:45:21,061] INFO [kafka-log-cleaner-thread-0]: Stopped (kafka.log.LogCleaner)
[2021-03-10 07:45:21,061] INFO [kafka-log-cleaner-thread-0]: Shutdown completed (kafka.log.LogCleaner)
[2021-03-10 07:45:21,066] INFO Shutdown complete. (kafka.log.LogManager)
[2021-03-10 07:45:21,067] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2021-03-10 07:45:21,177] INFO Session: 0x10004be2a200006 closed (org.apache.zookeeper.ZooKeeper)
[2021-03-10 07:45:21,177] INFO EventThread shut down for session: 0x10004be2a200006 (org.apache.zookeeper.ClientCnxn)
[2021-03-10 07:45:21,180] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2021-03-10 07:45:21,181] INFO [ThrottledChannelReaper-Fetch]: Shutting down (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:21,383] INFO [ThrottledChannelReaper-Fetch]: Stopped (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:21,383] INFO [ThrottledChannelReaper-Fetch]: Shutdown completed (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:21,383] INFO [ThrottledChannelReaper-Produce]: Shutting down (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:22,383] INFO [ThrottledChannelReaper-Produce]: Stopped (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:22,383] INFO [ThrottledChannelReaper-Produce]: Shutdown completed (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:22,384] INFO [ThrottledChannelReaper-Request]: Shutting down (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:22,385] INFO [ThrottledChannelReaper-Request]: Stopped (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:22,385] INFO [ThrottledChannelReaper-Request]: Shutdown completed (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2021-03-10 07:45:22,389] INFO [SocketServer brokerId=0] Shutting down socket server (kafka.network.SocketServer)
[2021-03-10 07:45:22,478] INFO [SocketServer brokerId=0] Shutdown completed (kafka.network.SocketServer)
[2021-03-10 07:45:22,485] INFO [KafkaServer id=0] shut down completed (kafka.server.KafkaServer)
[2021-03-10 07:45:22,487] INFO Shutting down SupportedServerStartable (io.confluent.support.metrics.SupportedServerStartable)
[2021-03-10 07:45:22,487] INFO Closing BaseMetricsReporter (io.confluent.support.metrics.BaseMetricsReporter)
[2021-03-10 07:45:22,487] INFO Waiting for metrics thread to exit (io.confluent.support.metrics.SupportedServerStartable)
[2021-03-10 07:45:22,487] INFO Shutting down KafkaServer (io.confluent.support.metrics.SupportedServerStartable)
[2021-03-10 07:45:22,487] INFO [KafkaServer id=0] shutting down (kafka.server.KafkaServer)
Can anyone aware why this exception is coming and how to overcome this?

Problem migrating dockerized nexus 3.from different VMs

The problem is that i can't start Nexus 3.14 after migrating nexus-data folder from other MV. What should I do? The versions are the same. The docker command to start the container is:
docker run -p 20001:8081 -u 0 -v /u01/nexus-data:/nexus-data --name abs_nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx3g -XX:MaxDirectMemorySize=3g -Djava.util.prefs.userRoot=/nexus-data/javaprefs" sonatype/nexus3:3.14.0
2019-08-22 08:15:35,888+0000 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - The database model for component is 1.14, but the latest supported by this version of nexus is 1.12
2019-08-22 08:15:35,889+0000 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - The database model for elasticsearch is 1.3, but the latest supported by this version of nexus is 1.2
2019-08-22 08:15:35,890+0000 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - The database model for config is 1.7, but the latest supported by this version of nexus is 1.5
2019-08-22 08:15:35,897+0000 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - Failed transition: NEW -> STARTED
java.lang.IllegalStateException: Incompatible sonatype-work database model detected. Will result in failure to launch. Shutting down.
at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.validate(UpgradeServiceImpl.java:166)
at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.doStart(UpgradeServiceImpl.java:79)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:157)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:95)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:195)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
2019-08-22 08:15:35,931+0000 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
java.lang.IllegalStateException: Incompatible sonatype-work database model detected. Will result in failure to launch. Shutting down.
at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.validate(UpgradeServiceImpl.java:166)
at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.doStart(UpgradeServiceImpl.java:79)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:157)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:95)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:195)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
2019-08-22 08:15:35,937+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - java.lang.IllegalStateException: Incompatible sonatype-work database model detected. Will result in failure to launch. Shutting down.
2019-08-22 08:15:35,938+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.validate(UpgradeServiceImpl.java:166)
2019-08-22 08:15:35,939+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl.doStart(UpgradeServiceImpl.java:79)
2019-08-22 08:15:35,939+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
2019-08-22 08:15:35,940+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
2019-08-22 08:15:35,941+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
2019-08-22 08:15:35,941+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
2019-08-22 08:15:35,942+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:157)
2019-08-22 08:15:35,942+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:95)
2019-08-22 08:15:35,943+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:195)
2019-08-22 08:15:35,943+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
2019-08-22 08:15:35,944+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
2019-08-22 08:15:35,944+0000 ERROR [FelixStartLevel] *SYSTEM java.lang.Throwable - at java.lang.Thread.run(Thread.java:748)
2019-08-22 08:15:36,009+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Uptime: 57 seconds and 827 milliseconds (nexus-oss-edition/3.14.0.04)
2019-08-22 08:15:36,017+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop RESTORE
2019-08-22 08:15:36,019+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop STORAGE
2019-08-22 08:15:36,031+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping 6 pools
2019-08-22 08:15:36,032+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping pool: analytics
2019-08-22 08:15:36,033+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping pool: security
2019-08-22 08:15:36,033+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping pool: component
2019-08-22 08:15:36,034+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping pool: audit
2019-08-22 08:15:36,034+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping pool: config
2019-08-22 08:15:36,035+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping pool: accesslog
2019-08-22 08:15:36,035+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping 6 instances
2019-08-22 08:15:36,036+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping instance: analytics
2019-08-22 08:15:36,036+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping instance: security
2019-08-22 08:15:36,036+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping instance: component
2019-08-22 08:15:36,037+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping instance: audit
2019-08-22 08:15:36,037+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping instance: config
2019-08-22 08:15:36,040+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseManagerImpl - Stopping instance: accesslog
2019-08-22 08:15:36,041+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.OServer - OrientDB Server is shutting down...
2019-08-22 08:15:36,041+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.OServer - Shutting down protocols
2019-08-22 08:15:36,042+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.plugin.OServerPluginManager - Shutting down plugins:
2019-08-22 08:15:36,043+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.plugin.OServerPluginManager - - jmx
2019-08-22 08:15:36,045+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.OServer - Shutting down databases:
2019-08-22 08:15:36,046+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - Orient Engine is shutting down...
2019-08-22 08:15:36,048+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: analytics...
2019-08-22 08:15:36,133+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: security...
2019-08-22 08:15:36,263+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: component...
2019-08-22 08:15:36,336+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: audit...
2019-08-22 08:15:36,370+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: config...
2019-08-22 08:15:36,551+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: OSystem...
2019-08-22 08:15:36,552+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: accesslog...
2019-08-22 08:15:37,680+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - OrientDB Engine shutdown complete
2019-08-22 08:15:37,681+0000 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.OServer - OrientDB Server shutdown complete
2019-08-22 08:15:37,685+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl - Shutdown
2019-08-22 08:15:37,688+0000 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop KERNEL
Can anyone help me?
Thanks!

zookeeper issue - taking 15 minutes to recover if leader is killed

i m trying to implement Kafka with zookeeper in my network but i am facing a weird issue with zookeeper. i have looked around google and realized that many other users reported such issue but no one posted any proper solution for this .
My current setup has 3 different zookeeper nodes (32 GB ram dedicated boxes)
The issue is if i kill zookeeper leader, both the remaining follower nodes also goes down and they do not recover for at-least next 15-20 minutes.
All i am getting in the zookeeper logs is "notification timeouts" without any explanation
Here is my zookeeper config file
tickTime=2000
initLimit=10
syncLimit=5
maxClientCnxns=100
maxSessionTimeout=50000
dataDir=/var/lib/zookeeper
clientPort=2181
autopurge.snapRetainCount=100
autopurge.purgeInterval=1
preAllocSize=131072
snapCount=3000000
server.1=zo1:2888:3888
server.2=zo2:2888:3888
server.3=zo3:2888:3888
in my /etc/hosts file i have mapped zo1 , zo2 , zo3 to their ip address.
Note:i have also tested by setting current node ip to 0.0.0.0 it doesn't makes any difference.
just few minutes ago i tested it and again it failed to recover.
As i have three node cluster zo1 , zo2 and zo3 . zo3 was the leader and zo1 and zo2 were followers. after i killed zo3 node . it took approx 13 minutes to recover automatically . i got the following logs in zo1 and zo2 .
Log for zo1.
tail /var/lib/zookeeper/zookeeper.out -n 10000 | grep 'QuorumPeer'
2019-01-02 10:25:50,848 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FollowerZooKeeperServer#140] - Shutting down
2019-01-02 10:25:50,848 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer#505] - shutting down
2019-01-02 10:25:50,848 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FollowerRequestProcessor#107] - Shutting down
2019-01-02 10:25:50,848 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:CommitProcessor#184] - Shutting down
2019-01-02 10:25:50,848 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FinalRequestProcessor#402] - shutdown of request processor complete
2019-01-02 10:25:50,849 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:SyncRequestProcessor#208] - Shutting down
2019-01-02 10:25:50,849 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumPeer#865] - LOOKING
2019-01-02 10:25:50,850 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#818] - New election. My id = 1, proposed zxid=0x2d00035c8e
2019-01-02 10:25:51,057 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 400
2019-01-02 10:25:51,458 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 800
2019-01-02 10:25:52,259 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 1600
2019-01-02 10:25:53,859 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 3200
2019-01-02 10:25:57,060 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 6400
2019-01-02 10:26:03,461 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 12800
2019-01-02 10:26:16,262 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 25600
2019-01-02 10:26:41,862 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 51200
2019-01-02 10:27:33,063 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:28:33,065 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:29:33,066 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:30:33,066 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:31:33,067 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:32:33,068 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:33:33,069 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:34:33,069 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:35:33,070 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:36:33,071 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:37:33,071 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:38:33,072 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:39:33,073 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:40:33,074 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:41:33,075 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:42:33,076 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:43:33,076 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:43:33,082 [myid:1] - INFO [WorkerSender[myid=1]:QuorumPeer$QuorumServer#167] - Resolved hostname: zo3 to address: zo3/144.76.xxx.xxx
2019-01-02 10:43:33,091 [myid:1] - INFO [WorkerSender[myid=1]:QuorumPeer$QuorumServer#167] - Resolved hostname: zo3 to address: zo3/144.76.xxx.xxx
2019-01-02 10:43:33,290 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumPeer#935] - FOLLOWING
2019-01-02 10:43:33,290 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer#173] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 50000 datadir /var/lib/zookeeper/version-2 snapdir /var/lib/zookeeper/version-2
2019-01-02 10:43:33,291 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:Follower#64] - FOLLOWING - LEADER ELECTION TOOK - 1062441
2019-01-02 10:43:33,291 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumPeer$QuorumServer#167] - Resolved hostname: zo2 to address: zo2/88.198.35.34
2019-01-02 10:43:33,294 [myid:1] - WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:Learner#237] - Unexpected exception, tries=0, connecting to zo2/88.198.35.34:2888
at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:937)
2019-01-02 10:43:34,468 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:Learner#332] - Getting a diff from the leader 0x2d00035c8e
2019-01-02 10:43:35,120 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer#687] - Established session 0x2680a49e3dc0013 with negotiated timeout 6000 for client /5.9.xxx.xxx:36664
2019-01-02 10:43:35,244 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer#687] - Established session 0x1680a49b6b90011 with negotiated timeout 30000 for client /5.9.xxx.xxx:36668
2019-01-02 10:43:35,625 [myid:1] - WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:Follower#118] - Got zxid 0x2e00000001 expected 0x1
Logs from node zo2 , which became leader later
2019-01-02 10:25:50,852 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:NIOServerCnxn#1044] - Closed socket connection for client /5.9.xxx.xxx:21218 which had sessionid 0x2680a49e3dc0012
2019-01-02 10:25:50,852 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FollowerZooKeeperServer#140] - Shutting down
2019-01-02 10:25:50,853 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer#505] - shutting down
2019-01-02 10:25:50,853 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FollowerRequestProcessor#107] - Shutting down
2019-01-02 10:25:50,854 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:CommitProcessor#184] - Shutting down
2019-01-02 10:25:50,854 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FinalRequestProcessor#402] - shutdown of request processor complete
2019-01-02 10:25:50,856 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:SyncRequestProcessor#208] - Shutting down
2019-01-02 10:25:50,857 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:QuorumPeer#865] - LOOKING
2019-01-02 10:25:50,858 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#818] - New election. My id = 2, proposed zxid=0x2d00035c8e
2019-01-02 10:25:51,061 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 400
2019-01-02 10:25:51,462 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 800
2019-01-02 10:25:52,283 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 1600
2019-01-02 10:25:53,884 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 3200
2019-01-02 10:25:57,084 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 6400
2019-01-02 10:26:03,485 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 12800
2019-01-02 10:26:16,286 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 25600
2019-01-02 10:26:41,887 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 51200
2019-01-02 10:27:33,087 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:28:33,088 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:29:33,089 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:30:33,090 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:31:33,091 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:32:33,092 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:33:33,092 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:34:33,093 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:35:33,094 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:36:33,095 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:37:33,095 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:38:33,096 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:39:33,097 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:40:33,098 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:41:33,099 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:42:33,100 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FastLeaderElection#852] - Notification time out: 60000
2019-01-02 10:43:33,293 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:QuorumPeer#947] - LEADING
2019-01-02 10:43:33,299 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:Leader#62] - TCP NoDelay set to: true
2019-01-02 10:43:33,301 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer#173] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 50000 datadir /var/lib/zookeeper/version-2 snapdir /var/lib/zookeeper/version-2
2019-01-02 10:43:33,301 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:Leader#371] - LEADING - LEADER ELECTION TOOK - 1062443
2019-01-02 10:43:34,307 [myid:2] - INFO [LearnerHandler-/144.76.120.143:64542:LearnerHandler#346] - Follower sid: 1 : info : org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer#33d2c290
2019-01-02 10:43:34,509 [myid:2] - INFO [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:Leader#961] - Have quorum of supporters, sids: [ 1,2 ]; starting up and setting last processed zxid: 0x2e00000000
As you can see all i am getting is continuous timeouts in the log without any explanation.
Been testing it since more then a week still cant find any solution for this.
I would be very grateful if somebody could point me in right direction.
Thanks
We faced the same issue and found that zookeeper leader election happened after 15 minutes.
we bypassed this 15 min idle time by setting tcpKeepAlive=true in zookeeper properties.
No election can happen when the cluster size is 2. If you intend to run a HA Zookeeper cluster, increase your zookeeper count to 5. Also, Zookeeper doesn't need 32GB to run effectively.
Check out:
https://docs.confluent.io/current/zookeeper/deployment.html#multi-node-setup for cluster information
and
https://docs.confluent.io/current/zookeeper/deployment.html#jvm for JVM sizing.
TO ANYONE WHO FACE THE SAME ISSUE - the reason for this was zookeeper being idle. if you the zookeeper nodes becomes idle due to no activity (data transaction) between the nodes then internally the zookeeper nodes stops talking to each other . and if any zookeeper nodes goes down the other nodes will not know until they do their periodic ping after 10-15 minutes.

Dockerfile - how does the VOLUME work?

I am trying to understand the dockerfile here after ( it comes from here : https://hub.docker.com/r/jplock/zookeeper/~/dockerfile/ )
What I don't understand is the VOLUME ["/opt/zookeeper/conf", "/tmp/zookeeper"] part...
From Docker's doc I read :
The VOLUME instruction creates a mount point with the specified name
and marks it as holding externally mounted volumes from native host or
other containers. The value can be a JSON array, VOLUME ["/var/log/"], or a
plain string with multiple arguments, such as VOLUME /var/log or VOLUME
/var/log /var/db. For more information/examples and mounting instructions
via the Docker client, refer to Share Directories via Volumes
documentation.
So What I understand is that I could have a local file which would take place of the container's file.
So I created a file in my local hard-drive :
$ cat /opt/zookeeper/conf/zoo.cfg
# The number of milliseconds of each tick
tickTime=3000
And hope the [VOLUME] function would place it on top of the by default [zoo.cfg] in the container.
Unfortunately, launching the container I still see a ticktime at 2000 (last line) :
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
2016-12-05 13:13:18,728 [myid:] - INFO [main:QuorumPeerConfig#124] - Reading configuration from: /opt/zookeeper/bin/../conf/zoo.cfg
2016-12-05 13:13:18,736 [myid:] - INFO [main:DatadirCleanupManager#78] - autopurge.snapRetainCount set to 3
2016-12-05 13:13:18,737 [myid:] - INFO [main:DatadirCleanupManager#79] - autopurge.purgeInterval set to 0
2016-12-05 13:13:18,738 [myid:] - INFO [main:DatadirCleanupManager#101] - Purge task is not scheduled.
2016-12-05 13:13:18,740 [myid:] - WARN [main:QuorumPeerMain#113] - Either no config or no quorum defined in config, running in standalone mode
2016-12-05 13:13:18,763 [myid:] - INFO [main:QuorumPeerConfig#124] - Reading configuration from: /opt/zookeeper/bin/../conf/zoo.cfg
2016-12-05 13:13:18,764 [myid:] - INFO [main:ZooKeeperServerMain#96] - Starting server
2016-12-05 13:13:18,781 [myid:] - INFO [main:Environment#100] - Server environment:zookeeper.version=3.4.9-1757313, built on 08/23/2016 06:50 GMT
2016-12-05 13:13:18,781 [myid:] - INFO [main:Environment#100] - Server environment:host.name=11586b93e1ff
2016-12-05 13:13:18,782 [myid:] - INFO [main:Environment#100] - Server environment:java.version=1.8.0_92-internal
2016-12-05 13:13:18,782 [myid:] - INFO [main:Environment#100] - Server environment:java.vendor=Oracle Corporation
2016-12-05 13:13:18,783 [myid:] - INFO [main:Environment#100] - Server environment:java.home=/usr/lib/jvm/java-1.8-openjdk/jre
2016-12-05 13:13:18,783 [myid:] - INFO [main:Environment#100] - Server environment:java.class.path=/opt/zookeeper/bin/../build/classes:/opt/zookeeper/bin/../build/lib/*.jar:/opt/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper/bin/../lib/netty-3.10.5.Final.jar:/opt/zookeeper/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper/bin/../lib/jline-0.9.94.jar:/opt/zookeeper/bin/../zookeeper-3.4.9.jar:/opt/zookeeper/bin/../src/java/lib/*.jar:/opt/zookeeper/bin/../conf:
2016-12-05 13:13:18,784 [myid:] - INFO [main:Environment#100] - Server environment:java.library.path=/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2016-12-05 13:13:18,785 [myid:] - INFO [main:Environment#100] - Server environment:java.io.tmpdir=/tmp
2016-12-05 13:13:18,785 [myid:] - INFO [main:Environment#100] - Server environment:java.compiler=<NA>
2016-12-05 13:13:18,789 [myid:] - INFO [main:Environment#100] - Server environment:os.name=Linux
2016-12-05 13:13:18,789 [myid:] - INFO [main:Environment#100] - Server environment:os.arch=amd64
2016-12-05 13:13:18,790 [myid:] - INFO [main:Environment#100] - Server environment:os.version=4.4.27-moby
2016-12-05 13:13:18,790 [myid:] - INFO [main:Environment#100] - Server environment:user.name=root
2016-12-05 13:13:18,791 [myid:] - INFO [main:Environment#100] - Server environment:user.home=/root
2016-12-05 13:13:18,791 [myid:] - INFO [main:Environment#100] - Server environment:user.dir=/opt/zookeeper
2016-12-05 13:13:18,803 [myid:] - INFO [main:ZooKeeperServer#815] - tickTime set to 2000
So I don't understand the VOLUME Commande :(
FROM openjdk:8-jre-alpine
MAINTAINER Justin Plock <justin#plock.net>
ARG MIRROR=http://apache.mirrors.pair.com
ARG VERSION=3.4.9
LABEL name="zookeeper" version=$VERSION
RUN apk add --no-cache wget bash \
&& mkdir /opt \
&& wget -q -O - $MIRROR/zookeeper/zookeeper-$VERSION/zookeeper-$VERSION.tar.gz | tar -xzf - -C /opt \
&& mv /opt/zookeeper-$VERSION /opt/zookeeper \
&& cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg \
&& mkdir -p /tmp/zookeeper
EXPOSE 2181 2888 3888
WORKDIR /opt/zookeeper
VOLUME ["/opt/zookeeper/conf", "/tmp/zookeeper"]
ENTRYPOINT ["/opt/zookeeper/bin/zkServer.sh"]
CMD ["start-foreground"]

zookeeper server STARTED but ruok no output

I have set in zoo.cfg : clientPort=2181
cloudera#cloudera-vm:/$ sudo /usr/lib/zookeeper/bin/zkServer.sh start
I get the following response:
JMX enabled by default
Using config: /usr/lib/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
cloudera#cloudera-vm:/$ sudo /usr/lib/zookeeper/bin/zkServer.sh status
JMX enabled by default
Using config: /usr/lib/zookeeper/bin/../conf/zoo.cfg
Mode: standalone
But
$ echo ruok | nc localhost 2181
$
is not giving any output. where is the problem?
Log file:
2014-10-03 08:40:10,912 - INFO [main:QuorumPeerConfig#90] - Reading configuration from: /usr/lib/zookeeper/bin/../conf/zoo.cfg
2014-10-03 08:40:10,916 - ERROR [main:QuorumPeerConfig#259] - Invalid configuration, only one server specified (ignoring)
2014-10-03 08:40:10,916 - WARN [main:QuorumPeerMain#105] - Either no config or no quorum defined in config, running in standalone mode
2014-10-03 08:40:10,927 - INFO [main:QuorumPeerConfig#90] - Reading configuration from: /usr/lib/zookeeper/bin/../conf/zoo.cfg
2014-10-03 08:40:10,928 - ERROR [main:QuorumPeerConfig#259] - Invalid configuration, only one server specified (ignoring)
2014-10-03 08:40:10,928 - INFO [main:ZooKeeperServerMain#94] - Starting server
2014-10-03 08:40:10,933 - INFO [main:Environment#97] - Server environment:zookeeper.version=3.3.5-cdh3u6--1, built on 03/20/2013 20:16 GMT
2014-10-03 08:40:10,933 - INFO [main:Environment#97] - Server environment:host.name=cloudera-vm
2014-10-03 08:40:10,933 - INFO [main:Environment#97] - Server environment:java.version=1.6.0_24
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:java.vendor=Sun Microsystems Inc.
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:java.home=/usr/lib/jvm/java-6-sun-1.6.0.24/jre
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:java.class.path=/usr/lib/zookeeper/bin/../build/classes:/usr/lib/zookeeper/bin/../build/lib/*.jar:/usr/lib/zookeeper/bin/../zookeeper-3.3.5-cdh3u6.jar:/usr/lib/zookeeper/bin/../lib/log4j-1.2.15.jar:/usr/lib/zookeeper/bin/../lib/jline-0.9.94.jar:/usr/lib/zookeeper/bin/../src/java/lib/*.jar:/usr/lib/zookeeper/bin/../conf:
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:java.library.path=/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:java.io.tmpdir=/tmp
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:java.compiler=<NA>
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:os.name=Linux
2014-10-03 08:40:10,934 - INFO [main:Environment#97] - Server environment:os.arch=i386
2014-10-03 08:40:10,935 - INFO [main:Environment#97] - Server environment:os.version=2.6.35-28-generic
2014-10-03 08:40:10,935 - INFO [main:Environment#97] - Server environment:user.name=root
2014-10-03 08:40:10,935 - INFO [main:Environment#97] - Server environment:user.home=/root
2014-10-03 08:40:10,935 - INFO [main:Environment#97] - Server environment:user.dir=/
2014-10-03 08:40:10,940 - INFO [main:ZooKeeperServer#673] - tickTime set to 2000
2014-10-03 08:40:10,940 - INFO [main:ZooKeeperServer#682] - minSessionTimeout set to -1
2014-10-03 08:40:10,941 - INFO [main:ZooKeeperServer#691] - maxSessionTimeout set to -1
2014-10-03 08:40:10,953 - INFO [main:NIOServerCnxn$Factory#143] - binding to port 0.0.0.0/0.0.0.0:2181
2014-10-03 08:40:10,963 - INFO [main:FileSnap#82] - Reading snapshot /var/zookeeper/version-2/snapshot.0
2014-10-03 08:40:10,972 - INFO [main:FileTxnSnapLog#256] - Snapshotting: 0
2014-10-03 08:45:42,225 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn$Factory#251] - Accepted socket connection from /127.0.0.1:39879
2014-10-03 08:45:42,231 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn#1237] - Processing srvr command from /127.0.0.1:39879
2014-10-03 08:45:42,239 - INFO [Thread-1:NIOServerCnxn#1435] - Closed socket connection for client /127.0.0.1:39879 (no session established for client)
One thing to keep in mind is that echo hello | nc localhost 2181 just writes hello to the host:port and doesn't necessarily wait to receive any response. If you must wait for a response, make netcat wait for it by providing it a -q option. For instance, you might want to try echo hello | nc -q 3 localhost 2181