hirosystems / stacks-blockchain-api

API for the Stacks blockchain
https://stacks-blockchain-api.vercel.app
GNU General Public License v3.0
171 stars 108 forks source link

Readme: docker command imcomplete #280

Closed friedger closed 3 years ago

friedger commented 3 years ago

Describe the bug Following the description of the readme starting the docker image shows with the help information and loops with rebooting.

To Reproduce Steps to reproduce the behavior:

  1. Install docker
  2. Run
    docker run -p 3999:3999 blockstack/stacks-blockchain-api-standalone
  3. See that the node does not start

Expected behavior Node starts correctly

Screenshots If applicable, add screenshots to help explain your problem.

Console log

Your container args are: /home/stacky/run.sh
tail: cannot open 'stacks-api.log' for reading: No such file or directory
tail: cannot open 'stacks-node.log' for reading: No such file or directory
The files belonging to this database system will be owned by user "stacky".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /home/stacky/.pgsql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /home/stacky/.pgsql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start.... done
server started
node exit, restarting...
33 36 
/home/stacky/run.sh: line 23:    33 Killed                  stacks_api &> stacks-api.log
waiting for server to shut down.... done
server stopped
tail: 'stacks-api.log' has appeared;  following new file
tail: 'stacks-node.log' has appeared;  following new file
stacks-node <SUBCOMMAND>
Run a stacks-node.

USAGE:
stacks-node <SUBCOMMAND>

SUBCOMMANDS:

mocknet     Start a node based on a fast local setup emulating a burnchain. Ideal for smart contract development. 

helium      Start a node based on a local setup relying on a local instance of bitcoind.
        The following bitcoin.conf is expected:
          chain=regtest
          disablewallet=0
          txindex=1
          server=1
          rpcuser=helium
          rpcpassword=helium

argon       Start a node that will join and stream blocks from the public argon testnet, powered by Blockstack.

start       Start a node with a config of your own. Can be used for joining a network, starting new chain, etc.
        Arguments:
          --config: path of the config (such as https://github.com/blockstack/stacks-blockchain/blob/master/testnet/Stacks.toml).
        Example:
          stacks-node start --config=/path/to/config.toml

version     Display informations about the current version and our release cycle.

help        Display this help.

The files belonging to this database system will be owned by user "stacky".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /home/stacky/.pgsql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
ok

Success. You can now start the database server using:

    pg_ctl -D /home/stacky/.pgsql/data -l logfile start

waiting for server to start.... done
server started
node exit, restarting...
69 73 
/home/stacky/run.sh: line 23:    69 Killed                  stacks_api &> stacks-api.log
waiting for server to shut down.... done
server stopped
==> stacks-api.log <==

==> stacks-node.log <==
The files belonging to this database system will be owned by user "stacky".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /home/stacky/.pgsql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
ok

Success. You can now start the database server using:

    pg_ctl -D /home/stacky/.pgsql/data -l logfile start

waiting for server to start.... done
server started
node exit, restarting...
110 113 
/home/stacky/run.sh: line 23:   110 Killed                  stacks_api &> stacks-api.log
waiting for server to shut down.... done
server stopped

==> stacks-api.log <==

==> stacks-node.log <==
The files belonging to this database system will be owned by user "stacky".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /home/stacky/.pgsql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... 
zone117x commented 3 years ago

Based on the output looks like the stacks-node hasn't added the stacks-node krypton arg. Still only argon. I haven't verified in source yet, but moving to core repo for now.

diwakergupta commented 3 years ago

Based on the output looks like the stacks-node hasn't added the stacks-node krypton arg. Still only argon. I haven't verified in source yet, but moving to core repo for now.

stacks-node definitely supports a krypton argument (I tried it locally). Source: https://github.com/blockstack/stacks-blockchain/blob/master/testnet/stacks-node/src/main.rs#L174

zone117x commented 3 years ago

Perhaps a cache or build is outdated somewhere. Moving issue back

blockstack-devops commented 3 years ago

:tada: This issue has been resolved in version 0.25.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

zone117x commented 3 years ago

Should be fixed now. Be sure to pull the latest image

docker pull blockstack/stacks-blockchain-api-standalone