-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fix broker gc log options #11285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broker gc log options #11285
Conversation
|
Thanks for your contribution. For this PR, do we need to update docs? |
I think there is no need to update docs |
|
Anyone can review it? |
5eb639f to
d29c059
Compare
|
/pulsarbot run-failure-checks |
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@michaeljmarshall PTAL
0c23420 to
44d94d2
Compare
|
/pulsarbot run-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good change. Before we merge this, we should update the bookkeeper shell script and the Pulsar shell script to document the new environment variables.
Lines 99 to 106 in 3b76784
| Environment variables: | |
| BOOKIE_LOG_CONF Log4j configuration file (default $DEFAULT_LOG_CONF) | |
| BOOKIE_CONF Configuration file (default: $DEFAULT_CONF) | |
| BOOKIE_EXTRA_OPTS Extra options to be passed to the jvm | |
| BOOKIE_EXTRA_CLASSPATH Add extra paths to the bookkeeper classpath | |
| ENTRY_FORMATTER_CLASS Entry formatter class to format entries. | |
| BOOKIE_PID_DIR Folder where the Bookie server PID file should be stored | |
| BOOKIE_STOP_TIMEOUT Wait time before forcefully kill the Bookie server instance, if the stop is not successful |
Lines 158 to 173 in 3b76784
| Environment variables: | |
| FUNCTIONS_LOG_CONF Function Log4j configuration file (default $DEFAULT_FUNCTIONS_LOG_CONF) | |
| PULSAR_LOG_CONF Log4j configuration file (default $DEFAULT_LOG_CONF) | |
| PULSAR_BROKER_CONF Configuration file for broker (default: $DEFAULT_BROKER_CONF) | |
| PULSAR_BOOKKEEPER_CONF Configuration file for bookie (default: $DEFAULT_BOOKKEEPER_CONF) | |
| PULSAR_ZK_CONF Configuration file for zookeeper (default: $DEFAULT_ZK_CONF) | |
| PULSAR_CONFIGURATION_STORE_CONF Configuration file for global configuration store (default: $DEFAULT_CONFIGURATION_STORE_CONF) | |
| PULSAR_WEBSOCKET_CONF Configuration file for websocket proxy (default: $DEFAULT_WEBSOCKET_CONF) | |
| PULSAR_PROXY_CONF Configuration file for Pulsar proxy (default: $DEFAULT_PROXY_CONF) | |
| PULSAR_WORKER_CONF Configuration file for functions worker (default: $DEFAULT_WORKER_CONF) | |
| PULSAR_STANDALONE_CONF Configuration file for standalone (default: $DEFAULT_STANDALONE_CONF) | |
| PULSAR_PRESTO_CONF Configuration directory for Pulsar Presto (default: $DEFAULT_PULSAR_PRESTO_CONF) | |
| PULSAR_EXTRA_OPTS Extra options to be passed to the jvm | |
| PULSAR_EXTRA_CLASSPATH Add extra paths to the pulsar classpath | |
| PULSAR_PID_DIR Folder where the pulsar server PID file should be stored | |
| PULSAR_STOP_TIMEOUT Wait time before forcefully kill the pulsar server instance, if the stop is not successful |
We also need to update the CLI tools web page: https://github.com/apache/pulsar/blob/master/site2/docs/reference-cli-tools.md
bbca224 to
38ce3ce
Compare
|
test failed reason: Unrecognized option: -Xlog:gc:logs/pulsar_gc_%p.log:time,uptime:filecount=10,filesize=20M |
38ce3ce to
ce012fe
Compare
|
@gaozhangmin - I think you still need to update the documentation here: https://github.com/apache/pulsar/blob/master/site2/docs/reference-cli-tools.md. |
@michaeljmarshall DOCS added |
|
@michaeljmarshall Could you take a look again? |
|
Could you check my comments? It looks like |
@BewareMyPower Sure, I will check later. |
@BewareMyPower I tested locally |
|
/pulsarbot run-failure-checks |
966c4e2 to
d0d389b
Compare
Did you use Java 11? The CI env is a docker container based on Ubuntu 16.04 and Java 11. $ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.16.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.16.04, mixed mode, sharing) |
27fdfb3 to
d0d389b
Compare
I tested without |
|
I will take a look at this issue tomorrow. |
d0d389b to
a79a123
Compare
|
I found the problem. It's because when the standalone starts, it chooses the $ /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.16.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.16.04, mixed mode, sharing)I think it's caused by wrong |
|
You can modify ./pulsar-test-service-start.shto JAVA_HOME=/usr ./pulsar-test-service-start.sh Then |
|
/pulsarbot run-failure-checks |
Thx. It worked. |
michaeljmarshall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@codelipenghui PTAL again |
|
|
||
| # Extra options to be passed to the jvm | ||
| PULSAR_EXTRA_OPTS=${PULSAR_EXTRA_OPTS:-" -Dpulsar.allocator.exit_on_oom=true -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024"} | ||
| PULSAR_EXTRA_OPTS="${PULSAR_EXTRA_OPTS:-" -Dpulsar.allocator.exit_on_oom=true -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024"} ${PULSAR_GC_LOG}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to break pulsar-perf when running it in the docker container.
example failure:
root@e187af4bc610:/pulsar# ./bin/pulsar-perf produce
[0.000s][error][logging] Error opening log file 'logs/pulsar_gc_119.log': No such file or directory
[0.000s][error][logging] Initialization of output 'file=logs/pulsar_gc_%p.log' using options 'filecount=10,filesize=20M' failed.
Invalid -Xlog option '-Xlog:gc*:logs/pulsar_gc_%p.log:time,uptime:filecount=10,filesize=20M', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created #13022 with a minimal fix to the issue.
- create /pulsar/logs directory since it's now required for running pulsar-perf after apache#11285 changes
It seems that, We configured params for broker gc log, but not used.
turn on broker gc log.