链接:kafka,zookeeper
提取码:681v
org.apache.kafka.common.KafkaException: Socket server failed to bind to 114.115.20.100:9092: Cannot
kafka操作命令,用–bootstrap-server
./kafka-console-producer.sh --bootstrap-server ip:9092 --topic test_01
WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 9 : {test_01=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
解决: 编辑service.properties,修改为:
listeners=PLAINTEXT://:9092
此处的localhost是对外开发的ip
advertised.listeners = PLAINTEXT://localhost:9092
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for
解决: 编辑service.properties,修改为:
改成localhost,zookeeper还是指定的ip
top -p 394378
ps -ef|grep pid 查看是什么占用
解释:To free pagecache:仅清除页面缓存(PageCache)
echo 1 > /proc/sys/vm/drop_caches
解释:To free dentries and inodes:清除目录项和inode
echo 2 > /proc/sys/vm/drop_caches
解释:To free pagecache, dentries and inodes:清除页面缓存,目录项和inode
echo 3 > /proc/sys/vm/drop_caches
-------------------------环境整好后,开始进入整合------------------------
springboot整合好kafka,flink在addSource(KafkaSource)时报错:
org.apache.flink.streaming.runtime.tasks.StreamTaskException: Could not serialize inputs.
flink序列化POJO规则
发现自己写的没问题!!!
但是TMD,我另外一个springboot项目,启动类没用@SpringBootApplication注解,直接用main跑起来没问题
考虑1:spring boot加载容器到bean时,flink序列化报错,不知道有没有影响
👇下一章提供了解决办法