Skip to content
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

使用REST连接时报错user is required #54

Open
XieRW opened this issue Dec 13, 2023 · 2 comments
Open

使用REST连接时报错user is required #54

XieRW opened this issue Dec 13, 2023 · 2 comments

Comments

@XieRW
Copy link

XieRW commented Dec 13, 2023

connect.log日志如下:

java.sql.SQLException: ERROR (0x2319): user is required
	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:87)
	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:74)
	at com.taosdata.jdbc.rs.ConnectionParam.getParam(ConnectionParam.java:146)
	at com.taosdata.jdbc.SchemalessWriter.init(SchemalessWriter.java:109)
	at com.taosdata.jdbc.SchemalessWriter.<init>(SchemalessWriter.java:51)
	at com.taosdata.kafka.connect.db.CacheProcessor.schemalessInsert(CacheProcessor.java:80)
	at com.taosdata.kafka.connect.sink.TDengineSinkTask.bulkWriteBatch(TDengineSinkTask.java:108)
	at com.taosdata.kafka.connect.sink.TDengineSinkTask.put(TDengineSinkTask.java:85)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:601)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:350)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:250)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:219)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:204)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:259)
	at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:236)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

sink-demo.json:

{
  "name": "TDengineSinkConnector",
  "config": {
    "connector.class":"com.taosdata.kafka.connect.sink.TDengineSinkConnector",
    "tasks.max": "1",
    "topics": "meters",
    "connection.url": "jdbc:TAOS-RS://127.0.0.1:6041",
    "connection.user": "root",
    "connection.password": "taosdata",
    "connection.database": "power",
    "db.schemaless": "line",
    "data.precision": "ns",
    "key.converter": "org.apache.kafka.connect.storage.StringConverter",
    "value.converter": "org.apache.kafka.connect.storage.StringConverter",
    "errors.tolerance": "all",
    "errors.deadletterqueue.topic.name": "dead_letter_topic",
    "errors.deadletterqueue.topic.replication.factor": 1
  }
}

我将sink-demo.json其中的"connection.url": "jdbc:TAOS://127.0.0.1:6030"修改为"connection.url": "jdbc:TAOS-RS://127.0.0.1:6041?user=root&password=taosdata"就不会再出现问题了,怀疑是改成REST连接后,connection.user配置项不生效,只好在url上直接拼接了。

希望能验证这个问题并修复。

@macbookpro2016
Copy link

用restful方式,将参数写在链接里之后消费kafka消息写入数据的时候会报args error 吗?

@alwayslikethis777
Copy link

我也是用restful方式,然后提示找不到table name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants