-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source Connector消息队列kafka中查不到消息 #71
Comments
tdengine 3.2.2 kafka_2.13-3.7.0 git clone --branch 3.0 https://github.com/taosdata/kafka-connect-tdengine.git |
kafka / TDengine 的日志中有报错信息吗 |
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: no taos in java.library.path: /usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr> |
tdengine 和kafka在不同的机器上 |
kafka 那边没装TDengine客户端吧。 |
kafka装了客户端还是报了以下错误,我看了kafka-connect-tdengine-3.0的lib库下taos-jdbc驱动是3.3.3,所以在上面也装了3.3.3的TDEngine客户端(装3.0.7.1的客户端也是一样报以下错误),但我的TDEngine服务端是3.0.7.1。 |
按照官方文档的配置
https://docs.taosdata.com/third-party/collection/kafka/
root@pcserver006:
/kafka_2.13-3.7.0/bin# curl http://localhost:8083/connectors/kafka_2.13-3.7.0/bin#["TDengineSourceConnector"]root@pcserver006:
source-demo.json内如如下:
{
"name":"TDengineSourceConnector",
"config":{
"connector.class": "com.taosdata.kafka.connect.source.TDengineSourceConnector",
"tasks.max": 1,
"subscription.group.id": "source-demo",
"connection.url": "jdbc:TAOS://192.168.201.152:6041",
"connection.user": "root",
"connection.password": "***",
"connection.database": "test",
"connection.attempts": 3,
"connection.backoff.ms": 5000,
"topic.prefix": "tdengine",
"topic.delimiter": "-",
"poll.interval.ms": 1000,
"fetch.max.rows": 100,
"topic.per.stable": true,
"topic.ignore.db": false,
"out.format": "line",
"data.precision": "ms",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "org.apache.kafka.connect.storage.StringConverter"
}
}
tdengine中也写入按文档建了test库与超级表meters,初始化了数据,
执行 curl -X POST -d @source-demo.json http://localhost:8083/connectors -H "Content-Type: application/json"
{"name":"TDengineSourceConnector","config":{"connector.class":"com.taosdata.kafka.connect.source.TDengineSourceConnector","tasks.max":"1","subscription.group.id":"source-demo","connection.url":"jdbc:TAOS://192.168.201.152:6041","connection.user":"root","connection.password":"taosdata","connection.database":"test","connection.attempts":"3","connection.backoff.ms":"5000","topic.prefix":"tdengine","topic.delimiter":"-","poll.interval.ms":"1000","fetch.max.rows":"100","topic.per.stable":"true","topic.ignore.db":"false","out.format":"line","data.precision":"ms","key.converter":"org.apache.kafka.connect.storage.StringConverter","value.converter":"org.apache.kafka.connect.storage.StringConverter","name":"TDengineSourceConnector"},"tasks":[],"type":"source"}root@pcserver006:~/kafka_2.13-3.7.0#
kafka中没有数据
root@pcserver006:~/kafka_2.13-3.7.0/bin# ./kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic tdengine-test-meters
^CProcessed a total of 0 messages
The text was updated successfully, but these errors were encountered: