【问题标题】:Curl output not displayed for gremlin querygremlin 查询不显示卷曲输出
【发布时间】:2020-10-07 08:40:20
【问题描述】:

尝试使用 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

它卡在这里,因此我终止它。 我希望将计数显示在屏幕上或指定文件中。

【问题讨论】:

  • 是否为 HTTP 请求配置了 Janus 服务器? docs.janusgraph.org/basics/server/… 如果只为 websockets 配置可能是问题...
  • 是的,它同时配置为 Web Socket 和 Http

标签: curl gremlin janusgraph gremlin-server


【解决方案1】:

curl --location --request POST 'localhost:8182' --header 'Content-Type: application/json' --data-raw '{"gremlin":"g.V().count()"}'

为我工作。 我想你可以查看janusgraph的日志。查看 janusgraph 服务器是否收到了您的请求。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-27
    • 2020-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-05
    相关资源
    最近更新 更多