cloudcompass / ToIPLabs

A series of labs designed to create understanding about Hyperledger's Trust over IP technology stack. Finally, a trust layer for the Internet.
Apache License 2.0
120 stars 65 forks source link

Problem of running Hyperledger Indy, Aries, Ursa Agent Demonstration #85

Closed 2017zhangyuxuan closed 2 years ago

2017zhangyuxuan commented 2 years ago

For this instruction https://github.com/cloudcompass/ToIPLabs/blob/main/src/indy-material/nodejs/RunningLocally.md, when I do the command ./manage build, it failed. The error image like this. image

I tried pip install --upgrade pip. But is didn't work. It seemed that pip was still old version. Can you give me some advice?

2017zhangyuxuan commented 2 years ago

When I resolved above problems by upgradeing setuptools, I used the command ./manage up and then it had another problem like this: image

By the way, I use MacOS with M1.

nebucaz commented 2 years ago

@2017zhangyuxuan I also had the qemu core dump when trying to run the von-network on Apple Silicon M1. I ended up re-building the underlying docker image (von-image) for limux/arm64 architecture. See the discussion here. You can run the von-network on Apple Silicon M1 (or Linux/arm64) by replacing the first line in the Dockerfile of von-network:

#FROM bcgovimages/von-image:node-1.12-4
FROM snel/von-image:node-1.12-4-arm64

which then points to my image of von-network compiled for arm64 architecture. You can create your own docker-image following the steps described in the pull-request

2017zhangyuxuan commented 2 years ago

@nebucaz Thanks a lot for answering. However, there is still an error. Can you show me the whole pool.dockerfile ? image

nebucaz commented 2 years ago

@2017zhangyuxuan If you change the file pool.dockerfile to the following version, you'll be able to start the 4 indy-nodes.

#FROM bcgovimages/von-image:py35-1.6-8
FROM snel/von-image:node-1.12-4-arm64

USER indy
RUN pip install --no-cache-dir aiosqlite~=0.6.0

#ENV RUST_LOG ${RUST_LOG:-warning}
#RUN mkdir -p \
#        $HOME/ledger/sandbox/data \
#        $HOME/log \
#        $HOME/.indy-cli/networks \
#    chmod -R ug+rw $HOME/log $HOME/ledger $HOME/.indy-cli $HOME/.indy_client
#        $HOME/.indy_client/wallet && \

ADD --chown=indy:indy indy_config.py /etc/indy/
ADD --chown=indy:indy . $HOME
RUN chmod uga+x scripts/* bin/*
docker ps                                                      
CONTAINER ID   IMAGE       COMMAND                  CREATED         STATUS         PORTS                              NAMES
adb3980a357d   indy-node   "bash -c './scripts/…"   4 minutes ago   Up 4 minutes   0.0.0.0:9701-9702->9701-9702/tcp   nodejs_node1_1
5d512918fa24   indy-node   "bash -c './scripts/…"   4 minutes ago   Up 4 minutes   0.0.0.0:9705-9706->9705-9706/tcp   nodejs_node3_1
b61492524079   indy-node   "bash -c './scripts/…"   4 minutes ago   Up 4 minutes   0.0.0.0:9703-9704->9703-9704/tcp   nodejs_node2_1
dff2f418b638   indy-node   "bash -c './scripts/…"   4 minutes ago   Up 4 minutes   0.0.0.0:9707-9708->9707-9708/tcp   nodejs_node4_1

However, there seems to be another error in the agentjs wich will core dump every agent:

alice_1      | 
alice_1      | > indy-agent@0.0.0 start /home/indy/nodejs
alice_1      | > node ./bin/www
alice_1      | 
alice_1      | Segmentation fault
alice_1      | npm ERR! code ELIFECYCLE
alice_1      | npm ERR! errno 139
alice_1      | npm ERR! indy-agent@0.0.0 start: `node ./bin/www`
alice_1      | npm ERR! Exit status 139
alice_1      | npm ERR! 
alice_1      | npm ERR! Failed at the indy-agent@0.0.0 start script.
alice_1      | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
alice_1      | 
alice_1      | npm ERR! A complete log of this run can be found in:
alice_1      | npm ERR!     /home/indy/.npm/_logs/2021-12-06T15_00_00_573Z-debug.log
alice_1 exited with code 139

same for bob_1, faber_1, and thrift_1

swcurran commented 2 years ago

Sorry for being slow to answer this one. As @nebucaz correctly points out, this is a very old, locked in time demo that I should have retired. Rather than trying to fix this, I've replaced the lab with a new one that uses the latest code is maintained far better than the one I had been using.

I'm going to close this issue as "too old to address", and you will see that the readme directs the user to a different, but similar lab.

knagware9 commented 2 months ago

Indy agents giving errorr - container logs message as below-

indy-agent@0.0.0 start /home/indy/nodejs node ./bin/www

wallet already exist, try to open wallet wallet already exist, try to open wallet { IndyError: LedgerInvalidTransaction at Object.callback (/home/indy/nodejs/node_modules/indy-sdk/src/wrapIndyCallback.js:15:10) name: 'IndyError', message: 'LedgerInvalidTransaction', indyCode: 304, indyName: 'LedgerInvalidTransaction' }