Continuous Http Error on communicating with dynamodb-local

We seem to have an issue happening constantly, at the moment 75% of our builds, which fail with:

Unable to execute HTTP request: localhost:8000 failed to respond

The build will randomly work. Basically is keep hitting it until it passes. Of course, this is far from ideal. Is there anything we can do alleviate or eliminate the problem?