把0.0.0.0
改成内网ip直接绑定,减去获取ip的干扰:
修改如下:
listeners=INSIDE://<内网IP>:9092,OUTSIDE://<内网IP>:9094
advertised.listeners=INSIDE://<内网IP>,OUTSIDE://<外网IP>:9094
...
你单节点的时候,没有副本备份,现在多节点之后,数据是双份,所以内存也要增加。
内存大小基于几个点的累加:
内存占用越来越高,是kafka在充分利用空闲的内存:
buff/cache
,当有其他的进程需要缓存的时候,kafka会立即释放这些buff/cache
,所以没啥影响,不会引起oom。zookeeper内存不变,kafka你的也不需要调整,当你的消息大小变化了,或者消息有积压的时候,在调整。
不好意思 解决了 有个节点配错了 但现在出现另一个问题
[2021-04-29 14:26:16,372] ERROR [Controller id=2, targetBrokerId=1] Connection to node 1 failed authentication due to: Authentication failed: Invalid username or password (org.apache.kafka.clients.NetworkClient)
[2021-04-29 14:26:16,580] ERROR [Controller id=2, targetBrokerId=1] Connection to node 1 failed authentication due to: Authentication failed: Invalid username or password (org.apache.kafka.clients.NetworkClient)
[2021-04-29 14:26:17,388] ERROR [Controller id=2, targetBrokerId=3] Connection to node 3 failed authentication due to: Authentication failed: Invalid username or password (org.apache.kafka.clients.NetworkClient)