apache-kafka - 将融合的 jdbc 接收器连接器与事件中心模式注册表连接
问题描述
我无法将 jdbc 接收器连接器与事件中心架构注册表连接。连接容器能够与事件中心连接,参考https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-kafka -connect 教程 (jaas 配置..)。我在事件中心架构注册表上发布了架构。
curl -X POST -H "Content-Type: application/json" --data '{
"name": "jdbc-sink-1",
"config": {
"connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"key.converter.schemas.enable": "true",
"value.converter": "io.confluent.connect.avro.AvroConverter",
"value.converter.schema.registry.url": "http://xxxx.servicebus.windows.net",
"tasks.max": "1",
"topics": "members",
"connection.url": "jdbc:postgresql://xxx:5432/postgres",
"connection.user": "postgres",
"connection.password": "xxx",
"auto.create": "false",
"dialect.name":"PostgreSqlDatabaseDialect",
"insert.mode":"upsert",
"delete.enabled": "true",
"pk.mode": "record_key",
"pk.fields": "id",
"auto.evolve": "false"
}
}' http://localhost:8083/connectors
堆栈跟踪:
Caused by: java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.Socket.connect(Socket.java:609)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:341)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:362)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081)
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:275)
at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:355)
at io.confluent.kafka.schemaregistry.client.rest.RestService.getId(RestService.java:707)
at io.confluent.kafka.schemaregistry.client.rest.RestService.getId(RestService.java:689)
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getSchemaByIdFromRegistry(CachedSchemaRegistryClient.java:225)
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getSchemaBySubjectAndId(CachedSchemaRegistryClient.java:299)```
解决方案
推荐阅读
- javascript - Reactjs:无法读取未定义的属性“myProp”
- google-bigquery - 查询超出 BigQuery GROUP BY 中关于大数据的资源限制
- python - 如何找到我在公共组中写过的所有消息?
- google-cloud-pubsub - Google 课堂添加 IAM 策略绑定
- reactjs - 如何在所有页面(所有组件)ReactJs 中显示类似用户名的属性?
- c++ - SDL2 窗口不会立即关闭?
- node.js - 为什么我的 ejs 模板没有显示相关数据?
- django - Django REST Viewsets - 无法使用自定义查询集删除
- php - 在 laravel 中找不到资源的奇怪问题
- c++ - 通过分隔符将 QString 拆分为多个 QString?