Issues running regtest docker image

Solutions to problems that I encountered using the regtest docker container.

1. Container shutting down after failure to fill address with bitcoin.

Error trace:

Fill mr6nrMvvh44sR5MiX929mMXP5hqgaTr6fx (cRH8tAZw6gSbewktG2Ajeq7KwFQ29Q7yADrfwBMxYHnMUvTxxNx8) with 50
Traceback (most recent call last):
  File "/usr/local/bin/blockstack-test-scenario", line 1377, in <module>
    bitcoin_regtest_fill_wallets( working_dir, scenario.wallets, default_payment_wallet=default_payment_wallet )
  File "/usr/local/bin/blockstack-test-scenario", line 1045, in bitcoin_regtest_fill_wallets
    fill_wallet( bitcoind, wallet, 50 )
  File "/usr/local/bin/blockstack-test-scenario", line 961, in fill_wallet
    bitcoind.importprivkey(testnet_wif, "")
  File "/usr/local/lib/python2.7/dist-packages/virtualchain/lib/blockchain/bitcoin_blockchain/", line 140, in __call__
    'Content-type': 'application/json'})
  File "/usr/lib/python2.7/", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/", line 1097, in _send_request
  File "/usr/lib/python2.7/", line 1053, in endheaders
  File "/usr/lib/python2.7/", line 897, in _send_output
  File "/usr/lib/python2.7/", line 859, in send
  File "/usr/lib/python2.7/", line 836, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/", line 575, in create_connection
    raise err
socket.error: [Errno 99] Cannot assign requested address


Pull latest image.
docker pull

Prune old stopped containers
docker container prune

2. Docker container shuts down after waiting for Blockstack API process to start

This is due to lingering pid files from previous runs which prevents the API process from starting up.

Start the container without mounting /tmp by removing the -v /tmp:/tmp option from the docker start command.

IMAGE=$(docker run -dt -p 6270:6270 -p 16269:16269 -p 18332:18332 -e BLOCKSTACK_TEST_CLIENT_RPC_PORT=6270 -e BLOCKSTACK_TEST_CLIENT_BIND= -e BLOCKSTACK_TEST_BITCOIND_ALLOWIP= blockstack-test-scenario --interactive 2 blockstack_integration_tests.scenarios.browser_env)
1 Like