graph-databases - 一键安装 - Dgraph - Gru

标签 graph-databases dgraph

我安装了 dgraph gru 用于面试

go get github.com/dgraph-io/gru
cd $GOPATH/src/github.com/dgraph-io/gru
git checkout develop
go build . && ./gru -user=admin -pass=pass -secret=0a45e5eGseF41o0719PJ39KljMK4F4v2
docker run -it -p 127.0.0.1:8088:8080 -p 127.0.0.1:9080:9080 -v ~/dgraph:/dgraph --name dgraph dgraph/dgraph:v0.7.5 dgraph --bindall=true

当我尝试创建测验或问题时遇到错误

Aug 09 10:14:23  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.001305978s
Aug 09 10:14:24  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.000762875s
Aug 09 10:19:40  gru[16999]: Error while rejecting candidates: Couldn't get response from Dgraph: Post http://localhost:8088/query: dial tcp 127.0.0.1:8088: i/o timeout[negroni] Started POST /api/admin/add-question
Aug 09 10:20:10  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.001419475s
Aug 09 10:20:17  gru[16999]: [negroni] Started POST /api/admin/get-all-questions
Aug 09 10:20:31  gru[16999]: [negroni] Started GET /api/admin/get-all-tags
Aug 09 10:20:43  gru[16999]: [negroni] Started GET /api/admin/get-all-tags
Aug 09 10:20:47  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.000821271s
Aug 09 10:21:01  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.000790588s
Aug 09 10:21:13  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.000748794s
Aug 09 11:12:24  gru[16999]: Error while rejecting candidates: Couldn't get response from Dgraph: Post http://localhost:8088/query: dial tcp 127.0.0.1:8088: i/o timeoutError while rejecting candidates: Couldn't get response from Dgraph: Post http://localhost:8088/query: dial tcp 127.0.0.1:8088: i/o timeoutError while rejecting candidates: Couldn't get response from Dgraph: Post http://localhost:8088/query: dial tcp 127.0.0.1:8088: i/o timeoutError while rejecting candidates: Couldn't get response from Dgraph: Post http://localhost:8088/query: dial tcp 127.0.0.1:8088: i/o timeoutError while rejecting candidates: Couldn't get response from Dgraph: Post http://localhost:8088/query: dial tcp 127.0.0.1:8088: i/o timeout[negroni] Started POST /api/admin/get-all-questions
Aug 09 11:12:54  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.000807257s
Aug 09 11:13:10  gru[16999]: [negroni] Started GET /api/admin/get-all-tags
Aug 09 11:13:41  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.000734698s
Aug 09 11:16:56  gru[16999]: Error while rejecting candidates: Couldn't get response from Dgraph: Post http://localhost:8088/query: dial tcp 127.0.0.1:8088: i/o timeout[negroni] Started POST /api/admin/add-question
Aug 09 11:17:26  gru[16999]: [negroni] Completed 500 Internal Server Error in 30.000777429s

我尝试了不同版本的 dgraph 数据库。

是否有任何脚本或 docker 可以即时安装它。

最佳答案

从日志中我可以看到它无法连接到 Dgraph。那是因为 docker 公开端口 8088 而 Gru 服务器期望 Dgraph 在 8080 上运行。你可以像这样运行 Dgraph

docker run -it -p 127.0.0.1:8080:8080  -v ~/dgraph:/dgraph dgraph/dgraph:v0.7.5 dgraph --bindall=true

您还必须运行 Gru 服务器和 caddy,如 README 中所述。现在我想到了,UI 不需要与 Gru Web 服务器分开运行。我可以尝试在周末添加一步快速安装指南。

关于graph-databases - 一键安装 - Dgraph - Gru,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45582657/

相关文章:

java - Neo4j:节点和关系对象中的属性

java - 如何部署非托管插件并从 Maven 重新启动 Neo4j 服务器?

neo4j - 在neo4j中创建两个节点之间的多重关系

java - DGraph:检索链接数据时出现 JSON 语法异常

graph-databases - 如何添加列表作为顶点或边 gremlin 的属性

algorithm - 存储同义词的数据结构

go - 如何使用 dgo api.NQuad 删除 dgraph 中的四边形

go - RPC 错误 : code = Unavailable desc = connection closed in Go code

node.js - 无法使用 dgraph-orm 查询嵌套关系

graphql - GraphQL 是否有效 GraphQL+?