我正在尝试使用以下配置创建postgres接收器连接器:
{
"name": "postgres-kafka-connector",
"connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
"tasks.max": "10",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "org.apache.kafka.connect.converters.ByteArrayConverter",
"topics": "test-topic",
"connection.url": "jdbc:postgresql:test-18172ff-postgres:5432/b1x",
"connection.user": "postgres",
"connection.password": "*************",
"auto.create": "true"
}
但是,当查看kafka connect中的日志时,我看到以下内容: org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP
重要提示:我试图运行这个Kafka设置在Kubernetes。
知道为什么会这样吗?
暂无答案!
目前还没有任何答案,快来回答吧!