apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.62k stars 518 forks source link

hugegraph配置完,studio ui可以查询,但hugegraph本身的gremlin-console无法查询 #507

Closed WilliamShen2019 closed 2 years ago

WilliamShen2019 commented 5 years ago

利用loader成功导入数据,且hugegraph-studio成功查询结果,依据文档修改配置后,用hugegraph集成的gremlin-console查询,未成功

以下是我的配置: gremlin-driver-settings.yaml hosts:[0.0.0.0] port:8190

rest-server.properties restserverurl=http://0.0.0.0:8096

gremlinserverurl=http://0.0.0.0:8190

graphs=[peopleAndSoft:conf/peopleAndSoft.properties]

gremlin-server.yaml graphs:{peopleAndSoft:conf/peopleAndSoft.properties}

remote.yaml hosts:[0.0.0.0] port:8190

remote-objects.yaml hosts:[0.0.0.0] port:8190

以上配置后,studio可以正常查询;

依据官方文档改了配置文件: gremlin-server.yaml: channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer

rest-server.properties restserverurl=http://0.0.0.0:8096 gremlinserverurl=http://0.0.0.0:8190 graphs=[peopleAndSoft:conf/peopleAndSoft.properties]

使用gremlin-console也可以通过remote.yaml连接到库中,返回如下日志 gremlin> :remote connect tinkerpop.server conf/remote.yaml 2018-01-15 15:30:31 11538 [main] [INFO ] org.apache.tinkerpop.gremlin.driver.ConnectionPool [] - Opening connection pool on Host{address=0.0.0.0/0.0.0.0:8190, hostUri=ws://0.0.0.0:8190/gremlin} with core size of 2 ==>Configured 0.0.0.0/0.0.0.0:8190 对比官方文档里发现少了如下两行: 2018-01-15 15:30:31 11528 [main] [INFO ] org.apache.tinkerpop.gremlin.driver.Connection [] - Created new connection for ws://localhost:8182/gremlin 2018-01-15 15:30:31 11538 [main] [INFO ] org.apache.tinkerpop.gremlin.driver.Connection [] - Created new connection for ws://localhost:8182/gremlin

无法使用库里的图名(peopleAndSoft)操作: gremlin> peopleAndSoft No such property: peopleAndSoft for class: groovysh_evaluate

zhoney commented 5 years ago

@WilliamShen2019 使用remote连接方式,执行命令时,需要加:>,例如:

gremlin> :remote connect tinkerpop.server conf/remote.yaml
gremlin> :> peopleAndSoft
gremlin> :> peopleAndSoft.traversal()
WilliamShen2019 commented 5 years ago

@zhoney 这个我试过了,不行的,报错如下: gremlin> :> peopleAndSoft1 org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException:Host did not respond in a timely fashion - check the server status again 我觉得是我的某一步骤的ip和port配的不对, 我的配置 remote.yaml hosts:[0.0.0.0] //这里我也尝试改成我本机的IP,也不行 port:8190

remote-objects.yaml hosts:[0.0.0.0] //这里我也尝试改成我本机的IP,也不行 port:8190

还有哪里可能出问题,我怎么确定当hugegraph-server启动后gremlin-server也启动了呢

zhoney commented 5 years ago

@WilliamShen2019 现在gremlin-server.yaml默认配置gremlin-server在localhost:8182,你是否配置了?

如果没配置,在rest-server.properties中配置gremlinserver.url为你的实际地址,然后在gremlin-server.yaml中配置hostport

可以参考配置说明

WilliamShen2019 commented 5 years ago

@zhoney 按您说的配置了,之后HugeGraphServer都起不来了,报超时错误: Connecting to HugeGraphServer (http://0.0.0.0:8096/graphs) .....................The operation timed out when attempting to connect to http://0.0.0.0:8096/graphs

host我又尝试了我本机ip,也是这个超时错误: Connecting to HugeGraphServer (http://10.2.164.224:8096/graphs) .....................The operation timed out when attempting to connect to http://10.2.164.224:8096/graphs

什么时候要配置0.0.0.0,什么时候又要配置为我本机的ip10.2.164.224呢

另外remote-objects.yaml,remote.yaml这俩文件的hosts和ip是不是也要配置为gremlin-server.yaml中的host和port,我现在就是这么配置的,如果不是,要配置为什么样

zhoney commented 5 years ago

@WilliamShen2019 服务启动不起来,看下日志中有什么错误,日志文件为:logs/hugegraph-server.log,同时把你目前的conf/rest-server.propertiesconf/gremlin-server.yaml配置贴一下

一般正常使用都是用本机ip,0.0.0.0多用于做负载均衡或者HA的时候。

github-actions[bot] commented 2 years ago

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label