Comments (6)
I've added a quick PR and tested on my machine.
Can confirm that it worked for all three supported versions.
Let me know what you think! 🔥
from zookeeper-docker.
Hey @Jesse-Cameron! Sorry for the delay and thanks for reporting this!
ZOO_DATA_LOG_DIR
is meant for the transaction log, not the regular service logs. It's used to pass the value to the docker-entrypoint.sh
and write it to the config file here.
By default all Zookeeper logs go to the standard output in this image, so you should not bother about reading the logs from $ZOOKEEPER_PREFIX/logs
. But if you really want to you may want to check this PR which wasn't finished by the author.
But again, when running in Docker it's common practice to redirect all logs to the standard output and then gather/aggregate those logs with special drivers and tools.
from zookeeper-docker.
Hi Elisey,
Thanks for getting back to me. Great to hear your thoughts on the repo. I totally agree that for the most part that docker containers should redirect all logs to stdout. Makes things much easier downstream. I also didn't realised that ZOO_DATA_LOG_DIR
was a transactional dir. Good to know.
However, in my experience with zk, not having ZOO_LOG_DIR
gives rise to another issue. That, for whatever reason, it needs to be configured in order to write the data/zookeeper.pid
file. If you ever want to issue graceful shutdowns (via zkServer.sh stop
) this file is required.
I understand that this is your repo and it's up to you, but I would like to suggest is that:
- Both
ZOO_DATA_LOG_DIR
andZOO_LOG_DIR
are set. Potentially renamed to avoid confusion. - The logs in
ZOO_LOG_DIR
be piped through to stdout viatail -f
or some other utility.
Looking forward to hearing your thoughts,
Jesse
from zookeeper-docker.
Jesse,
However, in my experience with zk, not having ZOO_LOG_DIR gives rise to another issue. That, for whatever reason, it needs to be configured in order to write the data/zookeeper.pid file. If you ever want to issue graceful shutdowns (via zkServer.sh stop) this file is required.
I'm not sure I understand how ZOO_LOG_DIR
could affect zookeeper.pid
. The default location of this file is $ZOO_DATADIR/zookeeper_server.pid
. Moreover, since we start Zookeeper in foreground, this file is not needed. And when you stop the container SIGTERM
is sent to the process, which is exactly what zkServer.sh stop
does. So stoppping the container equals gracefull shutdown.
Both ZOO_DATA_LOG_DIR and ZOO_LOG_DIR are set. Potentially renamed to avoid confusion.
As I mentioned earlier you could take a look at this PR and try to resurect it.
The logs in ZOO_LOG_DIR be piped through to stdout via tail -f or some other utility.
This looks like a bit of a hack. I think a proper way of doing this would be via log4j.
from zookeeper-docker.
@Jesse-Cameron ZOO_LOG_DIR
was introduced recently, and you can take a look here:
https://github.com/31z4/zookeeper-docker#how-to-configure-logging
from zookeeper-docker.
@hlwanghl Thanks for the update! Excited to try this out! 👍
from zookeeper-docker.
Related Issues (20)
- Upgrade to JRE 17, pin Ubuntu release HOT 1
- Update jackson-databind to resolve high security vulnerabilities (2.13.1 to 2.13.4.1) HOT 1
- override parent docker image from alpine to ubi8
- Please Publish 3.8.1 HOT 1
- Add s390x to docker official image HOT 1
- with replicas 3, it wont work HOT 1
- Add ppc64le to docker official image HOT 2
- Upgrade to 3.9.0 HOT 1
- Failed to pull image "zookeeper:3.9.0": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/library/zookeeper:3.9.0": no match for platform in manifest: not found HOT 3
- zookeeper docker 3.9.0 HOT 1
- JSON logging HOT 2
- Zookeeper 3.7.2, 3.8.3 and 3.9.1 tags needed ASAP HOT 2
- Zookeeper switched from log4j to Logback in v3.8.2 HOT 3
- New tag suggestion: stable
- How do I run zookeeper3.7.2 like the official documentation
- Re-releasing Docker images with the same number causes issues HOT 2
- JVM crashes with out of memory HOT 2
- 3.8.4 and 3.9.2 released, will we release new docker tags? HOT 1
- Incorrect default uid/gid HOT 1
- 3.7.2 build failure in docker official images HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zookeeper-docker.