Star

集群模式,部分数据插入失败

  • nebula 版本:v2.0.0-rc1
  • 部署方式(分布式 / 单机 / Docker / DBaaS): 分布式 (用三台虚拟机搭建集群demo)
  • 硬件信息
    • 磁盘( 必须为 SSD ,不支持 HDD) ssd
    • CPU、内存信息: 2+4

```


```
其实我自个猜测是不是 使用虚拟机不满足配置要求,导致上面的问题

你可以再执行下SHOW HOSTS截图吗?
还有DESC SPACE cuba截图。

所有机器都不在线了。

(root@nebula) [(none)]> show hosts
+---------+------+--------+--------------+---------------------+------------------------+
| Host    | Port | Status | Leader count | Leader distribution | Partition distribution |
+---------+------+--------+--------------+---------------------+------------------------+
| "Total" |      |        | 0            |                     |                        |
+---------+------+--------+--------------+---------------------+------------------------+
Got 1 rows (time spent 4649/11388 us)

Mon, 18 Jan 2021 10:02:00 CST

(root@nebula) [(none)]> describe space cuba
+----+--------+------------------+----------------+---------+------------+-------------------+
| ID | Name   | Partition Number | Replica Factor | Charset | Collate    | Vid Type          |
+----+--------+------------------+----------------+---------+------------+-------------------+
| 6  | "cuba" | 10               | 1              | "utf8"  | "utf8_bin" | "FIXED_STRING(8)" |
+----+--------+------------------+----------------+---------+------------+-------------------+
Got 1 rows (time spent 6371/7054 us)

常见问题中有不支持域名

我使用hostname会不会有影响

RC1: 保持全局的ip一致。storaged地址识别的时候只是一个简单的字符串匹配。

1赞

恢复成ip后就是下面的显示了

(root@nebula) [(none)]> show hosts
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| Host                         | Port  | Status   | Leader count | Leader distribution  | Partition distribution |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "10.60.214.162"              | 45500 | "ONLINE" | 0            | "No valid partition" | "No valid partition"   |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "10.60.214.163"              | 45500 | "ONLINE" | 0            | "No valid partition" | "No valid partition"   |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "nebula-cluster-2.novalocal" | 45500 | "ONLINE" | 0            | "No valid partition" | "cuba:4, nba:4"        |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "nebula-cluster-3.novalocal" | 45500 | "ONLINE" | 0            | "No valid partition" | "cuba:3, nba:3"        |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "Total"                      |       |          | 0            |                      | "cuba:7, nba:7"        |
+------------------------------+-------+----------+--------------+----------------------+------------------------+


这样域名还是不太对吧。

把clusterid文件干掉,目录干掉,重新建库吧。

2.0是支持域名的,但是你原来导入数据的space用的是域名的storage的话,你改成ip之后,原来的数据就读不了。

1赞

理解!

重装了还是有下面的问题

(root@nebula) [cba]> DESC SPACE cuba
+----+--------+------------------+----------------+---------+------------+-------------------+
| ID | Name   | Partition Number | Replica Factor | Charset | Collate    | Vid Type          |
+----+--------+------------------+----------------+---------+------------+-------------------+
| 1  | "cuba" | 10               | 1              | "utf8"  | "utf8_bin" | "FIXED_STRING(8)" |
+----+--------+------------------+----------------+---------+------------+-------------------+
Got 1 rows (time spent 1120/1698 us)

Mon, 18 Jan 2021 16:21:40 CST

(root@nebula) [cba]> DESC SPACE cba
+----+-------+------------------+----------------+---------+------------+-------------------+
| ID | Name  | Partition Number | Replica Factor | Charset | Collate    | Vid Type          |
+----+-------+------------------+----------------+---------+------------+-------------------+
| 6  | "cba" | 10               | 1              | "utf8"  | "utf8_bin" | "FIXED_STRING(8)" |
+----+-------+------------------+----------------+---------+------------+-------------------+
Got 1 rows (time spent 978/1599 us)

Mon, 18 Jan 2021 16:21:45 CST

(root@nebula) [cba]> show hosts
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| Host                         | Port  | Status   | Leader count | Leader distribution  | Partition distribution |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "nebula-cluster-1.novalocal" | 45500 | "ONLINE" | 3            | "cuba:3"             | "cba:3, cuba:3"        |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "nebula-cluster-2.novalocal" | 45500 | "ONLINE" | 8            | "cba:4, cuba:4"      | "cba:4, cuba:4"        |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "nebula-cluster-3.novalocal" | 45500 | "ONLINE" | 0            | "No valid partition" | "cba:3, cuba:3"        |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
| "Total"                      |       |          | 11           | "cba:4, cuba:7"      | "cba:10, cuba:10"      |
+------------------------------+-------+----------+--------------+----------------------+------------------------+
Got 4 rows (time spent 3523/4311 us)

Mon, 18 Jan 2021 16:22:04 CST

(root@nebula) [cba]> INSERT VERTEX player(name, age) VALUES "00000202":("Useless", 60);
[ERROR (-8)]: Storage Error: part: 9, error code: -3.

报错报错日志


E0118 16:23:32.207633  4391 GeneratedCodeHelper.cpp:73] Method name listFTClients not found in function process
E0118 16:23:33.215320  4041 MetaClient.cpp:581] Send request to [nebula-cluster-1.novalocal:45500], exceed retry limit
E0118 16:23:33.215554  5317 MetaClient.cpp:460] List fulltext services failed, status:RPC failure in MetaClient: N6apache6thrift21TApplicationExceptionE: Method name listFTClients not found
E0118 16:23:33.215596  5317 MetaClient.cpp:177] Load fulltext services Failed
E0118 16:23:33.215838  3805 GeneratedCodeHelper.cpp:73] Method name listConfigs not found in function process
E0118 16:23:42.258616  4865 GeneratedCodeHelper.cpp:73] Method name listTags not found in function process
E0118 16:23:44.268810  5241 GeneratedCodeHelper.cpp:73] Method name listEdges not found in function process
E0118 16:23:46.274395  5241 MetaClient.cpp:581] Send request to [nebula-cluster-2.novalocal:45500], exceed retry limit
E0118 16:23:46.274634  5317 MetaClient.cpp:292] Get edge schemas failed for spaceId 1, RPC failure in MetaClient: N6apache6thrift21TApplicationExceptionE: Method name listEdges not found
E0118 16:23:46.274722  5317 MetaClient.cpp:224] Load Schemas Failed
E0118 16:23:52.298605  5292 MetaClient.cpp:581] Send request to [nebula-cluster-1.novalocal:45500], exceed retry limit
E0118 16:23:52.298800  5317 MetaClient.cpp:121] Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift21TApplicationExceptionE: Method name heartBeat not found
E0118 16:23:58.313316  5317 MetaClient.cpp:121] Heartbeat failed, status:LeaderChanged: Leader changed!
E0118 16:24:02.333137  4391 GeneratedCodeHelper.cpp:73] Method name listFTClients not found in function process
E0118 16:24:02.723105  4773 GeneratedCodeHelper.cpp:73] Method name heartBeat not found in function process
E0118 16:24:03.334779  4391 GeneratedCodeHelper.cpp:73] Method name listFTClients not found in function process
E0118 16:24:03.726320  4773 GeneratedCodeHelper.cpp:73] Method name heartBeat not found in function process
E0118 16:24:05.345587  4041 MetaClient.cpp:581] Send request to [nebula-cluster-1.novalocal:45500], exceed retry limit
E0118 16:24:05.345865  5317 MetaClient.cpp:460] List fulltext services failed, status:RPC failure in MetaClient: N6apache6thrift21TApplicationExceptionE: Method name listFTClients not found
E0118 16:24:05.345914  5317 MetaClient.cpp:177] Load fulltext services Failed
E0118 16:24:05.346246  3805 GeneratedCodeHelper.cpp:73] Method name listConfigs not found in function process

你把storage,meta的配置文件都贴下

因为是用的虚拟机,所以硬盘和网络都满足官方配置
hdd + 千兆网络,我前面用docker-compase 在单机上成功部署集群

graph.conf

########## basics ##########
# Whether to run as a daemon process
--daemonize=true
# The file to host the process id
--pid_file=pids/nebula-graphd.pid
# Whether to enable optimizer
--enable_optimizer=false

########## logging ##########
# The directory to host logging files, which must already exists
--log_dir=logs
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively
--minloglevel=0
# Verbose log level, 1, 2, 3, 4, the higher of the level, the more verbose of the logging
--v=0
# Maximum seconds to buffer the log messages
--logbufsecs=0
# Whether to redirect stdout and stderr to separate output files
--redirect_stdout=true
# Destination filename of stdout and stderr, which will also reside in log_dir.
--stdout_log_file=graphd-stdout.log
--stderr_log_file=graphd-stderr.log
# Copy log messages at or above this level to stderr in addition to logfiles. The numbers of severity levels INFO, WARNING, ERROR, and FATAL are 0, 1, 2, and 3, respectively.
--stderrthreshold=2

########## networking ##########
# Comma separated Meta Server Addresses
--meta_server_addrs=nebula-cluster-1.novalocal:45500,nebula-cluster-2.novalocal:45500,nebula-cluster-3.novalocal:45500
# Local IP used to identify the nebula-graphd process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=nebula-cluster-1.novalocal
# Network device to listen on
--listen_netdev=any
# Port to listen on
--port=9669
# To turn on SO_REUSEPORT or not
--reuse_port=false
# Backlog of the listen socket, adjust this together with net.core.somaxconn
--listen_backlog=1024
# Seconds before the idle connections are closed, 0 for never closed
--client_idle_timeout_secs=0
# Seconds before the idle sessions are expired, 0 for no expiration
--session_idle_timeout_secs=0
# The number of threads to accept incoming connections
--num_accept_threads=1
# The number of networking IO threads, 0 for # of CPU cores
--num_netio_threads=0
# The number of threads to execute user queries, 0 for # of CPU cores
--num_worker_threads=0
# HTTP service ip
--ws_ip=0.0.0.0
# HTTP service port
--ws_http_port=19669
# HTTP2 service port
--ws_h2_port=19670

# The default charset when a space is created
--default_charset=utf8
# The defaule collate when a space is created
--default_collate=utf8_bin

########## authorization ##########
# Enable authorization
--enable_authorize=false

########## Authentication ##########
# User login authentication type, password for nebula authentication, ldap for ldap authentication, cloud for cloud authentication
--auth_type=password

meta.conf

########## basics ##########
# Whether to run as a daemon process
--daemonize=true
# The file to host the process id
--pid_file=pids/nebula-metad.pid

########## logging ##########
# The directory to host logging files, which must already exists
--log_dir=logs
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively
--minloglevel=0
# Verbose log level, 1, 2, 3, 4, the higher of the level, the more verbose of the logging
--v=0
# Maximum seconds to buffer the log messages
--logbufsecs=0

########## networking ##########
# Comma separated Meta Server addresses
--meta_server_addrs=nebula-cluster-1.novalocal:45500,nebula-cluster-2.novalocal:45500,nebula-cluster-3.novalocal:45500
# Local IP used to identify the nebula-metad process.
# Change it to an address other than loopback if the service is distributed or
# will be accessed remotely.
--local_ip=nebula-cluster-1.novalocal
# Meta daemon listening port
--port=45500
# HTTP service ip
--ws_ip=0.0.0.0
# HTTP service port
--ws_http_port=19559
# HTTP2 service port
--ws_h2_port=19560

########## storage ##########
# Root data path, here should be only single path for metad
--data_path=data/meta

########## Misc #########
# The default number of parts when a space is created
--default_parts_num=100
# The default replica factor when a space is created
--default_replica_factor=1

--heartbeat_interval_secs=10

同一条数据有时候能插入成功,有时插入不成功

(root@nebula) [cba]> INSERT VERTEX player(name, age) VALUES "00000100":("Tim Duncan", 42);
[ERROR (-8)]: Storage Error: part: 1, error code: -3.

Mon, 18 Jan 2021 16:32:17 CST

(root@nebula) [cba]> INSERT VERTEX player(name, age) VALUES "00000100":("Tim Duncan", 42);
Execution succeeded (time spent 1386/1932 us)

Mon, 18 Jan 2021 16:32:19 CST

[root@nebula-cluster-2 logs]# more nebula-metad.nebula-cluster-2.novalocal.root.log.ERROR.20210118-153517.16458
Log file created at: 2021/01/18 15:35:17
Running on machine: nebula-cluster-2.novalocal
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0118 15:35:17.679464 16458 FileUtils.cpp:384] Failed to read the directory "data/meta/nebula" (2): No such file or directory
E0118 15:35:19.054306 16667 RaftPart.cpp:367] [Port: 45501, Space: 0, Part: 0] The partition is not a leader
E0118 15:35:19.054358 16667 RaftPart.cpp:687] [Port: 45501, Space: 0, Part: 0] Cannot append logs, clean the buffer
E0118 15:40:11.492522 16672 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 15:40:11.514196 16673 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 15:40:11.572741 16673 GeneratedCodeHelper.cpp:73] Method name addEdges not found in function process
E0118 15:40:11.601758 16674 GeneratedCodeHelper.cpp:73] Method name addEdges not found in function process
E0118 15:40:11.609540 16672 GeneratedCodeHelper.cpp:73] Method name addEdges not found in function process
E0118 15:40:34.532781 16674 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 15:50:20.162053 16667 RaftPart.cpp:367] [Port: 45501, Space: 0, Part: 0] The partition is not a leader
E0118 15:50:20.162103 16667 RaftPart.cpp:687] [Port: 45501, Space: 0, Part: 0] Cannot append logs, clean the buffer
E0118 16:00:08.222383 16672 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:04:42.689607 16667 RaftPart.cpp:367] [Port: 45501, Space: 0, Part: 0] The partition is not a leader
E0118 16:04:42.690738 16667 RaftPart.cpp:687] [Port: 45501, Space: 0, Part: 0] Cannot append logs, clean the buffer
E0118 16:14:59.317504 16672 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:15:02.492440 16673 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:17:02.184111 16673 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:17:02.198516 16672 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:17:30.537340 16673 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:17:30.558364 16672 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:21:28.537413 16667 RaftPart.cpp:367] [Port: 45501, Space: 0, Part: 0] The partition is not a leader
E0118 16:21:28.537469 16667 RaftPart.cpp:687] [Port: 45501, Space: 0, Part: 0] Cannot append logs, clean the buffer
E0118 16:26:34.345364 16674 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:32:17.854692 16674 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:32:26.874691 16672 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:32:27.748353 16673 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:32:28.382282 16674 GeneratedCodeHelper.cpp:73] Method name addVertices not found in function process
E0118 16:33:43.061106 16667 RaftPart.cpp:367] [Port: 45501, Space: 0, Part: 0] The partition is not a leader
E0118 16:33:43.065008 16667 RaftPart.cpp:687] [Port: 45501, Space: 0, Part: 0] Cannot append logs, clean the buffer

贴下nebula-cluster-2 meta的配置,还有stoarge的配置,看着是你端口号配错了

端口确实有问题,我修改后再自己看看

浙ICP备20010487号