Problem migrating dockerized nexus 3.from different VMs - orientdb

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!

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?

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

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

Not able to install zookeeper in windows

When i am executing zkServer.cmd via below command:
D:\zookeeper\zookeeper-3.4.14\bin>call "C:\Program Files\Java\jdk-13.0.2"\bin\java "-Dzookeeper.log.dir=D:\zookeeper\zookeeper-3.4.14\bin\.." "-Dzookeeper.root.logger=INFO,CONSOLE" -cp "D:\zookeeper\zookeeper-3.4.14\bin\..\build\classes;D:\zookeeper\zookeeper-3.4.14\bin\..\build\lib\*;D:\zookeeper\zookeeper-3.4.14\bin\..\*;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\*;D:\zookeeper\zookeeper-3.4.14\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "D:\zookeeper\zookeeper-3.4.14\bin\..\conf\zoo.cfg"
Output:
2020-02-22 22:07:42,378 [myid:] - INFO [main:QuorumPeerConfig#136] - Reading configuration from: D:\zookeeper\zookeeper-3.4.14\bin\..\conf\zoo.cfg
2020-02-22 22:07:42,384 [myid:] - INFO [main:DatadirCleanupManager#78] - autopurge.snapRetainCount set to 3
2020-02-22 22:07:42,384 [myid:] - INFO [main:DatadirCleanupManager#79] - autopurge.purgeInterval set to 0
2020-02-22 22:07:42,385 [myid:] - INFO [main:DatadirCleanupManager#101] - Purge task is not scheduled.
2020-02-22 22:07:42,387 [myid:] - WARN [main:QuorumPeerMain#116] - Either no config or no quorum defined in config, running in standalone mode
2020-02-22 22:07:42,487 [myid:] - INFO [main:QuorumPeerConfig#136] - Reading configuration from: D:\zookeeper\zookeeper-3.4.14\bin\..\conf\zoo.cfg
2020-02-22 22:07:42,487 [myid:] - INFO [main:ZooKeeperServerMain#98] - Starting server
2020-02-22 22:07:42,512 [myid:] - INFO [main:Environment#100] - Server environment:zookeeper.version=3.4.14-4c25d480e66aadd371de8bd2fd8da255ac140bcf, built on 03/06/2019 16:18 GMT
2020-02-22 22:07:42,512 [myid:] - INFO [main:Environment#100] - Server environment:host.name=LAPTOP-78H8U6PB
2020-02-22 22:07:42,517 [myid:] - INFO [main:Environment#100] - Server environment:java.version=13.0.2
2020-02-22 22:07:42,518 [myid:] - INFO [main:Environment#100] - Server environment:java.vendor=Oracle Corporation
2020-02-22 22:07:42,519 [myid:] - INFO [main:Environment#100] - Server environment:java.home=C:\Program Files\Java\jdk-13.0.2
2020-02-22 22:07:42,519 [myid:] - INFO [main:Environment#100] - Server environment:java.class.path=D:\zookeeper\zookeeper-3.4.14\bin\..\build\classes;D:\zookeeper\zookeeper-3.4.14\bin\..\build\lib\*;D:\zookeeper\zookeeper-3.4.14\bin\..\zookeeper-3.4.14.jar;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\audience-annotations-0.5.0.jar;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\jline-0.9.94.jar;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\log4j-1.2.17.jar;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\netty-3.10.6.Final.jar;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\slf4j-api-1.7.25.jar;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\slf4j-log4j12-1.7.25.jar;D:\zookeeper\zookeeper-3.4.14\bin\..\conf
2020-02-22 22:07:42,520 [myid:] - INFO [main:Environment#100] - Server environment:java.library.path=C:\Program Files\Java\jdk-13.0.2\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk-13.0.2\bin;.
2020-02-22 22:07:42,520 [myid:] - INFO [main:Environment#100] - Server environment:java.io.tmpdir=C:\Users\erdiv\AppData\Local\Temp\
2020-02-22 22:07:42,521 [myid:] - INFO [main:Environment#100] - Server environment:java.compiler=<NA>
2020-02-22 22:07:42,523 [myid:] - INFO [main:Environment#100] - Server environment:os.name=Windows 10
2020-02-22 22:07:42,524 [myid:] - INFO [main:Environment#100] - Server environment:os.arch=amd64
2020-02-22 22:07:42,525 [myid:] - INFO [main:Environment#100] - Server environment:os.version=10.0
2020-02-22 22:07:42,525 [myid:] - INFO [main:Environment#100] - Server environment:user.name=erdiv
2020-02-22 22:07:42,526 [myid:] - INFO [main:Environment#100] - Server environment:user.home=C:\Users\erdiv
2020-02-22 22:07:42,526 [myid:] - INFO [main:Environment#100] - Server environment:user.dir=D:\zookeeper\zookeeper-3.4.14\bin
2020-02-22 22:07:42,534 [myid:] - INFO [main:ZooKeeperServer#836] - tickTime set to 2000
2020-02-22 22:07:42,534 [myid:] - INFO [main:ZooKeeperServer#845] - minSessionTimeout set to -1
2020-02-22 22:07:42,534 [myid:] - INFO [main:ZooKeeperServer#854] - maxSessionTimeout set to -1
2020-02-22 22:07:42,962 [myid:] - INFO [main:ServerCnxnFactory#117] - Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
2020-02-22 22:07:42,964 [myid:] - INFO [main:NIOServerCnxnFactory#89] - binding to port 0.0.0.0/0.0.0.0:2181
the process gets stuck and zookeeper is not started
Also, when i do ./zkServer.cmd start, following is the output:
D:\zookeeper\zookeeper-3.4.14\bin>call "C:\Program Files\Java\jdk-13.0.2"\bin\java "-Dzookeeper.log.dir=D:\zookeeper\zookeeper-3.4.14\bin\.." "-Dzookeeper.root.logger=INFO,CONSOLE" -cp "D:\zookeeper\zookeeper-3.4.14\bin\..\build\classes;D:\zookeeper\zookeeper-3.4.14\bin\..\build\lib\*;D:\zookeeper\zookeeper-3.4.14\bin\..\*;D:\zookeeper\zookeeper-3.4.14\bin\..\lib\*;D:\zookeeper\zookeeper-3.4.14\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "D:\zookeeper\zookeeper-3.4.14\bin\..\conf\zoo.cfg" start
2020-02-22 22:14:58,220 [myid:] - INFO [main:DatadirCleanupManager#78] - autopurge.snapRetainCount set to 3
2020-02-22 22:14:58,223 [myid:] - INFO [main:DatadirCleanupManager#79] - autopurge.purgeInterval set to 0
2020-02-22 22:14:58,225 [myid:] - INFO [main:DatadirCleanupManager#101] - Purge task is not scheduled.
2020-02-22 22:14:58,232 [myid:] - WARN [main:QuorumPeerMain#116] - Either no config or no quorum defined in config, running in standalone mode
2020-02-22 22:14:58,338 [myid:] - ERROR [main:ZooKeeperServerMain#57] - Invalid arguments, exiting abnormally
java.lang.NumberFormatException: For input string: "D:\zookeeper\zookeeper-3.4.14\bin\..\conf\zoo.cfg"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Integer.parseInt(Integer.java:658)
at java.base/java.lang.Integer.parseInt(Integer.java:776)
at org.apache.zookeeper.server.ServerConfig.parse(ServerConfig.java:61)
at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:55)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:119)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81)
2020-02-22 22:14:58,340 [myid:] - INFO [main:ZooKeeperServerMain#58] - Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]
Usage: ZooKeeperServerMain configfile | port datadir [ticktime] [maxcnxns]
the process gets stuck and zookeeper is not started
It's not stuck. It started and is waiting on connections
By the way, Java 13 might not work with Zookeeper 3.4.x

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