2.0插入数据报错

你好,感谢你的反馈,storage应该是crash了,可以给下storage的日志吗?

storaged的error日志如下:


fatal日志如下:

你的schema是不是以前生成的,然后更新了nebula的images,你最好更新images的时候将之前的数据删除,因为这中间有些数据格式不兼容

我每次更新完nebula的镜像都是把之前的data和logs目录删掉后再启动新镜像的容器的。

你把你创建tag的ngql的贴出来,不要用图片

下面是完整的ngql

UPDATE CONFIGS storage:rocksdb_column_family_options = { disable_auto_compactions = true };

DROP SPACE IF EXISTS nba;

CREATE SPACE IF NOT EXISTS nba(partition_num=10, replica_factor=1, vid_type = fixed_string(50));

USE nba;

CREATE TAG IF NOT EXISTS process(pid int, pguid string, pname string DEFAULT "", path string DEFAULT "", uid int DEFAULT -1,
        uname string DEFAULT "", gid int DEFAULT -1, gname string DEFAULT "", md5 string DEFAULT "", cmd string DEFAULT "", 
        euid int DEFAULT -1, suid int DEFAULT -1, fsuid int DEFAULT -1, egid int DEFAULT -1, sgid int DEFAULT -1, fsgid int DEFAULT -1,
        euname string DEFAULT "", egname string DEFAULT "", session_guid string DEFAULT "", tty string DEFAULT "", fsize int DEFAULT -1,
        fmode string DEFAULT "", finode int DEFAULT -1, funame string DEFAULT "", fgname string DEFAULT "", fatime int DEFAULT -1, 
        fmtime int DEFAULT -1, fctime int DEFAULT -1, os string DEFAULT "", new_pid int DEFAULT -1, created_time int DEFAULT -1, exit_time int DEFAULT -1, 
        cmd_id string DEFAULT "", cmd_chinese_desc string DEFAULT "", cmd_level string DEFAULT "", cmd_score int DEFAULT -1, cmd_regex string DEFAULT "",
        completeness int DEFAULT -1, agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");

把graphd日志里面执行失败的插入语句发出来下,可以吗


这是graphd的ERROR日志,上面贴过

日志貌似不打印失败的query,你可以知道是那条插入导致服务crash的吗?

有插入失败的数据,一条语句200k,论坛这里不好贴出来,但是我尝试在console插入这条语句,是可以入库成功的

你的space只有你贴出来这个tag吗?还是有其他,有的话,可以把你这个space下面所有tag都贴出来吗?

下面是所有的tag:


image
image
image
image
image


image
image

下面是文本schema:

     UPDATE CONFIGS storage:rocksdb_column_family_options = { disable_auto_compactions = true };
      DROP SPACE IF EXISTS nba;
      CREATE SPACE IF NOT EXISTS nba(partition_num=10, replica_factor=1, vid_type = fixed_string(50));
      USE nba;
      CREATE TAG IF NOT EXISTS process_complete(pid int, pguid string, pname string DEFAULT "", path string DEFAULT "", uid int DEFAULT -1,
        uname string DEFAULT "", gid int DEFAULT -1, gname string DEFAULT "", md5 string DEFAULT "", cmd string DEFAULT "", 
        euid int DEFAULT -1, suid int DEFAULT -1, fsuid int DEFAULT -1, egid int DEFAULT -1, sgid int DEFAULT -1, fsgid int DEFAULT -1,
        euname string DEFAULT "", egname string DEFAULT "", session_guid string DEFAULT "", tty string DEFAULT "", fsize int DEFAULT -1,
        fmode string DEFAULT "", finode int DEFAULT -1, funame string DEFAULT "", fgname string DEFAULT "", fatime int DEFAULT -1, 
        fmtime int DEFAULT -1, fctime int DEFAULT -1, os string DEFAULT "", new_pid int DEFAULT -1, created_time int DEFAULT -1, exit_time int DEFAULT -1, 
        cmd_id string DEFAULT "", cmd_chinese_desc string DEFAULT "", cmd_level string DEFAULT "", cmd_score int DEFAULT -1, cmd_regex string DEFAULT "",
        completeness int DEFAULT -1, agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS process_info_is();

      CREATE TAG IF NOT EXISTS process(pid int, pguid string, pname string DEFAULT "", path string DEFAULT "", uid int DEFAULT -1,
        uname string DEFAULT "", gid int DEFAULT -1, gname string DEFAULT "", md5 string DEFAULT "", cmd string DEFAULT "", 
        euid int DEFAULT -1, suid int DEFAULT -1, fsuid int DEFAULT -1, egid int DEFAULT -1, sgid int DEFAULT -1, fsgid int DEFAULT -1,
        euname string DEFAULT "", egname string DEFAULT "", session_guid string DEFAULT "", tty string DEFAULT "", fsize int DEFAULT -1,
        fmode string DEFAULT "", finode int DEFAULT -1, funame string DEFAULT "", fgname string DEFAULT "", fatime int DEFAULT -1, 
        fmtime int DEFAULT -1, fctime int DEFAULT -1, os string DEFAULT "", new_pid int DEFAULT -1, created_time int DEFAULT -1, exit_time int DEFAULT -1, 
        cmd_id string DEFAULT "", cmd_chinese_desc string DEFAULT "", cmd_level string DEFAULT "", cmd_score int DEFAULT -1, cmd_regex string DEFAULT "",
        completeness int DEFAULT -1, agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS process_create(ppguid string DEFAULT "", pguid string DEFAULT "", datatime int DEFAULT -1, event_src string DEFAULT "",
        agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1, completeness int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS process_access(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "",
       host_name string DEFAULT "", merge_count int DEFAULT -1);


      CREATE TAG IF NOT EXISTS session(session_guid string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS session_own(agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);


      CREATE TAG IF NOT EXISTS net_address(ip string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS net_connect(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "",
       host_name string DEFAULT "", merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS net_bind(agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);


      CREATE TAG IF NOT EXISTS host(agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS login(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", src_ip string DEFAULT "", session_guid string DEFAULT "",
       agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS logout(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", src_ip string DEFAULT "", session_guid string DEFAULT "", 
       agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);


      CREATE TAG IF NOT EXISTS file(fpath string DEFAULT "", type string DEFAULT "", fsize int DEFAULT -1, fmode string DEFAULT "", fdev string DEFAULT "", finode int DEFAULT -1,
                                    funame string DEFAULT "", fgname string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS file_read(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_write(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_create(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_delete(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS special_file_create(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS named_pipe_create(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS mount(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS umount(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_owner_change(datatime int DEFAULT -1, event_src string DEFAULT "", old_funame string DEFAULT "", old_fgname string DEFAULT "", agent_ip string DEFAULT "",
       agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_permission_change(datatime int DEFAULT -1, event_src string DEFAULT "", old_fmode string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_rename(datatime int DEFAULT -1, event_src string DEFAULT "", old_fpath string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_renamed_by(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_symbol_link_create(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_hard_link_create(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_symbol_link(datatime int DEFAULT -1, event_src string DEFAULT "", old_fpath string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS file_hard_link(datatime int DEFAULT -1, event_src string DEFAULT "", old_fpath string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS pipe_create(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);

      
      CREATE TAG IF NOT EXISTS account(account_name string DEFAULT "", account_type int DEFAULT -1, agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS user_add(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS user_delete(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS group_add(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS group_delete(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS user_chauthtok(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS group_chauthtok(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS user_mgmt(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS group_mgmt(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS acct_lock(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS acct_unlock(datatime int DEFAULT -1, event_src string DEFAULT "", status string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "",
       merge_count int DEFAULT -1);


      CREATE TAG IF NOT EXISTS module(module_name string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS kernel_module_load(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS kernel_module_unload(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);


      CREATE TAG IF NOT EXISTS service(service_name string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "");
      CREATE EDGE IF NOT EXISTS service_start(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);
      CREATE EDGE IF NOT EXISTS service_stop(datatime int DEFAULT -1, event_src string DEFAULT "", agent_ip string DEFAULT "", agent_id string DEFAULT "", host_name string DEFAULT "", merge_count int DEFAULT -1);

你好,这个问题可以解决吗

mark

待我复现下,你这么有很多个tag,我需要知道那个引起的

复现所需的数据已经通过你们同事转给你了,请帮忙复现。

好的,已收到同事发的文件。

你好,我用你发过来的没有复现问题,插入是成功的。请问你是不是会同时插入多种tag的点,你发给我的就对 process 这个tag做批量插入,这个是没有问题。是不是多种tag批量插入触发的呢?

对,我上边发的那些tag对应的数据会并发持续入库。nebula使用docker部署,使用nebula-go的客户端与nebula server建立8个连接。通过这8个连接,多个tag的数据并发入库。