I created my VPC stack using the AWS Quick Start found here. When I run the final run command from the Chainlink docs:

cd ~/.chainlink-rinkeby && docker run -p 6688:6688 -v ~/.chainlink-rinkeby:/chainlink -it --env-file=.env smartcontract/chainlink:<version> local n

It says:

Another application is currently holding the database lease (or a previous instance exited uncleanly), waiting for lease to expire...

Then, when I escape, it says: err=Cannot boot Chainlink: opening db: failed to take initial lease on database: stopped errVerbose=opening db: failed to take initial lease on database: stopped

I've tried running this using various Chainlink docker images, but with the same effect. My db password conforms to all of the rules. I checked the env and my DATABASE_URL variable looks good. I'm using Infura for my Ethereum node and am targeting the Rinkeby testnet but experienced the same outcome when I configured for the Ethereum mainnet.

1 Answer 1


You have another docker container running which is holding the current lease on the DB. Only one chainlink docker container can ever have the current lease on the db.

To view all running docker containers on the server: docker container ls

Remove previous docker containers: docker rm -f <container-name>

In general if you are running 2 docker containers, one being the main container, and the second being the failover, the failover container will constantly wait for the main container to release the lease (either intentionally, or unintentionally ie: fatal errors, etc.).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.