从锯齿xo事务开始

时间:2018-04-03 11:10:31

标签: hyperledger-sawtooth

我在Docker上设置了Hyperledger Sawtooth, 我正在尝试使用以下命令测试锯齿XO事务

uname@uname:~/sawtooth$ docker exec -it sawtooth-shell-default bash
root@5279e5a413c1:/# xo create one

但我收到了以下错误

错误:无法连接到http://127.0.0.1:8008/batches:HTTPConnectionPool(host ='127.0.0.1',port = 8008):使用url:/ batches超出了最大重试次数(由NewConnectionError引起(':无法到建立新连接:[Errno 111]拒绝连接',))

FYKI这个命令对我有用

从shell中,这给了我块

curl http://rest-api:8008/blocks

从我的主机上按预期工作

curl http://localhost:8008/blocks
curl http://127.0.0.1:8008/blocks

这有什么问题?

我的yaml文件是默认文件,您可以找到它here

1 个答案:

答案 0 :(得分:2)

如果您使用的是docker,则必须以这种方式提及API的URL

xo create one --url http://rest-api:8008

我在Ashish提出这个暗示之后发现了这个。

https://chat.hyperledger.org/channel/sawtooth

相关问题