apache / apache/hugegraph

hugegraph1.5部署集群模式 hugegraph-server 初始化报错

Open
#2,974 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

### Bug Type (问题类型)

other exception / error (其他异常报错)

### Before submit

- [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

### Environment (环境信息)

- Server Version: 1.5.0 (Apache Release Version)
- Backend: RocksDB 3nodes, 1T SSD
- OS: 4 CPUs, 32 G RAM, 中兴操作系统cgsl6.0 (内核5.10.134-14)

### Expected & Actual behavior (期望与实际表现)

# pd 已经能正常启动
``` bash
curl -s http://hdp1:8620/actuator/health | jq .status
"UP"
curl -s http://hdp1:8620/actuator/health | jq .status
"UP"
curl -s http://hdp1:8620/actuator/health | jq .status
"UP"
```

# store 已经能正常启动
``` bash
curl -s -H 'Authorization: Basic c3RvcmU6c3RvcmU=' http://hdp1:8620/v1/stores |jq .message
"OK"
curl -s -H 'Authorization: Basic c3RvcmU6c3RvcmU=' http://hdp2:8620/v1/stores |jq .message
"OK"
curl -s -H 'Authorization: Basic c3RvcmU6c3RvcmU=' http://hdp3:8620/v1/stores |jq .message
"OK"
```

# hugegraph-server 的 hugegraph.properties 配置内容
``` bash
gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
vertex.cache_type=l2
edge.cache_type=l2
#vertex.default_label=vertex
backend=hstore
serializer=binary
store=hugegraph
# pd config
pd.peers=hdp1:8686,hdp2:8686,hdp3:8686

# task config
task.scheduler_type=distributed
task.schedule_period=10
task.retry=0
task.wait_timeout=10

# search config
search.text_analyzer=jieba
search.text_analyzer_mode=INDEX

# rocksdb backend config
rocksdb.data_path=./rocksdb
rocksdb.wal_path=./rocksdb/wal
```

# hugegraph-server 的 gremlin-server.yaml 配置文件 只修改和增加的如下内容
``` bash
### 这是修改的
host: hdp1
port: 8182
### 在文件末尾增加这些内容
authentication: {
authenticator: org.apache.hugegraph.auth.StandardAuthenticator,
authenticationHandler: org.apache.hugegraph.auth.WsAndHttpBasicAuthHandler,
config: {tokens: conf/rest-server.properties}
}
```

# hugegraph-server 的 rest-server.properties 配置文件
``` bash
restserver.url=http://hdp1:8080
gremlinserver.url=http://hdp1:8182

graphs=./conf/graphs
batch.max_write_ratio=80
batch.max_write_threads=0

# configuration of arthas
arthas.telnet_port=8562
arthas.http_port=8561
arthas.ip=127.0.0.1
arthas.disabled_commands=jad
auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator

rpc.server_host=hdp1
rpc.server_port=8091
server.id=server-1
server.role=master
log.slow_query_threshold=1000
memory_monitor.threshold=0.85
memory_monitor.period=2000
usePD=true
```

# 在第一台节点上执行初始化报错了

``` bash
hugegraph-server/bin/init-store.sh

Initializing HugeGraph Store...
main dict load finished, time elapsed 2827 ms
model load finished, time elapsed 71 ms.
Exception in thread "main" java.lang.IllegalArgumentException: Undefined vertex label: '~user'
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:167)
at org.apache.hugegraph.util.E.checkArgument(E.java:52)
at org.apache.hugegraph.StandardHugeGraph.vertexLabel(StandardHugeGraph.java:857)
at org.apache.hugegraph.auth.HugeGraphAuthProxy.lambda$vertexLabel$2(HugeGraphAuthProxy.java:272)
at org.apache.hugegraph.auth.HugeGraphAuthProxy.lambda$verifySchemaPermission$24(HugeGraphAuthProxy.java:945)
at org.apache.hugegraph.auth.HugeGraphAuthProxy.verifyResPermission(HugeGraphAuthProxy.java:970)
at org.apache.hugegraph.auth.HugeGraphAuthProxy.verifyResPermission(HugeGraphAuthProxy.java:956)
at org.apache.hugegraph.auth.HugeGraphAuthProxy.verifySchemaPermission(HugeGraphAuthProxy.java:943)
at org.apache.hugegraph.auth.HugeGraphAuthProxy.verifySchemaPermission(HugeGraphAuthProxy.java:936)
at org.apache.hugegraph.auth.HugeGraphAuthProxy.vertexLabel(HugeGraphAuthProxy.java:271)
at org.apache.hugegraph.auth.EntityManager.queryEntity(EntityManager.java:152)
at org.apache.hugegraph.auth.EntityManager.query(EntityManager.java:134)
at org.apache.hugegraph.auth.StandardAuthManager.findUser(StandardAuthManager.java:183)
at org.apache.hugegraph.auth.StandardAuthenticator.requireInitAdminUser(StandardAuthenticator.java:83)
at org.apache.hugegraph.auth.StandardAuthenticator.initAdminUser(StandardAuthenticator.java:52)
at org.apache.hugegraph.auth.StandardAuthenticator.initAdminUserIfNeeded(StandardAuthenticator.java:223)
at org.apache.hugegraph.cmd.InitStore.main(InitStore.java:89)
Initialization finished.
```
### 部署这个集群共使用三台节点 hdp1 、hdp2 、hdp3
### 只初始化hdp1节点就出现如上问题,连提示输入密码都没有

### Vertex/Edge example (问题点 / 边数据举例)

```javascript

```

### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

```javascript

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.