docker icon indicating copy to clipboard operation
docker copied to clipboard

(38)Function not implemented: AH00141: Could not initialize random number generator

Open WarSonic69 opened this issue 4 years ago • 27 comments

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

Hi everyone,

I searched and found this issue with the exact same issue but no real answer : https://github.com/nextcloud/server/issues/28666 As the webserver is handled in the docker container as far as I know, the issue is with the container.

  1. 22.1.0.1 docker version of Nextcloud server perfectly working
  2. Automatic update to 22.1.1.2 this morning via Watchtower
  3. Server not started and this issue looping in the container logs : [Tue Aug 31 20:16:38.273961 2021] [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator

Server configuration

Operating system: Synology DS415+ with DSM 6.2.4

Web server: Handled in the docker image (Apache I guess given the error)

Database: MariaDB

Where did you install Nextcloud from: This repository

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Nothing interesting in the Nextcloud logs apart from : {"reqId":"Z2wxZZKE4MZXbp9uotkC","level":1,"time":"2021-08-31T02:03:35+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"22.1.0.1"} {"reqId":"Z2wxZZKE4MZXbp9uotkC","level":1,"time":"2021-08-31T02:04:04+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"22.1.0.1"} {"reqId":"Z2wxZZKE4MZXbp9uotkC","level":1,"time":"2021-08-31T02:04:04+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::updateEnd: Update successful","userAgent":"--","version":"22.1.1.2"} {"reqId":"Z2wxZZKE4MZXbp9uotkC","level":1,"time":"2021-08-31T02:04:04+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"22.1.1.2"} {"reqId":"Z2wxZZKE4MZXbp9uotkC","level":1,"time":"2021-08-31T02:04:04+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"22.1.1.2"}

Thanks in advance for your help !

WarSonic69 avatar Aug 31 '21 18:08 WarSonic69

Additional context: https://github.com/docker-library/wordpress/issues/630 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=978045

Your NAS is using a linux kernel < 3.16 and is missing some dependencies required by apache2 now.

kesselb avatar Sep 01 '21 08:09 kesselb

Hi @kesselb

Thanks for your quick answer. I looked a little bit around and did not find any easy way to update the Synology kernel. Is it possible to install only the dependencies missing ? If yes, is there a list ? If not, is it possible to downgrade the version of my Nextcloud installation ?

Thanks in advance !

WarSonic69 avatar Sep 01 '21 08:09 WarSonic69

same problem :( - any dummy advice to install the missing dependencies?

Thanks in advance !

violence88 avatar Sep 02 '21 06:09 violence88

I had a similar problem. The only difference was that my docker image ran in a virtual machine (VirtualBox) with Debian Jessie as a guest system. I had to update to Debian Stretch (all my attempts to update the Linux kernel for Jessey ended in vain), after which the error disappeared. It seems to me that the problem arose after the docker image was based on php: 7.4-apache-bullseye (and then php: 8.0-apache-bullseye) instead of php: 7.4-apache-buster. For NAS, things will be much worse, since updating the Linux version will not be easy at all.

bes1967 avatar Sep 02 '21 12:09 bes1967

Yes, I tried looking for different ways to update the kernel on my NAS but it seems far too risky. My only hope would be the last version of the OS (DSM7.0) but I am not sure of the kernel version on it (found several answers all contradictory) and I don't want to rush the update for that...

WarSonic69 avatar Sep 02 '21 14:09 WarSonic69

My NAS is on DSM7.0 --> same Error!

violence88 avatar Sep 02 '21 14:09 violence88

Thanks for the information ! (Even if it's not what I wanted to hear) Sooo, no possibility for us apparently ?

WarSonic69 avatar Sep 02 '21 14:09 WarSonic69

Same issue on DSM7.0

lincolnep avatar Sep 03 '21 03:09 lincolnep

same issue but on DSM 6.2.4

comdr-chocchip avatar Sep 06 '21 06:09 comdr-chocchip

I can reproduce this issue on a Synology RS3617xs with DSM 6.2.4-25556. On a DS1618+ with DSM 7.0-41890 it is working fine.

My workaround was to edit the Dockerfile to use php:8.0-apache-buster as base image instead of php:8.0-apache-bullseye and build it on my own. Otherwise a switch to the fpm image could a be a workaround for this issue.

BTW, same issue for the bitnami apache image: https://github.com/bitnami/bitnami-docker-apache/issues/106

mosesdd avatar Sep 06 '21 08:09 mosesdd

Hi @mosesdd

Thanks you for the hint about the fact to build your own image. I just tried and can confirm it went back up immediately.

For reference for those that do not know exactly how to build your own image, I did the following (all in SSH) : Git clone in a specific directory on the NAS Change the docker/22/apache/Dockerfile to use the buster image Go to the docker/22/apache folder Docker build with this command : "sudo docker build -t nextcloudtest . -f Dockerfile" (the -t part is to have a understandable name, the . -f part is to avoid an issue with the COPY part) Then change the base image of my container from nextcloud:latest to nextcloudtest:latest

So far, everything seems to work fine again but I am no longer using the official Nextcloud image for now, I will be forced to build it manually everytime.

Best regards

WarSonic69 avatar Sep 06 '21 10:09 WarSonic69

anyone know if there are any pre built images to download with php:8.0-apache-buster as base image by default? That would be nice to have also for future updates.

violence88 avatar Sep 06 '21 11:09 violence88

Hi, anyone an idea how an already updated DB/data can be rolled back from 21.1.1.2 to 21.1.0.1 ? I still have a working DS412+ with DSM 6.2.4. Any higher DSM like 7 will never be released for this. Only security updates will be done. I gues these will not contain a new kernel.

indiana11011100 avatar Sep 06 '21 16:09 indiana11011100

Same issue with Docker running on a Synology DS1515+ with DSM 6.2.4. Since Nextcloud downgrades are not supported and building my own image seems quite the effort please release an image with php:8.0-apache-buster as base image.

partymild avatar Sep 13 '21 13:09 partymild

@WarSonic69 Can you elaborate on how to build a custom docker image?

Git clone in a specific directory on the NAS

Which git repository are you cloning?

Change the docker/22/apache/Dockerfile to use the buster image

What exactly do you change. etc.

Greatly appreciated.

philippepiatkiewitz avatar Sep 20 '21 11:09 philippepiatkiewitz

Hi @philippepiatkiewitz

I Gitcloned the Nextcloud/docker repo : https://github.com/nextcloud/docker.git

I changed this line in the Dockerfile : FROM php:8.0-apache-bullseye and I put : FROM php:8.0-apache-buster

Hope this is enough information, don't hesitate if you need more.

WarSonic69 avatar Sep 20 '21 16:09 WarSonic69

@WarSonic69 Thanks! I could make a new docker image and got nextcloud up and running.

philippepiatkiewitz avatar Sep 20 '21 20:09 philippepiatkiewitz

You're welcome ! This is not ideal but well... It works.

WarSonic69 avatar Sep 20 '21 21:09 WarSonic69

Hey @WarSonic69 another two questions from my side: You mention a "specific" folder where you cloned the repository. Which one is it? I'm trying to find this information, but I'm not sure where to clone this. Another thing: I tried to build the build the docker container inside the directory like "volume1/docker/docker/22/apache", but wasn't successful, is that also a sign that I need to have a specific folder? Err. Msg. looks like that:


/volume1/docker/docker/22/apache$ sudo docker build -t nextcloudtest
"docker build" requires exactly 1 argument.
See 'docker build --help'.

Usage:  docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

maschbauerkl avatar Sep 20 '21 22:09 maschbauerkl

Hi @maschbauerkl

The specific folder I am mentioning is the folder in which you want to store the Git data. Personally, it is something like "volume1/docker/NextcloudGitClone" just to remember it. It does not have a huge importance as you can delete it once the image is built.

Regarding your error, I remember having it when I tried building the image at the beginning. I can only advice you to use the exact same build command as I did (even the dot is important). I don't remember the exact cause but it is linked to the command.

WarSonic69 avatar Sep 20 '21 22:09 WarSonic69

Since the root issue is stille there, any chance of a permanent fix? like a prebuilt dockerfile with the correct base image?

partymild avatar Oct 06 '21 14:10 partymild

Just wanted to mention that changing the Dockerfile directly is a valid, yet not an ideal solution. Instead, I would advise to do that change in Dockerfile-debian.template and run ./update. If you are upgrading across multiple major versions, that has the benefit of "fixing" all the Dockerfiles at once.

milux avatar Nov 09 '21 19:11 milux

+1 currently I am on nextcloud v20.0.4 using the docker apache image. I am trying to upgrade the container to 20.0.14 in order to upgrade to the current major version after that. However, due to this error the container won't start an I have no upgrade path available. Is this error fixed in v21? Can the upgrade to 20.0.14 be omitted?

I am running on synology DSM 7.0.1, so there is no kernel update available.

leiterschleife avatar Feb 10 '22 09:02 leiterschleife

@leiterschleife Synology needs to fix this. In the meantime, as mentioned further above, you can fix it yourself. Using outdated packages would not be the preferred solution for everyone.

m4rkv5 avatar Feb 10 '22 12:02 m4rkv5

@m4rkv5 Has anyone given Synology a hint about this? What are the versions known to be working again? Would I need to do the manual fix from now on for any future version of nextcloud? If so, this cannot be expected from every user hosting a nextcloud docker image on a diskstation as I expect there are plenty of them.

leiterschleife avatar Feb 11 '22 09:02 leiterschleife

@leiterschleife Yes you need to patch every version in your upgrade path. You only need to use the commands from above. Have a backup. My database was already V23 but I needed a specific V22 first.

m4rkv5 avatar Feb 11 '22 10:02 m4rkv5

Synology don't issue kernel updates. It's sort of fixed hardware. Time marches on never-ending and software dependencies are upgraded, and here we are with broken things.

I'd love to know the reason for -bullseye over -buster, even if it is in vain.

It's good to see RSS-Bridge and other repos actively going back to -buster

gingerbeardman avatar Feb 22 '22 21:02 gingerbeardman

I had the same problem with centos7,The container automatically exits after starting. Check logs. Error:Function not implemented: AH00141: Could not initialize random number generator

my solution was to upgrade the kernel

  1. Check my server kernel: Linux 3.10.0-123.el7.x86_64

  2. After kernel upgrade: Linux 6.0.5-1.el7.elrepo.x86_64

  3. Problem solved

Forgive my non-standard English expression;

123lujiaqiang avatar Oct 27 '22 01:10 123lujiaqiang

I can reproduce this issue on a Synology RS3617xs with DSM 6.2.4-25556. On a DS1618+ with DSM 7.0-41890 it is working fine.

My workaround was to edit the Dockerfile to use php:8.0-apache-buster as base image instead of php:8.0-apache-bullseye and build it on my own. Otherwise a switch to the fpm image could a be a workaround for this issue.

BTW, same issue for the bitnami apache image: https://github.com/bitnami/bitnami-docker-apache/issues/106

Can you please elaborate the procedure of changing the docker file on a synology nas?

hassansf avatar Apr 01 '23 22:04 hassansf

Can you please elaborate the procedure of changing the docker file on a synology nas?

Step 1: Change line 1 of Dockerfile-debian.template, here is the git patch:

diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template
index d3fb81e..9b5ea71 100644
--- a/Dockerfile-debian.template
+++ b/Dockerfile-debian.template
@@ -1,4 +1,4 @@
-FROM php:%%PHP_VERSION%%-%%VARIANT%%-bullseye
+FROM php:%%PHP_VERSION%%-%%VARIANT%%-buster
 
 # entrypoint.sh and cron.sh dependencies
 RUN set -ex; \

Step 2: Run update.sh.

Step 3: Build desired Docker images.

Step 4: Profit? :D

milux avatar Apr 20 '23 07:04 milux