Closed Dr-Wu-Wen closed 9 months ago
my config.yaml: kafka: username: #username password: #password addr: [192.168.0.46:9092] # latestMsgToRedis: topic: "latestMsgToRedis" #It is not recommended to modify offlineMsgToMongo: topic: "offlineMsgToMongoMysql" #It is not recommended to modify msgToPush: topic: "msgToPush" #It is not recommended to modify consumerGroupID: #consumer group, it is not recommended to modify msgToRedis: redis# msgToMongo: mongo # msgToMySql: mysql# msgToPush: push #
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
my config.yaml: kafka: username: #username password: #password addr: [192.168.0.46:9092] # latestMsgToRedis: topic: "latestMsgToRedis" #It is not recommended to modify offlineMsgToMongo: topic: "offlineMsgToMongoMysql" #It is not recommended to modify msgToPush: topic: "msgToPush" #It is not recommended to modify consumerGroupID: #consumer group, it is not recommended to modify msgToRedis: redis# msgToMongo: mongo # msgToMySql: mysql# msgToPush: push #
Note: My 'Kafka' and other components are not on the same server as OpenIM server.
@FGadvancer
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@FGadvancer
If you are deploying Kafka from source code, during the deployment, modify the listeners configuration in the server.properties file of Kafka to replace listeners=PLAINTEXT://192.168.1.53:9092 with your local network IP.
Not very clear! Doesn't it seem to have anything to do with Kafka? My Kafka service is deployed through Docker on 192.168.0.46, And it has started normally. But my openIM server is deployed on another server, ip: 192.168.0.208, Then, when I started the openIM server, an appeal error occurred. error log: ==========================start push server=========================== configFolderPath: use config /openim/Open-IM-Server/config/config.yaml use config /openim/Open-IM-Server/config/notification.yaml start Push server, port: 10170 prometheusPort: 20170 , OpenIM version: v3.0.0 panic: dial tcp 127.0.0.1:9092: connect: connection refused
goroutine 47 [running]: github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka.(MConsumerGroup).RegisterHandleAndConsumer(0xc000285e80, {0x16e8670, 0xc00011c708}) /openim/Open-IM-Server/pkg/common/kafka/consumer_group.go:63 +0x145 created by github.com/OpenIMSDK/Open-IM-Server/internal/push.(Consumer).Start /openim/Open-IM-Server/internal/push/consumer_init.go:40 +0x8f。
my exprience is check your kafka config KAFKA_ADVERTISED_LISTENERS
even though kafka will startup, openim will get kafka address from advertise, it seem KAFKA_ADVERTISED_LISTENERS
is set to localhost
kafka:
container_name: kafka
image: wurstmeister/kafka
restart: always
ports:
- 9092:9092
networks:
- traefik
- private
environment:
TZ: Asia/Shanghai
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "latestMsgToRedis:8:1,msgToPush:8:1,offlineMsgToMongoMysql:8:1"
KAFKA_ADVERTISED_LISTENERS: INSIDE://127.0.0.1:9093,OUTSIDE://192.168.0.46:9092
KAFKA_LISTENERS: INSIDE://:9093,OUTSIDE://:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: OUTSIDE
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
/reset
What happened?
When I execute the command'/start_all.sh', it appears: ==========================start push server=========================== configFolderPath: use config /openim/Open-IM-Server/config/config.yaml use config /openim/Open-IM-Server/config/notification.yaml start Push server, port: 10170 prometheusPort: 20170 , OpenIM version: v3.0.0 panic: dial tcp 127.0.0.1:9092: connect: connection refused
goroutine 47 [running]: github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka.(MConsumerGroup).RegisterHandleAndConsumer(0xc000285e80, {0x16e8670, 0xc00011c708}) /openim/Open-IM-Server/pkg/common/kafka/consumer_group.go:63 +0x145 created by github.com/OpenIMSDK/Open-IM-Server/internal/push.(Consumer).Start /openim/Open-IM-Server/internal/push/consumer_init.go:40 +0x8f。
Note: My 'Kafka' and other components are not on the same server as OpenIM server.
What did you expect to happen?
I hope to start the service successfully。
How can we reproduce it (as minimally and precisely as possible)?
I hope to start the service successfully。
Anything else we need to know?
No response
version
Cloud provider
OS version
Install tools