提交 77cf1eff 编写于 作者: L lixiaodong 提交者: LINGuanRen

add common error solutions to 4.7.md file (#712)

上级 9b1ec8ad
......@@ -69,3 +69,94 @@
}
}
```
## 常见报错问题解决
+ 1、MySQL 端 ssl 相关的报错
```bash
Mon Dec 13 15:44:13 CST 2021 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification
```
可以在 jdbcurl 里关闭 ssl ,如示例:
```bash
"jdbcUrl": ["jdbc:mysql://127.0.0.1:3306/tpccdb?useUnicode=true&characterEncoding=utf8"]
调整为
"jdbcUrl": ["jdbc:mysql://127.0.0.1:3306/tpccdb?useUnicode=true&characterEncoding=utf8&useSSL=false"]
```
+ 2、存在外键导入报错
关于有外键的表进truncate的时候报错,可以使用 delete from table 代替,也可以在 prepare sql 语句里 set foreign_key_checks='off' 避免报错。
+ 3、导入数据时事物超时
可以在prepare sql 中增加timeout的设置, set ob_trx_timeout=1000000000 。
+ 4、oceanbasev10reader 和 oceanbasev10writer 插件找不到
说明 OceanBase 读写插件在默认的二进制 DataX 包里不存在,需要编译安装后创建对应的目录并复制相关的json文件,文件的路径和内容如下:
```
target/datax/datax/plugin/reader/oceanbasev10reader/plugin_job_template.json
target/datax/datax/plugin/writer/oceanbasev10writer/plugin_job_template.json
```
```json
{
"job": {
"content": [
{
"reader": {
"name": "oceanbasev10reader",
"parameter": {
"column": [
"*"
],
"connection": [
{
"jdbcUrl": [
"||_dsc_ob10_dsc_||clusterName:tenantName||_dsc_ob10_dsc_||jdbc:oceanbase://obproxyIp:port/dbname"
],
"table": [
"tabName"
]
}
],
"password": "",
"readBatchSize": 100000,
"username": "",
"weakRead": false
}
},
"writer": {
"name": "oceanbasev10writer",
"parameter": {
"column": [
"*"
],
"connection": [
{
"jdbcUrl": "||_dsc_ob10_dsc_||clusterName:tenantName||_dsc_ob10_dsc_||jdbc:oceanbase://obproxyIp:port/dbname?yearIsDateType=false&ZeroDateTimeBehavior=convertToNull&tinyIntlisBit=false&rewriteBatchedStatements=true",
"table": [
"tabName"
]
}
],
"obWriteMode": "insert",
"password": "",
"preSql": [
""
],
"username": ""
}
}
}
],
"setting": {
"speed": {
"channel": ""
}
}
}
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册