[SOLVED][php+owncloud] Could not gather sufficient random...

Problems with packages? Post here, using [tags] of the package name.

[SOLVED][php+owncloud] Could not gather sufficient random...

Postby mrohnstock » Wed Feb 15, 2017 11:27 am

(I've submitted this issue to bugs.archlinux.org, too, but I think this is only arm specific, as it worked flawless with the server at work, using x86_64 archlinux ...)

After updating php from 7.1.1 to 7.1.2 and restarting php-fpm and nginx the following error occurred and owncloud won't start (log from nginx's error.log):

Code: Select all
2017/02/15 10:16:26 [error] 21589#21589: *557 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Exception: Could not gather sufficient random data in /usr/share/webapps/owncloud/lib/private/Security/SecureRandom.php:80
Stack trace:
#0 /usr/share/webapps/owncloud/lib/private/Security/SecureRandom.php(80): random_int(0, 63)
#1 /usr/share/webapps/owncloud/lib/private/Security/Crypto.php(94): OC\Security\SecureRandom->generate(16)
#2 /usr/share/webapps/owncloud/lib/private/Session/CryptoSessionData.php(162): OC\Security\Crypto->encrypt('{"LAST_ACTIVITY...', 'yQU2DBdBseipjD7...')
#3 /usr/share/webapps/owncloud/lib/private/Session/CryptoSessionData.php(66): OC\Session\CryptoSessionData->close()
#4 [internal function]: OC\Session\CryptoSessionData->__destruct()
#5 {main}
thrown in /usr/share/webapps/owncloud/lib/private/Security/SecureRandom.php on line 80" while reading upstream, client: 217.240.103.192, server: example.com, request: "PROPFIND /remote.php/webdav/ HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "example.com"


Restarting php-fpm and nginx won't help. Switching back to 7.1.1-1 solved the issue.

Additional info:
* system: odroid-xu3 (armv7)
* kernel: linux-odroid-xu3 3.10.104-6
* php 7.1.2-1
* nginx 1.10.3-2
* owncloud 9.1.3-2

Steps to reproduce:
1. install & config owncloud and nginx
2. install php
3. profit from the error.

Is anyone else having this issue?
Last edited by mrohnstock on Tue Mar 21, 2017 7:39 am, edited 1 time in total.
mrohnstock
 
Posts: 15
Joined: Thu Mar 03, 2016 12:30 pm

Re: [php][owncloud] Could not gather sufficient random data

Postby slydder » Wed Feb 15, 2017 12:51 pm

The same issue appears for me as well on an Odroid c1.
slydder
 
Posts: 28
Joined: Sat Dec 05, 2015 11:40 am

Re: [php][owncloud] Could not gather sufficient random data

Postby moonman » Wed Feb 15, 2017 7:35 pm

You just need more entropy, does not seem like a bug to me.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3304
Joined: Sat Jan 15, 2011 3:36 am

Re: [php][owncloud] Could not gather sufficient random data

Postby benjarobin » Wed Feb 15, 2017 9:21 pm

Nope, this is a "bug" in php 7.1.2

In php 7.1.1 it is using /dev/urandom, but now in php 7.1.2 it is using getrandom().
The problem is that getrandom() was introduced in version 3.17 of the Linux kernel...

The french topic with the same subject: https://forums.archlinux.fr/viewtopic.php?f=5&t=18917
benjarobin
 
Posts: 1
Joined: Wed Feb 15, 2017 9:17 pm

Re: [php][owncloud] Could not gather sufficient random data

Postby rezad » Wed Feb 22, 2017 4:15 am

any body has these packages on cache and can share them?
this bug has messed up a lot of my apps. wallabag, nextcloud and so on
rezad
 
Posts: 19
Joined: Fri Jun 10, 2016 11:28 am

Re: [php][owncloud] Could not gather sufficient random data

Postby TPXP » Sun Mar 12, 2017 3:57 pm

The patch has been merged, the issue will be fixed in PHP 7.1.3. In the meantime, you can use a version I compiled for my own board with the patch. It's armv7h only, use at your own risk : https://www.dropbox.com/sh/u6yib0r3c7h8 ... lJB0a?dl=0

By the way, this version still has failing tests, so some scripts might not behave correctly. See my report about this.
TPXP
 
Posts: 9
Joined: Sun Oct 18, 2015 8:56 am

Re: [php][owncloud] Could not gather sufficient random data

Postby rezad » Mon Mar 13, 2017 4:02 pm

never mind.
I installed the armv7 linux kernel package and it messed up my odroid (wouldn't boot)
so I went and installed the rasbian and stuff like that but at the end got to reinstalling archlinuaarm and then trying again with the 4.10 kernel and it worked.
now I have the same kernel as my laptop :).
and for my normal use it works.

but thanks for providing the packages.
rezad
 
Posts: 19
Joined: Fri Jun 10, 2016 11:28 am


Return to Packages

Who is online

Users browsing this forum: No registered users and 2 guests