南大通用GBase 8a加载常见错误原因

原文链接:www.gbase.cn/community/p...

更多精彩内容尽在南大通用GBase技术社区,南大通用致力于成为用户最信赖的数据库产品供应商。

常见加载错误及原因

报Login denied uri

用例:

lua 复制代码
gbase> load data infile 'ftp://gbase:gbase123@172.16.128.11//home/gbase/*.tbl'  into table test.tmp_lxj_1212_test data_format 3;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Expanding wildcard operation failed with error - Login denied uri : ftp://gbase:********@172.16.128.11//home/gbase/%2a.tbl.

错误原因:gbase用户密码错误

报Couldn't connect to server

用例:

vbnet 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/1.txt'  into table test.tmp_lxj_1212_test data_format 3;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: I/O operation on ftp://gbase:*****@172.16.128.11//home/gbase/1.txt failed with error - Couldn't connect to server, File name ftp://gbase:*****@172.16.128.11//home/gbase/1.txt

报错原因:ip地址错误或者vsftpd服务没有启动

报failed to get table distribution information.

用例:

lua 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/1.txt'  into table test.tmp_lxj_0621_test data_format 3;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: failed to get table distribution information.

报错原因:所涉及加载表不存在

报550 Could not get file size.

用例:

sql 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/4.txt'  into table test.tmp_lxj_1212_test data_format 3;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: I/O operation on ftp://gbase:*****@172.16.128.11//home/gbase/4.txt failed with error - 550 Could not get file size., File name ftp://gbase:*****@172.16.128.11//home/gbase/4.txt

错误原因:/home/gbase/4.txt 这个文件不存在

报Remote file not found uri

用例:

lua 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/*.tbl'  into table test.tmp_lxj_1212_test data_format 3;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Expanding wildcard operation failed with error - Remote file not found uri : ftp://gbase:*****@172.16.128.11//home/gbase/%2a.tbl.

错误原因:/home/gbase/*.tbl 没有匹配到文件,通配符文件不存在

报Access denied to remote resource

用例:

vbnet 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11/home/gbase/2.txt'  into table test.tmp_lxj_1212_test data_format 3 max_bad_records 0;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: I/O operation on ftp://gbase:*****@172.16.128.11/home/gbase/2.txt failed with error - Access denied to remote resource, File name ftp://gbase:*****@172.16.128.11/home/gbase/2.txt

错误原因:/home/gbase/2.txt路径错误

报Too many bad records

用例:

vbnet 复制代码
load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/2.txt'  
into table test.tmp_lxj_1212_test data_format 3 max_bad_records 0;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Task 262162 failed, [172.16.128.12:5050](GBA-02AD-0005)Failed to query in gnode:
DETAIL: (GBA-01-600) Gbase internal error: Task 262162, Too many bad records!

错误原因:错误数据行数超过max_bad_records指定值

报read operation timeout

用例:

less 复制代码
2016-12-15 14:52:47.253 [SQLDISP][ERROR][S:83876][Q:696407]:Query failed, THD(0x4b9f6000) HOST(10.17.6.52:5050->50885) reason: (GBA-01-600) Gbase internal error: I/O operation on ftp://doubass:*********@10.255.219.24//data3/asiainfo/interface/12300/data/s_12300_BAS_04002_20161214_011_00_016.dat failed with error - read operation timeout

错误原因:如果填充一个数据块(8M)的时间超过gbase_loader_read_timeout参数值,加载任务将报错停止

报Timeout was reached

用例:

less 复制代码
2016-12-15 15:49:52.221 [SQLDISP][ERROR][S:191527][Q:1487078]:
Query failed, THD(0x429ae000) HOST(10.17.6.95:5050->110938) reason: (GBA-01-600) 
Gbase internal error: Task 622072, I/O operation on 
ftp://doubass:*********@10.255.219.26//data6/asiainfo/interface/12900/data/a_12900_BAS_01002_20161214_00.verf failed with error - Timeout was reached

错误原因:ftp服务器端超时

报Unsupport local file for loader

用例:

lua 复制代码
gbase> load data infile '//home/gbase/1.txt'  into table test.tmp_lxj_1212_test data_format 3;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Unsupport local file for loader

错误原因:不支持本地文件加载,即file_list参数部分必须填写ip地址和登录用户信息

报Line length is more than gbase_loader_max_line_lengt

用例:

vbnet 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/024123_0'  into table test.tmp_lxj_1220_test data_format 3;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Task 393223 failed, [172.16.128.12:5050](GBA-02AD-0005)Failed to query in gnode:
DETAIL: (GBA-01-600) Gbase internal error: Line length 8388608 is more than gbase_loader_max_line_length ( 4194304 ) in file 'ftp://gbase:*****@172.16.128.11//home/gbase/024123_0'
1024*1024

错误原因:行长度超过参数gbase_loader_max_line_length值。

报validate error

用例1:字符串加载到数字类型字段

1数据内容:

root@Node1 gbase# cat 1.txt

1

2

3

a

2表结构:create table tmp_lxj_1212_test(id int);

3加载sql:

sql 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/1.txt'  into table test.tmp_lxj_1212_test data_format 3;
Query OK, 3 rows affected (Elapsed: 00:00:01.32)
Task 393224 finished, Loaded 3 records, Skipped 1 records

4存在一条skip数据,查看trc日志:

markdown 复制代码
[root@Node1 gbase]# cexecs "ls -lrt /opt/gnode/log/gbase/loader_logs/393224*"
************************ coor  ************************
--------- 172.16.128.11---------
-rw-rw---- 1 gbase gbase 146 12月 20 04:43 /opt/gnode/log/gbase/loader_logs/393224_test_tmp_lxj_1212_test_n1_172.16.128.11_20161220044343.trc
-rw-rw---- 1 gbase gbase   2 12月 20 04:43 /opt/gnode/log/gbase/loader_logs/393224_test_tmp_lxj_1212_test_n1_172.16.128.11_20161220044343.err
--------- 172.16.128.12---------
ls: 无法访问/opt/gnode/log/gbase/loader_logs/393224*: 没有那个文件或目录
[root@Node1 gbase]# cat 
/opt/gnode/log/gbase/loader_logs/393224_test_tmp_lxj_1212_test_n1_172.16.128.11_20161220044343.trc
file_name    |   file_offset    |   record_len   |   column    |    reason
ftp://gbase:*****@172.16.128.11//home/gbase/1.txt|6|2|1|validate error

用例2:yyyymmdd日期格式数据加载到date字段

1数据内容

root@Node1 gbase# cat date.txt

20161212

2表结构:create table tmp_lxj_1212_date_test(v_date date);

3加载sql:

vbnet 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/date.txt'  into table test.tmp_lxj_1220_date_test data_format 3 max_bad_records 0;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Task 393227 failed, [172.16.128.11:5050](GBA-02AD-0005)Failed to query in gnode:
DETAIL: (GBA-01-600) Gbase internal error: Task 393227, Too many bad records!

4 查看trc日志:

perl 复制代码
[root@Node2 ~]# cat /opt/gnode/log/gbase/loader_logs/393226_test_tmp_lxj_1220_date_test_n1_172.16.128.12_20161220225132.trc
file_name    |   file_offset    |   record_len   |   column    |    reason
ftp://gbase:*****@172.16.128.11//home/gbase/date.txt|0|9|1|validate error

报text parser error

用例:表列数与文件列数不一致,文件列数多于表列数

1数据内容:

root@Node1 gbase# cat 1212.txt

1,2

2表结构:create table tmp_lxj_1212_test(id int);

3加载sql:

sql 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/1212.txt'  into table test.tmp_lxj_1212_test data_format 3 fields terminated by ',';
Query OK, 0 rows affected (Elapsed: 00:00:00.63)
Task 393231 finished, Loaded 0 records, Skipped 1 records

4存在一条skip数据,查看trc日志:

markdown 复制代码
[root@Node1 gbase]# cexec "ls -lrt /opt/gnode/log/gbase/loader_logs/393231*"
************************* coor *************************
--------- 172.16.128.11---------
ls: 无法访问/opt/gnode/log/gbase/loader_logs/393231*: 没有那个文件或目录
--------- 172.16.128.12---------
-rw-rw---- 1 gbase gbase 152 12月 20 23:40 /opt/gnode/log/gbase/loader_logs/393231_test_tmp_lxj_1212_test_n1_172.16.128.12_20161220234049.trc
-rw-rw---- 1 gbase gbase   4 12月 20 23:40 /opt/gnode/log/gbase/loader_logs/393231_test_tmp_lxj_1212_test_n1_172.16.128.12_20161220234049.err
[root@Node2 ~]# cat /opt/gnode/log/gbase/loader_logs/393231_test_tmp_lxj_1212_test_n1_172.16.128.12_20161220234049.trc
file_name    |   file_offset    |   record_len   |   column    |    reason
ftp://gbase:*****@172.16.128.11//home/gbase/1212.txt|0|4|2|text parser error

报data column size less than defined size

用例:表列数与文件列数不一致,文件列数少于表列数

1数据内容:

root@Node1 gbase# cat 1.txt

1

2表结构:create table tmp_lxj_1212_test1(id int,name varchar(10));

3加载sql:

sql 复制代码
gbase> load data infile 'ftp://gbase:gbase@172.16.128.11//home/gbase/1.txt'  into table test.tmp_lxj_1212_test1 data_format 3;
Query OK, 0 rows affected (Elapsed: 00:00:00.38)
Task 393233 finished, Loaded 0 records, Skipped 4 records

4存在4条skip数据

markdown 复制代码
[root@Node1 gbase]# cexecs "ls -lrt /opt/gnode/log/gbase/loader_logs/393233*"
************************ coor  ************************
--------- 172.16.128.11---------
ls: 无法访问/opt/gnode/log/gbase/loader_logs/393233*: 没有那个文件或目录
--------- 172.16.128.12---------
-rw-rw---- 1 gbase gbase 459 12月 20 23:47 /opt/gnode/log/gbase/loader_logs/393233_test_tmp_lxj_1212_test1_n1_172.16.128.12_20161220234703.trc
-rw-rw---- 1 gbase gbase   8 12月 20 23:47 /opt/gnode/log/gbase/loader_logs/393233_test_tmp_lxj_1212_test1_n1_172.16.128.12_20161220234703.err
[root@Node2 ~]# cat 
/opt/gnode/log/gbase/loader_logs/393233_test_tmp_lxj_1212_test1_n1_172.16.128.12_20161220234703.trc
file_name    |   file_offset    |   record_len   |   column    |    reason
ftp://gbase:*****@172.16.128.11//home/gbase/1.txt|0|2|1|data column size less than defined size

原文链接:www.gbase.cn/community/p...

更多精彩内容尽在南大通用GBase技术社区,南大通用致力于成为用户最信赖的数据库产品供应商。

相关推荐
车载中间件通信18 分钟前
[TC8测试]TCP_FLAGS_PROCESSING_06
数据库·网络协议·tcp/ip·中间件·tc8
呆萌很20 分钟前
达梦数据库(DM)和MySQL核心区别
数据库
l1t24 分钟前
DeepSeek总结的pgrust以光速编程:构建 Gravity 查询引擎
数据库·人工智能·postgresql
木木_Q40577334930 分钟前
Oracle 增量同步配置指南:只搬变了的数据,不重复也不漏数
数据库·oracle·数据同步·数据库同步·增量同步
升鲜宝供应链及收银系统源代码服务1 小时前
Java Spring Boot 商业版 升鲜宝供应链管理系统--商品模块表与字段分析(商品管理页面业务逻辑与数据表关系分析)
数据库·生鲜配送系统排名·生鲜配送系统架构设计·b2b订货商城解决方案·生鲜配送系统源代码出售·生鲜配送系统设计源代码
灵晔君1 小时前
【MySQL】库的操作
数据库·mysql
2603_969694852 小时前
【MySQL学习笔记】DQL(基础查询/条件/聚合/分组/排序/分页)与 DCL(用户权限)全解析
数据库·笔记·学习·mysql·学习方法
Paper数据分析-经管学术2 小时前
1985-2025年地级市绿色发明专利被引量
数据库
念何架构之路2 小时前
Go 标准库 database/sql 详解
数据库·sql·golang
云边有个稻草人2 小时前
MongoDB迁移不止是数据搬家:用KingbaseES重构文档数据开发
数据库·mongodb·重构·国产数据库·信创数据库·数据库国产化·mongodb迁移