无法从本地主机连接到 ipfs 集群
我在Docker中有IPFS群集 即,我已经安装了以下组件:
ipfs init
ipfs-cluster-service init --consensus raft
ipfs daemon
ipfs-cluster-service
Docker文件:
ipfs-cluster-1:
image: 'ipfs-cluster'
container_name: ipfs-cluster-1
restart: unless-stopped
ports:
- "4101:4001"
- "5101:5001"
- "8180:8080"
Docker(看起来还可以)的结果(看起来还不错)
curl -I http://localhost:8080/ipfs/QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH
HTTP/1.1 301 Moved Permanently
Accept-Ranges: bytes
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Headers: Range
Access-Control-Allow-Headers: User-Agent
Access-Control-Allow-Headers: X-Requested-With
Access-Control-Allow-Methods: GET
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Content-Range
Access-Control-Expose-Headers: X-Chunked-Output
Access-Control-Expose-Headers: X-Stream-Output
Cache-Control: public, max-age=29030400, immutable
Content-Length: 5
Content-Type: text/plain; charset=utf-8
Etag: "QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH"
Last-Modified: Thu, 01 Jan 1970 00:00:01 GMT
Location: http://bafybeihuvwfdxuyytwrk3ee64qiurvujhwggfhcbb57sy7r7vz22vxtzza.ipfs.localhost:8080/
X-Ipfs-Path: /ipfs/QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH
Date: Thu, 07 Apr 2022 16:09:13 GMT
的结果(不确定!!!)
curl -I http://localhost:8180/ipfs/QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH
curl: (52) Empty reply from server
您建议吗?
I have ipfs cluster in the docker
i.e. i have installed the following components:
ipfs init
ipfs-cluster-service init --consensus raft
ipfs daemon
ipfs-cluster-service
docker file:
ipfs-cluster-1:
image: 'ipfs-cluster'
container_name: ipfs-cluster-1
restart: unless-stopped
ports:
- "4101:4001"
- "5101:5001"
- "8180:8080"
results from docker (looks ok)
curl -I http://localhost:8080/ipfs/QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH
HTTP/1.1 301 Moved Permanently
Accept-Ranges: bytes
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Headers: Range
Access-Control-Allow-Headers: User-Agent
Access-Control-Allow-Headers: X-Requested-With
Access-Control-Allow-Methods: GET
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Content-Range
Access-Control-Expose-Headers: X-Chunked-Output
Access-Control-Expose-Headers: X-Stream-Output
Cache-Control: public, max-age=29030400, immutable
Content-Length: 5
Content-Type: text/plain; charset=utf-8
Etag: "QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH"
Last-Modified: Thu, 01 Jan 1970 00:00:01 GMT
Location: http://bafybeihuvwfdxuyytwrk3ee64qiurvujhwggfhcbb57sy7r7vz22vxtzza.ipfs.localhost:8080/
X-Ipfs-Path: /ipfs/QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH
Date: Thu, 07 Apr 2022 16:09:13 GMT
results from my local (NOT OK!!!)
curl -I http://localhost:8180/ipfs/QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH
curl: (52) Empty reply from server
Could you advise?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一些实验我找到了解决方案
PS
在现实生活中你必须替换 0.0.0.0
after some experiments i found solution
PS
in the real life you must replace 0.0.0.0