hyperledger-archives / sawtooth-core

Core repository for Sawtooth Distributed Ledger
https://wiki.hyperledger.org/display/sawtooth
Apache License 2.0
1.42k stars 764 forks source link

problem with docker-compose #2430

Open neginkheirmand opened 2 years ago

neginkheirmand commented 2 years ago

I have been following the documentation to deploy a sawtooth test network (using docker) but failed with both poet and pbft versions.

The nightly tag of docker is outdated and does not work with the docker-compose anymore, however I have been able to deploy the poet version by just changing the tag part of the images in docker-compose from nightly to latest. After this change the "sawtooth peer list" and the "curl http://sawtooth-rest-api-default-0:8008/peers" commands work properly. Yet when trying to set a key named MyKey to the value 999 according to this command, I run into other problems: intkey set --url http://sawtooth-rest-api-default-0:8008 MyKey 999 I get the response: { "link": "http://sawtooth-rest-api-default-0:8008/batch_statuses?id=8a9cde13ada7bc4f06e6736acf54689515946d8865538544b6e71744a50f861d6621a9e5e94d073b495858116c7c7d5685c6341e65389af30d12bdea78d6b90c" }

which may seem rational according to the documentation but when I try to run this command: intkey show --url http://sawtooth-rest-api-default-1:8008 MyKey I get the following response: Error: No such key: MyKey

now if I curl the specified link from the response of the intkey set command I get that the status is pending curl "http://sawtooth-rest-api-default-0:8008/batch_statuses?id=8a9cde13ada7bc4f06e6736acf54689515946d8865538544b6e71744a50f861d6621a9e5e94d073b495858116c7c7d5685c6341e65389af30d12bdea78d6b90c" the response: { "data": [ { "id": "8a9cde13ada7bc4f06e6736acf54689515946d8865538544b6e71744a50f861d6621a9e5e94d073b495858116c7c7d5685c6341e65389af30d12bdea78d6b90c", "invalid_transactions": [], "status": "PENDING" } ], "link": "http://sawtooth-rest-api-default-0:8008/batch_statuses?id=8a9cde13ada7bc4f06e6736acf54689515946d8865538544b6e71744a50f861d6621a9e5e94d073b495858116c7c7d5685c6341e65389af30d12bdea78d6b90c" }

jallphin commented 2 years ago

Can confirm this is a problem. We really want to use this for an important research project but we cannot seem to get the docker-compose project to function properly and are having exact same issues described by @neginkheirmand

Can the developers here give us some indication of what we are doing wrong or perhaps some direction to move forward with?

Thanks!

finavatar commented 2 years ago

@neginkheirmand Would you be able to show me exactly how you changed from nightly to latest ( I assumed from yaml) so as to be able to check that peer nodes work (Quote from you: After this change the "sawtooth peer list" and the "curl http://sawtooth-rest-api-default-0:8008/peers" commands work properly.)

I haven't been able to get this to work even when changing all from nightly to latest. The error that I keep getting is:

curl: (7) Failed to connect to sawtooth-rest-api-default-0 port 8008: Connection refused

It is my first time venturing into blockchain/sawtooth and docker and I must say that it's very daunting. By the way, how did you know that it's docker-compose that's the problem and not sawtooth development itself? (must be dummy question and shows how ignorant I am) thanks

TanjinAlam commented 1 year ago

I was facing following transaction error problem just after successfully running following docker file.

@jallphin you can re-produce the error after successfully starting following docker file.

version: "3.6"

volumes: contracts-shared: grid-shared: pbft-shared: gridd-alpha: templates-shared: cache-shared:

services:

---== shared services ==---

sabre-cli: image: hyperledger/sawtooth-sabre-cli:latest volumes:

image

saki021989 commented 1 year ago

image I am getting the same error of peot and pbft engine and then connection refused when I used curl command.

mtbc commented 1 year ago

I usually see exactly the same problem, with the exception that, just sometimes, I get COMMITTED from the link then the get test passes. Perhaps there's a timing issue?