Categories
DevOps Server Technology

Docker Compose stalling due to low entropy

I use systemd to drive Docker Compose primarily under Ubuntu Server, and noticed that commands such as down would seemingly freeze while removing volumes. After checking the usual suspects (CPU, RAM, swap, et al.), I set out to see if anyone else was experiencing this problem. It turns out that several people are, and it’s a known issue with an easy fix.

Installation

sudo apt update \\
&& \\
sudo apt-get install -y haveged

All of the appropriate defaults should be in place and the aforementioned Digital Ocean article covers if they’re not. If you’d like to verify that haveged is running and starts upon system initialization:

sudo systemctl status haveged

Assessment

To view the amount of entropy (ideally, anything above 1,000):

cat /proc/sys/kernel/random/entropy_avail

Verification

To verify the quality of entropy (ideally, a success rate between 998–1,000) using the FIPS 140-2 method, install the rngtest tool and then run a test:

sudo apt-get install -y rng-tools \
&& \
rngtest -c 1000 </dev/random


Did this article save you time or money? I'd love a coffee!

Did you find this useful?
Please share with those who you believe would find this useful too!

Leave a Reply

Your email address will not be published. Required fields are marked *