无法删除topic,删除topic报错

我在执行查看topic的时候,
./pulsar-admin topics list dw/ods
显示
“persistent://dw/ods/pgl_cannal_to_pulsar4-partition-0”
但是当我执行
./pulsar-admin topics delete-partitioned-topic persistent://dw/ods/pgl_cannal_to_pulsar4
然后就报错了,显示
admin/v2/persistent/dw/ods/pgl_cannal_to_pulsar7/partitions?force=false&deleteSchema=false] Failed to perform http delete request: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
HTTP 500 Internal Server Error
日志报错:
2022-07-27T10:03:42,266+0800 [pulsar-web-37-92] INFO org.apache.pulsar.broker.admin.v2.NonPersistentTopics - [admin] Namespace bundle is not owned by any broker dw/dws/0x40000000_0x80000000
2022-07-27T10:03:42,266+0800 [pulsar-web-37-29] INFO org.apache.pulsar.broker.admin.v2.NonPersistentTopics - [admin] Namespace bundle is not owned by any broker dw/dws/0x00000000_0x40000000
2022-07-27T10:03:42,266+0800 [pulsar-web-37-92] INFO org.eclipse.jetty.server.RequestLog - 10.192.112.43 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/non-persistent/dw/dws/0x40000000_0x80000000 HTTP/1.1” 204 0 “-” “Pulsar-Java-v2.9.2” 1
2022-07-27T10:03:42,266+0800 [pulsar-web-37-4] INFO org.apache.pulsar.broker.admin.v2.NonPersistentTopics - [admin] Namespace bundle is not owned by any broker dw/dws/0x80000000_0xc0000000
2022-07-27T10:03:42,266+0800 [pulsar-web-37-29] INFO org.eclipse.jetty.server.RequestLog - 10.192.112.43 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/non-persistent/dw/dws/0x00000000_0x40000000 HTTP/1.1” 204 0 “-” “Pulsar-Java-v2.9.2” 1
2022-07-27T10:03:42,266+0800 [pulsar-web-37-4] INFO org.eclipse.jetty.server.RequestLog - 10.192.112.43 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/non-persistent/dw/dws/0x80000000_0xc0000000 HTTP/1.1” 204 0 “-” “Pulsar-Java-v2.9.2” 1
2022-07-27T10:03:42,266+0800 [pulsar-web-37-78] INFO org.apache.pulsar.broker.admin.v2.NonPersistentTopics - [admin] Namespace bundle is not owned by any broker dw/dws/0xc0000000_0xffffffff
2022-07-27T10:03:42,267+0800 [pulsar-web-37-78] INFO org.eclipse.jetty.server.RequestLog - 10.192.112.43 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/non-persistent/dw/dws/0xc0000000_0xffffffff HTTP/1.1” 204 0 “-” “Pulsar-Java-v2.9.2” 1
2022-07-27T10:03:42,269+0800 [AsyncHttpClient-57-1] INFO org.eclipse.jetty.server.RequestLog - 10.192.114.20 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/non-persistent/dw/dws HTTP/1.1” 200 2 “-” “Pulsar-Java-v2.7.0” 6
2022-07-27T10:03:42,270+0800 [pulsar-web-37-2] INFO org.eclipse.jetty.server.RequestLog - 10.192.114.20 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/non-persistent/dw/dws/partitioned HTTP/1.1” 200 2 “-” “Pulsar-Java-v2.7.0” 1
2022-07-27T10:03:42,271+0800 [pulsar-web-37-64] INFO org.eclipse.jetty.server.RequestLog - 10.192.114.20 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/persistent/dw/dws/partitioned HTTP/1.1” 200 2 “-” “Pulsar-Java-v2.7.0” 2
2022-07-27T10:03:42,273+0800 [pulsar-web-37-78] INFO org.eclipse.jetty.server.RequestLog - 10.192.114.20 - - [27/Jul/2022:10:03:42 +0800] “GET /admin/v2/persistent/dw/ods HTTP/1.1” 200 5567 “-” “Pulsar-Java-v2.7.0” 1
2022-07-27T10:03:42,275+0800 [pulsar-web-37-23] INFO org.apache.pulsar.broker.admin.v2.NonPersistentTopics - [admin] Namespace bundle is not owned by any broker dw/ods/0x40000000_0x48000000

2022-07-27T10:08:12,809+0800 [main] WARN org.apache.pulsar.broker.protocol.ProtocolHandlerUtils - Failed to load connector from /appdata/apache-pulsar-2.9.2/./protocols/pulsar-protocol-handler-kafka-2.9.2.20.nar. It is OK however if you want to use this protocol handler, please make sure you put the correct protocol handler NAR package in the handlers directory.
java.nio.file.NoSuchFileException: /tmp/pulsar-nar/pulsar-protocol-handler-kafka-2.9.2.20.nar-unpacked/PyuA7BtnWChZM2DgSV6flw/META-INF/services/pulsar-protocol-handler.yml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:371) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:422) ~[?:?]
at java.nio.file.Files.readAllBytes(Files.java:3206) ~[?:?]
at org.apache.pulsar.common.nar.NarClassLoader.getServiceDefinition(NarClassLoader.java:219) ~[org.apache.pulsar-pulsar-common-2.9.2.jar:2.9.2]
at org.apache.pulsar.broker.protocol.ProtocolHandlerUtils.getProtocolHandlerDefinition(ProtocolHandlerUtils.java:60) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.broker.protocol.ProtocolHandlerUtils.getProtocolHandlerDefinition(ProtocolHandlerUtils.java:55) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.broker.protocol.ProtocolHandlerUtils.searchForHandlers(ProtocolHandlerUtils.java:89) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.broker.protocol.ProtocolHandlers.load(ProtocolHandlers.java:49) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:641) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:273) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:350) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
2022-07-27T10:08:12,829+0800 [main] ERROR org.apache.pulsar.broker.PulsarService - Failed to start Pulsar service: No protocol handler is found for protocol kafka. Available pr
otocols are : {}
java.lang.RuntimeException: No protocol handler is found for protocol kafka. Available protocols are : {}
at org.apache.pulsar.broker.protocol.ProtocolHandlers.lambda$load$0(ProtocolHandlers.java:59) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at org.apache.pulsar.broker.protocol.ProtocolHandlers.load(ProtocolHandlers.java:54) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:641) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:273) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:350) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
2022-07-27T10:08:12,829+0800 [main] ERROR org.apache.pulsar.PulsarBrokerStarter - Failed to start pulsar service.
org.apache.pulsar.broker.PulsarServerException: java.lang.RuntimeException: No protocol handler is found for protocol kafka. Available protocols are : {}
at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:795) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:273) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:350) [org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
Caused by: java.lang.RuntimeException: No protocol handler is found for protocol kafka. Available protocols are : {}
at org.apache.pulsar.broker.protocol.ProtocolHandlers.lambda$load$0(ProtocolHandlers.java:59) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at org.apache.pulsar.broker.protocol.ProtocolHandlers.load(ProtocolHandlers.java:54) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:641) ~[org.apache.pulsar-pulsar-broker-2.9.2.jar:2.9.2]
… 2 more
2022-07-27T10:08:33,496+0800 [main] INFO org.apache.pulsar.broker.PulsarService - Starting Pulsar Broker service; version: ‘2.9.2’

Hi @xiehaitang ,可以执行下面命令查看下 partitioned-topic 是否还存在:

pulsar-admin topics list-partitioned-topics tenant/namespace

开始是存在的,删除之后就会出现broker节点异常,重启之后这个topic就没有了

@futeng 可以看看最新的这个回复吗?还需要给到什么信息吗?

1 Like