yabinmeng opened a new issue #9549:
URL: https://github.com/apache/pulsar/issues/9549
**Describe the bug**
I'm testing pulsar topic compaction using both `pulsar-admin topics compact`
and `pulsar compact-topic` commands.
* `pulsar-admin topics compact` command works fine
* `pulsar compact-topic` command fails right away
I tested with versions 2.6.3 and 2.7.0. Both fail, but with different errors.
**2.6.3** (**NOTE**: my pulsar cluster doesn't have any security feature,
including TLS, enabled at all)
```
5:40.800 [pulsar-client-io-11-1] INFO
org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x9b33e1cf,
L:/10.101.32.196:52186 -
R:ip-10-101-32-196.srv101.dsinternal.org/10.101.32.196:6651]] Connected to
server
20:25:40.824 [pulsar-client-io-11-1] WARN
org.apache.pulsar.client.impl.ClientCnx - Error during handshake
java.nio.channels.ClosedChannelException: null
at
io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1076)
[io.netty-netty-handler-4.1.48.Final.jar:4.1.48.Final]
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
... ...
```
**2.7.0**
```
Exception in thread "main" java.util.concurrent.ExecutionException:
java.lang.NullPointerException
at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
at
org.apache.pulsar.compaction.CompactorTool.main(CompactorTool.java:108)
Caused by: java.lang.NullPointerException
at
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:878)
at
org.apache.bookkeeper.zookeeper.ZooKeeperClient$Builder.build(ZooKeeperClient.java:225)
at
org.apache.pulsar.zookeeper.ZookeeperBkClientFactoryImpl.lambda$0(ZookeeperBkClientFactoryImpl.java:55)
at
org.apache.bookkeeper.util.SafeRunnable$2.safeRun(SafeRunnable.java:73)
at
org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
```
**To Reproduce**
Steps to reproduce the behavior:
1. Create a producer and publish some messages to a topic
2. Run `pulsar compact-topic --topic <topic_name>`
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
**Additional context**
Add any other context about the problem here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]