问题描述
尝试使用curl执行查询。输出未显示在终端上。 使用的参考:https://docs.janusgraph.org/basics/server/
服务器上使用的命令:
curl -v -POST -H 'Content-type: application/json' http://localhost:8182 -d '{"gremlin": "g.V().count()"}'
输出:
* Rebuilt URL to: http://localhost:8182/
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8182 (#0)
> POST / HTTP/1.1
> Host: localhost:8182
> User-Agent: curl/7.47.0
> Accept: */*
> Content-type: application/json
> Content-Length: 57
>
* upload completely sent off: 57 out of 57 bytes
它卡在这里,因此我将其终止。 我希望计数显示在屏幕上或指定的文件中。
解决方法
curl --location --request POST 'localhost:8182' --header 'Content-Type: application/json' --data-raw '{"gremlin":"g.V().count()"}'
为我工作。 我认为您可以检查janusgraph的日志。查看janusgraph服务器是否已收到您的请求。