如何配置在docker中运行的JanusGraph映像



我遵循以下安装指南:https://docs.janusgraph.org/getting-started/installation/

我运行:

docker run -it -p 8182:8182 janusgraph/janusgraph

但是当我尝试连接gremlin控制台时,我有这个例外:

gremlin-driver-initializer] INFO org.apache.tinkerpop.gremlin.driver.ConnectionPool - Signalled closing of connection pool on Host{address=localhost/127.0.0.1:8182, hostUri=ws://localhost:8182/gremlin} with core size of 2
18:32:42.556 [gremlin-driver-initializer] ERROR org.apache.tinkerpop.gremlin.driver.Client - Could not initialize client for Host{address=localhost/127.0.0.1:8182, hostUri=ws://localhost:8182/gremlin}
18:32:42.560 [main] ERROR org.apache.tinkerpop.gremlin.driver.Client -
java.net.ConnectException: Connection refused: no further information*

我尝试使用docker桌面,发现我的容器在26秒后自动停止。我读过比docker容器自动停止时,没有运行在它上面。当我检查它的时候,有这样的消息:

/etc/opt/janusgraph/janusgraph-server.yaml will be used to start JanusGraph Server in foreground.

你能帮我配置一下吗?

当使用janusgraph服务器启动容器时,它应该继续处理日志消息,直到:

6028 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
6028 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.

然后继续在等待客户端连接的循环中运行。

当从本地gremlin控制台连接时,使用与janusgraph容器记录的TinkerPop版本相同的版本,连接应该按照以下步骤进行:

plugin activated: janusgraph.imports
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Configured localhost/127.0.0.1:8182
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182] - type ':remote console' to return to local mode
gremlin> g.V()
gremlin> g.addV()
==>v[4264]

谢谢你的帮助,HadoopMarc,但这不是不同控制台版本的问题,我试着调用:

docker inspect <container-id> 

和我发现:

"State": {
"Status": "exited",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": true,
"Dead": false,
"Pid": 0,
"ExitCode": 137,
"Error": "",
"StartedAt": "2022-11-22T08:18:16.4661912Z",
"FinishedAt": "2022-11-22T08:19:21.7929991Z"
},

with "OOMKilled": true。我影响更多的RAM到我的docker容器(从1Go切换到20go和我的docker容器成功启动!:)

但是仍然没有日志…(

最新更新