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/authproxy.py", line 140, in __call__
    'Content-type': 'application/json'})
  File "/usr/lib/python2.7/httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 897, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 859, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 836, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 575, in create_connection
    raise err
socket.error: [Errno 99] Cannot assign requested address

Solution:

Pull latest image.
docker pull quay.io/blockstack/integrationtests:develop

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.

Solution:
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=0.0.0.0 -e BLOCKSTACK_TEST_BITCOIND_ALLOWIP=0.0.0.0/0 quay.io/blockstack/integrationtests:develop blockstack-test-scenario --interactive 2 blockstack_integration_tests.scenarios.browser_env)
1 Like