Skip to content

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

Closed

Description

@WarSonic69

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 : nextcloud/server#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 !

Activity

  1. transferred this issue fromnextcloud/serveron Aug 31, 2021
  2. kesselb commented on Sep 1, 2021

    @kesselb
    Contributor

    Additional context:
    docker-library/wordpress#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.

  3. changed the title [-]22.1.1.2 (38)Function not implemented: AH00141: Could not initialize random number generator[/-] [+](38)Function not implemented: AH00141: Could not initialize random number generator[/+] on Sep 1, 2021
  4. pinned this issue on Sep 1, 2021
  5. WarSonic69 commented on Sep 1, 2021

    @WarSonic69
    Author

    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 !

  6. violence88 commented on Sep 2, 2021

    @violence88

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

    Thanks in advance !

  7. bes1967 commented on Sep 2, 2021

    @bes1967

    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.

  8. WarSonic69 commented on Sep 2, 2021

    @WarSonic69
    Author

    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...

  9. violence88 commented on Sep 2, 2021

    @violence88

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

  10. WarSonic69 commented on Sep 2, 2021

    @WarSonic69
    Author

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

  11. lincolnep commented on Sep 3, 2021

    @lincolnep

    Same issue on DSM7.0

  12. comdr-chocchip commented on Sep 6, 2021

    @comdr-chocchip

    same issue but on DSM 6.2.4

  13. mosesdd commented on Sep 6, 2021

    @mosesdd

    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

  14. WarSonic69 commented on Sep 6, 2021

    @WarSonic69
    Author

    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

  15. violence88 commented on Sep 6, 2021

    @violence88

    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.

  16. 11 remaining items

  17. leiterschleife commented on Feb 10, 2022

    @leiterschleife

    +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.

  18. leiterschleife commented on Feb 11, 2022

    @leiterschleife

    @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.

  19. gingerbeardman commented on Feb 22, 2022

    @gingerbeardman

    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

  20. 123lujiaqiang commented on Oct 27, 2022

    @123lujiaqiang

    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;

  21. hassansf commented on Apr 1, 2023

    @hassansf

    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?

  22. milux commented on Apr 20, 2023

    @milux

    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

  23. PaulCornelissen commented on Aug 1, 2023

    @PaulCornelissen

    I just succesfully worked around this with version 27.0.1 downgrading the PHP base image from php:8.2-apache-bookworm to php:8.2-apache-buster. So far so good it still works with v27 and bookworm. FYI.

  24. mlopezcoria commented on Aug 25, 2023

    @mlopezcoria

    I just succesfully worked around this with version 27.0.1 downgrading the PHP base image from php:8.2-apache-bookworm to php:8.2-apache-buster. So far so good it still works with v27 and bookworm. FYI.

    Me too. Big thanks for all of you guys for helping with that!
    I did this:

    1.- Clone Nextcloud repository into the docker-compose.yml directory

    cd /docker-apps/nextcloud
    git clone https://github.com/nextcloud/docker.git
    

    2.- Changed the version name of debian (bullseye, bookwork or whatever it is) to buster in the Dockerfile. Look for it in the corresponding version directory under the cloned Nextcloud repository (in this case /docker-apps/nextcloud/docker/27/apache/Dockerfile)

    3.- After changing to the Dockerfile path

    cd /docker-apps/nextcloud/docker/27/apache/

    I run the build command:

    docker build -t nextcloudtest . -f Dockerfile

    4.- A few years later I modified the docker-compose.yml file to match the new nextcloud image name (nextcloudtest):

    vim docker-compose.yml

    nextcloud-app:
        image: nextcloudtest
    

    5.- And finally started all up.

    docker compose up -d && docker compose logs -f

    It is just all of the above in a single post. I just compiled it ;-)

    Regards,
    Mauricio

  25. milux commented on Aug 30, 2023

    @milux

    2.- Changed the version name of debian (bullseye, bookwork or whatever it is) to buster in the Dockerfile. Look for it in the corresponding version directory under the cloned Nextcloud repository (in this case /docker-apps/nextcloud/docker/27/apache/Dockerfile)

    This is not ideal in case you want to update properly!
    There's a better way:

    1. Modify the update.sh as follows (git diff syntax):
    @@ -7,8 +7,7 @@ declare -A alpine_version=(
     )
     
     declare -A debian_version=(
    -       [25]='bullseye'
    -       [default]='bookworm'
    +       [default]='buster'
     )
    

    (i.e. set [default] to buster and remove the exception for [25])

    1. Save this changes to git stash with git stash store "$(git stash create)".
      This is helpful if you want to update this repo from upstream to get fixes for Dockerfiles later.

    2. Run ./update.sh.

    3. Build whatever version(s) you want. Example:
      for (( NCV=25; NCV<=27; NCV++ )); do docker buildx build -t nextcloud:$NCV $NCV/apache; done
      This will build all recent NextCloud apache images for versions [25; 27] for amd64.
      If you have an account on DockerHub, you can do this:
      for (( NCV=25; NCV<=27; NCV++ )); do docker buildx build --push -t <your-account>/nextcloud:$NCV $NCV/apache; done

    Now, whenever you want to update to the latest NC version, just do steps (3) and (4).

    In case you also want to get repo updates from GitHub:

    git reset HEAD --hard
    git pull
    git stash apply  # apply changes in `update.sh` from stash
    ./update.sh
    # insert your build command from step 4 here
    

    And yes, if you feel too lazy for that and just need a fairly recent amd64 image for your Syno box or whatever and consider me a trustworthy source for docker images, feel free to just use my milux/nextcloud:[25/26/27].
    Built on my Ubuntu machine, no modifications except base image as described above.

  26. unpinned this issue on Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions