question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate flags when running bin/pulsar bookie

See original GitHub issue

Describe the bug A recent change (https://github.com/apache/pulsar/pull/5675) was made to the the bin/pulsar script. This change loads the bkenv.sh file and then sets the opts when running the bookie. This produces duplicate flags when running a bookie.

/usr/bin/java -cp /Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/conf:::/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/lib/: -Dlog4j.configurationFile=log4j2.yaml -Djute.maxbuffer=10485760 -Djava.net.preferIPv4Stack=true -Dpulsar.allocator.exit_on_oom=true -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024 -Xms2g -Xmx2g -XX:MaxDirectMemorySize=4g -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -Dpulsar.log.appender=RoutingAppender -Dpulsar.log.dir=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/logs -Dpulsar.log.level=info -Dpulsar.routing.appender.default=Console -Dpulsar.functions.process.container.log.dir=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/logs -Dpulsar.functions.java.instance.jar=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/instances/java-instance.jar -Dpulsar.functions.python.instance.file=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/instances/python-instance/python_instance_main.py -Dpulsar.functions.extra.dependencies.dir=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/instances/deps -Dpulsar.functions.instance.classpath=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/conf:::/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/lib/: -Xms2g -Xmx2g -XX:MaxDirectMemorySize=2g -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024 -Dpulsar.log.file=bookkeeper.log org.apache.bookkeeper.proto.BookieServer --conf /Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/conf/bookkeeper.conf

For example the Xms and XX:MaxDirectMemory are set twice. What is the behavior if flags are set twice? What value gets used?

To Reproduce Steps to reproduce the behavior:

  1. bin/pulsar bookie

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
cckelloggcommented, Mar 19, 2020

I think we need to resolve this issue there are still duplicate flags when starting a bookie by running pulsar/bookie. This is confusing to users and causing unexpected issues. I think this change (https://github.com/apache/pulsar/pull/5675) should be reverted before 2.6.

https://stackoverflow.com/questions/2740725/duplicated-java-runtime-options-what-is-the-order-of-preference

0reactions
tisonkuncommented, Dec 9, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

ZooKeeper and BookKeeper administration - Apache Pulsar
Log in to the bookie node, check if there are underreplicated ledgers. The decommission command force to replicate the underreplicated ledgers. · Stop...
Read more >
Pulsar Isolation Part II: Separate Pulsar Clusters - StreamNative
This is the second blog in our four-part blog series on how to achieve resource isolation in Apache Pulsar.
Read more >
Failing to set up Zookeeper cluster for Pulsar - Stack Overflow
Since I need to deploy bookie to the same nodes, I executed $ PULSAR_EXTRA_OPTS="-Dstats_server_port=8001" bin/pulsar-daemon start zookeeper.
Read more >
Introduction to Apache Pulsar - Baeldung
Pulsar ensures durability by using bookies (Apache BookKeeper instance) running in storage nodes. Whenever a bookie receives a message, ...
Read more >
Troubleshooting Apache Pulsar Issues | Fusion 5.6
Troubleshooting Apache Pulsar in Fusion Clear Pulsar data Use this procedure to clear. ... /pulsar/bin/bookkeeper shell decommissionbookie -bookieid ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found