gpt4 book ai didi

docker - 区 block 链REST端点不可访问

转载 作者:行者123 更新时间:2023-12-02 19:35:31 31 4
gpt4 key购买 nike

我有一个docker-compose文件here。我可以连接到7051并注册我的chaincode客户端,但是当我尝试连接到localhost:7050时,我得到一个错误,该错误在使用curl测试时如下所示:

curl -v localhost:7050
* STATE: INIT => CONNECT handle 0x80059aa8; line 1410 (connection #-5000)
* Rebuilt URL to: localhost:7050/
* Added connection 0. The cache now contains 1 members
* STATE: CONNECT => WAITRESOLVE handle 0x80059aa8; line 1446 (connection #0)
* Trying 127.0.0.1...
* TCP_NODELAY set
* STATE: WAITRESOLVE => WAITCONNECT handle 0x80059aa8; line 1527 (connection #0)
* Connected to localhost (127.0.0.1) port 7050 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x80059aa8; line 1579 (connection #0)

* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x80059aa8; line 1597 (connection #0)
> GET / HTTP/1.1
> Host: localhost:7050
> User-Agent: curl/7.54.1
> Accept: */*
>
* STATE: DO => DO_DONE handle 0x80059aa8; line 1676 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x80059aa8; line 1801 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x80059aa8; line 1811 (connection #0)
* Recv failure: Software caused connection abort
* Marked for [closure]: Transfer returned error
* multi_done
* stopped the pause stream!
* Closing connection 0
* The cache now contains 0 members
* Expire cleared
curl: (56) Recv failure: Software caused connection abort

我已为docker撰写文件中的所有端口启用了docker toolbox vm的端口转发功能:7050、7051、7053。

我使用docker工具箱从Windows运行docker。

我的 docker 设置如下:
  • Docker版本1.12.2,内部版本bb80604
  • docker-compose版本1.8.1,
    建立004ddae

  • 有人可以帮我解决Hyperledger REST API问题吗?

    TIA

    最佳答案

    Hypeledger Fabric 1.0.0版没有REST API,通信使用gRPC完成。要与Hyperledger Fabric交互,您需要利用提供的SDK之一(当前可用):

  • Java SDK
  • Node SDK
  • Go SDK
  • Python SDK

  • 为了测试基本功能,您可能还考虑使用 peer cli工具,该工具为您提供支持对等体进行认可以创建新 channel ,将对等体加入该 channel ,安装/实例化链码以及当然调用和查询链码的功能。您可以在 documentation中找到更多信息。

    关于docker - 区 block 链REST端点不可访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45693743/

    31 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com