#TIL #linux 랜덤 엔트로피가 모자랄 때

Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy! (Need xxx more bytes)

gpg key 생성 실패 메시지. 별일 다 있네. 엔트로피가 모잘린다니 linux virtual machine에서 docker 컨테이너를 실행하면 몰라도 엔간해선 이런 메시지를 보기 힘들다.

$ cat /proc/sys/kernel/random/entropy_avail
137

이런 엔트로피론 택도 없다.

$ sudo apt-get install haveged
$ haveged
$ cat /proc/sys/kernel/random/entropy_avail
2430

이럴 땐, haveged 프로그램을 사용하면 된다.

참고 - How to use GnuPG inside Docker containers, as it is missing entropy? - stackoverflow.com

Feedback plz <3 @ohyecloudy, ohyecloudy@gmail.com

A Random Post