Dataphin集成任务同步失败报“The connection string contains an invalid host 'xxx;xxx'. Reserved characters such as ':' must be escaped according RFC 2396. Any IPv6 address literal must be enclosed in '[' and ']' according to RFC 2732”错误

问题描述

Dataphin集成任务同步失败报错:“The connection string contains an invalid host 'xxx;xxx'. Reserved characters such as ':' must be escaped according RFC 2396. Any IPv6 address literal must be enclosed in '[' and ']' according to RFC 2732”。

2021-10-27 09:54:49.411 [job-3873236] ERROR DlinkTrans - Exception when job run
java.lang.IllegalArgumentException: The connection string contains an invalid host 'xxx;xxx'. Reserved characters such as ':' must be escaped according RFC 2396. Any IPv6 address literal must be enclosed in '[' and ']' according to RFC 2732.
 at com.mongodb.ConnectionString.parseHosts(ConnectionString.java:652) ~[mongo-java-driver-3.2.2.jar:na]
 at com.mongodb.ConnectionString.<init>(ConnectionString.java:249) ~[mongo-java-driver-3.2.2.jar:na]
 at com.mongodb.MongoClientURI.<init>(MongoClientURI.java:176) ~[mongo-java-driver-3.2.2.jar:na]
 at com.mongodb.MongoClientURI.<init>(MongoClientURI.java:158) ~[mongo-java-driver-3.2.2.jar:na]
 at com.alibaba.datax.plugin.reader.mongodbreader.util.MongoUtil.fetchMongoClientUriByConfiguration(MongoUtil.java:16) ~[mongodbreader-0.0.1-SNAPSHOT.jar:na]
 at com.alibaba.datax.plugin.reader.mongodbreader.MongoDBReader$Job.init(MongoDBReader.java:54) ~[mongodbreader-0.0.1-SNAPSHOT.jar:na]
 at com.alibaba.dt.dlink.core.trans.DlinkTransRunner.initJobReader(DlinkTransRunner.java:59) ~[dlink-engine-0.0.1-SNAPSHOT.jar:na]
 at com.alibaba.dt.dlink.core.trans.DlinkTrans.doInit(DlinkTrans.java:277) ~[dlink-engine-0.0.1-SNAPSHOT.jar:na]
 at com.alibaba.dt.dlink.core.trans.DlinkTrans.start(DlinkTrans.java:132) ~[dlink-engine-0.0.1-SNAPSHOT.jar:na]
 at com.alibaba.dt.dlink.core.Engine.runTrans(Engine.java:78) [dlink-engine-0.0.1-SNAPSHOT.jar:na]
 at com.alibaba.dt.dlink.core.Engine.entry(Engine.java:153) [dlink-engine-0.0.1-SNAPSHOT.jar:na]
 at com.alibaba.dt.dlink.core.Engine.main(Engine.java:165) [dlink-engine-0.0.1-SNAPSHOT.jar:na]
2021-10-27 09:54:49.415 [job-3873236] INFO  DlinkTrans - dlink starts to do destroy ...
2021-10-27 09:54:49.416 [job-3873236] INFO  DlinkTransRunner - Dlink Reader.Job [MongoDB_1] do destroy work .
2021-10-27 09:54:49.416 [job-3873236] INFO  DlinkTransRunner - Dlink Writer.Job [Maxcompute_1] do destroy work .
2021-10-27 09:54:49.417 [job-3873236] ERROR Engine -

问题原因

当前版本的MongoDB不支持配置多个URL。

解决方案

URL配置一个节点即可。

适用于

  • Dataphin
阿里云首页 相关技术圈