x_old_misp_docker icon indicating copy to clipboard operation
x_old_misp_docker copied to clipboard

Error generating pgp key

Open dmoore44 opened this issue 5 years ago • 2 comments

After running docker-compose up, I keep getting pgp key generation errors for the misp_web container. Any thoughts on how to remedy the situation?

misp_web | misp_web | Current default time zone: 'Etc/UTC' misp_web | Local time is now: Thu Jan 23 22:21:40 UTC 2020. misp_web | Universal Time is now: Thu Jan 23 22:21:40 UTC 2020. misp_web | misp_web | Creating MySQL database misp_web | MYSQL_PASSWORD is set to 'misp' misp_web | mysql: [Warning] Using a password on the command line interface can be insecure. misp_web | Connected to database successfully! misp_web | Database misp available misp_web | Creating MISP configuration files misp_web | Fixing the MISP base URL (localhost) ... misp_web | Creating admin GnuPG key misp_web | Generating admin PGP key ... (please be patient, we need some entropy) misp_web | gpg: Generating a basic OpenPGP key misp_web | gpg: agent_genkey failed: End of file misp_web | gpg: key generation failed: End of file misp_web | gpg: Done misp_web exited with code 2

This sequence will just loop until I kill the process with Ctrl+C, and checking container status with docker ps indicates that the container is just continually restarting itself. It doesn't stay up long enough for me to attach a terminal and attempt to debug or execute the pgp key generation manually.

dmoore44 avatar Jan 23 '20 22:01 dmoore44

This seems to be related to the bind-mounting of /dev/urandom:/dev/random. If you remove that from your compose file, it will at least start.

dockwell-jenner avatar Jan 27 '20 18:01 dockwell-jenner

I don't know if this is a long lasting solution, but if you edit the lines 123 and 125 in the run.sh and get rid of '-u www-data'. The key gets generated in my case.

RobbeHogent avatar Apr 07 '21 18:04 RobbeHogent