报错
开发人员反映pulsar不可用
每个pulsar bk节点查看
./bookkeeper shell bookiesanity
发现有2个bk不可用,查看对应日志发现如下
15:36:52.503 [bookie-io-1-134] ERROR org.apache.bookkeeper.proto.BookieServer - Unable to allocate memory, exiting bookie io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648)
解决方式
https://github.com/apache/pulsar/issues/9988
查到了有个MaxDirectMemorySize参数
grep -rin "MaxDirectMemorySize" ./*
vim ./conf/bkenv.sh
将所有bk节点的该配置修改2g至16G
重启所有bk节点
./bin/pulsar-daemon start bookie
恢复