dyne / sawroom Goto Github PK
View Code? Open in Web Editor NEWZenroom Transaction Processor for Hyperledger Sawtooth
Home Page: https://sawroom.dyne.org
License: GNU Affero General Public License v3.0
Zenroom Transaction Processor for Hyperledger Sawtooth
Home Page: https://sawroom.dyne.org
License: GNU Affero General Public License v3.0
After building and running the container, docker reports using these ip:ports:
0.0.0.0:8008->8008/tcp, 0.0.0.0:9001->9001/tcp, 0.0.0.0:9009->9009/tcp
In reality only the 9009 ports responds, the others don't. Running supervisorctl returns:
root@590e7112dd51:/project# supervisorctl
consensus-engines:pbft RUNNING pid 535, uptime 0:00:37
decode-os:dam-client FATAL Exited too quickly (process log may have details)
decode-os:dam-dir FATAL Exited too quickly (process log may have details)
decode-os:tor FATAL Exited too quickly (process log may have details)
sawtooth-core:rest-api STARTING
sawtooth-core:validator FATAL Exited too quickly (process log may have details)
transaction-processors:block-info RUNNING pid 15, uptime 0:05:39
transaction-processors:identity RUNNING pid 16, uptime 0:05:39
transaction-processors:petition EXITED Jan 22 05:17 PM
transaction-processors:petition-api RUNNING pid 13, uptime 0:05:39
transaction-processors:settings RUNNING pid 14, uptime 0:05:39
and ps aux returns
root@590e7112dd51:/project# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 2084 584 ? Ss 17:17 0:00 /bin/sh -c /etc/init.d/supervisor start
root 8 0.0 0.0 2084 636 ? S 17:17 0:00 /bin/sh /etc/init.d/supervisor start
root 10 0.6 0.5 28092 22964 ? S 17:17 0:02 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
sawroom 13 0.4 1.0 49808 42124 ? S 17:17 0:02 /usr/bin/python3 /usr/local/bin/hypercorn -b 0.0.0.0:9009 src.tp.server.main:app
sawroom 14 1.0 0.1 232488 6248 ? Sl 17:17 0:04 /usr/local/bin/settings-tp --connect tcp://127.0.0.1:4004
sawroom 15 1.0 0.1 232412 6340 ? Sl 17:17 0:04 /usr/local/bin/block-info-tp --connect tcp://127.0.0.1:4004
sawroom 16 1.0 0.1 232556 6236 ? Sl 17:17 0:04 /usr/local/bin/identity-tp --connect tcp://127.0.0.1:4004
root 137 0.0 0.0 5656 3408 pts/0 Ss 17:18 0:00 /bin/bash
sawroom 535 1.0 0.1 166068 7204 ? Sl 17:22 0:01 pbft-engine --connect tcp://127.0.0.1:5050
sawroom 780 0.0 0.2 12520 8620 ? R 17:24 0:00 /usr/bin/python3 /usr/local/bin/sawtooth-rest-api --connect tcp://127.0.0.1:4004 --bind 0.0.0.0:8008
root 781 0.0 0.0 8060 2796 pts/0 R+ 17:24 0:00 ps aux
When executing run I get this error:
docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /var/lib/sawroom/data.
The issue seems to be the --mount parameter, replacing it with -v fixes
The fixed script:
#!/bin/sh
# set it to somewhere in the home
src=/var/lib/sawroom
touch $src/.keep || return 1
# if test "$src" = "."; then
# src=$(pwd)
# fi
ID=$(id -ru)
mkdir -p "$src"/data
mkdir -p "$src"/keys/sawtooth "$src"/keys/tor
mkdir -p "$src"/log/sawtooth "$src"/log/tor
t="$src"/log/tor/dam-client.log && touch "$t"
t="$src"/log/tor/dam-dir.log && touch "$t"
t="$src"/log/tor/tor.log && touch "$t"
# --mount type=bind,source="$src"/keys/tor,destination=/etc/tor \
cat <<EOF
___ ___ _____ ___ ___ __ __
/ __| /_\ \ / / _ \/ _ \ / _ \| \/ |
\__ \/ _ \ \/\/ /| / (_) | (_) | |\/| |
|___/_/ \_\_/\_/ |_|_\\___/ \___/|_| |_|
Started full node, local consoles links:
Service supervisor: https://127.0.0.1:9001
Netdata monitor: http://127.0.0.1:19999
Execute ./shell to step into the running container
Hit Ctrl-C to stop
EOF
if [ "$1" = "" ]; then
docker run -it \
-v type=bind,source="$src"/data,destination=/var/lib/sawtooth \
-v type=bind,source="$src"/keys/sawtooth,destination=/etc/sawtooth/keys \
-v type=bind,source="$src"/keys/tor,destination=/var/lib/tor \
-v type=bind,source="$src"/log/sawtooth,destination=/var/log/sawtooth \
-v type=bind,source="$src"/log/tor,destination=/var/log/tor \
-p 8008:8008 \
-p 9009:9009 \
dyne/sawroom:testnet sawroom-start $ID
else
docker run -it \
--mount type=bind,source="$src"/data,destination=/var/lib/sawtooth \
--mount type=bind,source="$src"/keys/sawtooth,destination=/etc/sawtooth/keys \
--mount type=bind,source="$src"/keys/tor,destination=/var/lib/tor \
--mount type=bind,source="$src"/log/sawtooth,destination=/var/log/sawtooth \
--mount type=bind,source="$src"/log/tor,destination=/var/log/tor \
-p 8008:8008 \
-p 9009:9009 \
dyne/sawroom:testnet $*
fi
rotate all logs in /var/log/sawtooth
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.