Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on installing OwnCloud 10.0.6 #30416

Closed
Mephysto666 opened this issue Feb 8, 2018 · 12 comments
Closed

Error on installing OwnCloud 10.0.6 #30416

Mephysto666 opened this issue Feb 8, 2018 · 12 comments
Assignees
Labels
p1-urgent Critical issue, need to consider hotfix with just that issue security server Type:Bug
Milestone

Comments

@Mephysto666
Copy link

Steps to reproduce

  1. Go to Owncloud homepage

Expected behaviour

Showing admin user creation screen

Actual behaviour

cattura

Server configuration

Operating system: Debian 9.1

Web server: Same behavior both with Apache 2.4 and Nginx 1.10.3

Database: Postgres

PHP version: 7.0.27-0+deb9u1

ownCloud version: 10.0.6

Updated from an older ownCloud or fresh install: Fresh install

Where did you install ownCloud from: Manual installation

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:
I can't produce config, I get this error:

Error: Call to a member function getUser() on null in /var/www/html/lib/private/Log.php:295
Stack trace:
#0 /var/www/html/lib/public/Util.php(157): OC\Log->log(3, 'User backend OC...', Array)
#1 /var/www/html/lib/private/legacy/user.php(153): OCP\Util::writeLog('core', 'User backend OC...', 3)
#2 /var/www/html/lib/base.php(657): OC_User::setupBackends()
#3 /var/www/html/lib/base.php(998): OC::init()
#4 /var/www/html/console.php(64): require_once('/var/www/html/l...')
#5 /var/www/html/occ(11): require_once('/var/www/html/c...')

List of activated apps: I can't produce it.


**Are you using external storage, if yes which one:**  nfs

**Are you using encryption:** no

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

#### LDAP configuration (delete this part if not used)
Not configured yet

### Client configuration
**Browser:** Firefox 58

**Operating system:** Windows 10

### Logs
#### Web server error log

2018/02/08 09:21:48 [error] 2071#2071: *47 FastCGI sent in stderr: "PHP message: PHP Warning: hash_equals(): Expected user_string to be a string, null given in /var/www/html/lib/private/Log.php on line 287
PHP message: {"reqId":"ALy7R2TQii6lmIJXRLoS","level":3,"time":"February 08, 2018 09:21:48","remoteAddr":"10.39.0.77","user":"--","app":"index","method":"GET","url":"/index.php","message":"Exception: {"Exception":"Error","Message":"Call to a member function getUser() on null","Code":0,"Trace":"#0 \/var\/www\/html\/lib\/private\/Log.php(169): OC\\Log->log(3, 'session_name():...', Array)\n#1 \/var\/www\/html\/lib\/private\/Log\/ErrorHandler.php(89): OC\\Log->error('session_name():...', Array)\n#2 [internal function]: OC\\Log\\ErrorHandler::onError(2, 'session_name():...', '\/var\/www\/html\/l...', 45, Array)\n#3 \/var\/www\/html\/lib\/private\/Session\/Internal.php(45): session_name('')\n#4 \/var\/www\/html\/lib\/base.php(426): OC\\Session\\Internal->__construct('')\n#5 \/var\/www\/html\/lib\/base.php(582): OC::initSession()\n#6 \/var\/www\/html\/lib\/base.php(998): OC::init()\n#7 \/var\/www\/" while reading response header from upstream, client: 10.39.0.77, server: _, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "10.39.0.222", referrer: "http://10.39.0.222/"
2018/02/08 09:21:48 [error] 2071#2071: *47 FastCGI sent in stderr: "PHP message: {"reqId":"ALy7R2TQii6lmIJXRLoS","level":3,"time":"February 08, 2018 09:21:48","remoteAddr":"10.39.0.77","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"hash_equals(): Expected user_string to be a string, null given at /var/www/html/lib/private/Log.php#287"}" while reading upstream, client: 10.39.0.77, server: _, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "10.39.0.222", referrer: "http://10.39.0.222/"
2018/02/08 09:38:09 [error] 8929#8929: *1 FastCGI sent in stderr: "PHP message: PHP Warning: hash_equals(): Expected user_string to be a string, null given in /var/www/html/lib/private/Log.php on line 287" while reading response header from upstream, client: 10.39.0.77, server: _, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "10.39.0.222"


#### ownCloud log (data/owncloud.log)

{"reqId":"6rJMyma4TOKNickeBMbB","level":3,"time":"February 08, 2018 10:00:34","remoteAddr":"10.39.0.77","user":"--","app":"index","method":"GET","url":"/index.php","message":"Exception: {"Exception":"Error","Message":"Call to a member function getUser() on null","Code":0,"Trace":"#0 \/var\/www\/html\/lib\/private\/Log.php(169): OC\\Log->log(3, 'session_name():...', Array)\n#1 \/var\/www\/html\/lib\/private\/Log\/ErrorHandler.php(89): OC\\Log->error('session_name():...', Array)\n#2 [internal function]: OC\\Log\\ErrorHandler::onError(2, 'session_name():...', '\/var\/www\/html\/l...', 45, Array)\n#3 \/var\/www\/html\/lib\/private\/Session\/Internal.php(45): session_name('')\n#4 \/var\/www\/html\/lib\/base.php(426): OC\\Session\\Internal->__construct('')\n#5 \/var\/www\/html\/lib\/base.php(582): OC::initSession()\n#6 \/var\/www\/html\/lib\/base.php(998): OC::init()\n#7 \/var\/www\/html\/index.php(54): require_once('\/var\/www\/html\/l...')\n#8 {main}","File":"\/var\/www\/html\/lib\/private\/Log.php","Line":295}"}
{"reqId":"6rJMyma4TOKNickeBMbB","level":3,"time":"February 08, 2018 10:00:34","remoteAddr":"10.39.0.77","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"hash_equals(): Expected user_string to be a string, null given at /var/www/html/lib/private/Log.php#287"}


#### Browser log

Error: Call to a member function getUser() on null in /var/www/html/lib/private/Log.php:295 Stack trace: #0 /var/www/html/lib/private/Log.php(169): OC\Log->log(3, 'session_name():...', Array) #1 /var/www/html/lib/private/Log/ErrorHandler.php(89): OC\Log->error('session_name():...', Array) #2 [internal function]: OC\Log\ErrorHandler::onError(2, 'session_name():...', '/var/www/html/l...', 45, Array) #3 /var/www/html/lib/private/Session/Internal.php(45): session_name('') #4 /var/www/html/lib/base.php(426): OC\Session\Internal->__construct('') #5 /var/www/html/lib/base.php(582): OC::initSession() #6 /var/www/html/lib/base.php(998): OC::init() #7 /var/www/html/index.php(54): require_once('/var/www/html/l...') #8 {main}



Can you help me please?

Meph
@PVince81
Copy link
Contributor

PVince81 commented Feb 8, 2018

Thanks for your report.

Closing in favor of #30335 which apparently has the same cause

@PVince81 PVince81 closed this as completed Feb 8, 2018
@PVince81 PVince81 reopened this Feb 8, 2018
@PVince81
Copy link
Contributor

PVince81 commented Feb 8, 2018

seems to be slightly different code.

@sharidas please have a look

@PVince81 PVince81 added this to the development milestone Feb 8, 2018
@PVince81 PVince81 added the p1-urgent Critical issue, need to consider hotfix with just that issue label Feb 8, 2018
@PVince81
Copy link
Contributor

PVince81 commented Feb 9, 2018

@Mephysto666 did you set any conditional log settings in config.php or was this a plain unmodified install ?

@Mephysto666
Copy link
Author

HI @PVince81,
no, I did not touch no log settings.

Bye.

Meph

@VicDeo
Copy link
Member

VicDeo commented Feb 9, 2018

@Mephysto666
according to the log it can't find or load a file with a class that is responsible for user management.

Could you please

  1. Double check ownership/permissions
  2. share an output for php occ integrity:check-core

@Mephysto666
Copy link
Author

Hi @VicDeo,
all files and directories belong to www-data, user and group. Same user and group as nginx and php-fpm processes.

The output of command you suggested is this:

www-data@ftp:~/html$ php occ integrity:check-core
An unhandled exception has been thrown:
Error: Call to a member function getUser() on null in /var/www/html/lib/private/Log.php:295
Stack trace:
#0 /var/www/html/lib/public/Util.php(157): OC\Log->log(3, 'User backend OC...', Array)
#1 /var/www/html/lib/private/legacy/user.php(153): OCP\Util::writeLog('core', 'User backend OC...', 3)
#2 /var/www/html/lib/base.php(657): OC_User::setupBackends()
#3 /var/www/html/lib/base.php(998): OC::init()
#4 /var/www/html/console.php(64): require_once('/var/www/html/l...')
#5 /var/www/html/occ(11): require_once('/var/www/html/c...')
#6 {main}

Same error as before.

Many thanks.

Meph

@VicDeo
Copy link
Member

VicDeo commented Feb 14, 2018

@Mephysto666 could you check what will happen when you replace
/var/www/html/lib/private/Log.php with
https://github.com/owncloud/core/raw/2c449a1dce649da1a4d22cbfbcfbc0c2118cad8b/lib/private/Log.php ?

I suspect there is something wrong with PHP session configuration so logger fails to get a user.
Your owncloud.log might have a clue inside after this patch

@PVince81
Copy link
Contributor

@Mephysto666
Copy link
Author

I can't test it now, but the problem is in config.php of downloaded version of Owncloud.

I used web installation that has a more simple config.php and it had been installed without problems. When I tried to use config.php I used in preceding installation, I econuntered same error.

I hope this is useful for you.

Best regards.

Meph

@VicDeo
Copy link
Member

VicDeo commented Feb 21, 2018

The reason can only be guessed in that case.
I'd suppose that something is wrong with cache setup (Redis or whatever) on your environment.

@PVince81
Copy link
Contributor

please reopen if problem persists with 10.0.7 which contains a fix for null errors

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p1-urgent Critical issue, need to consider hotfix with just that issue security server Type:Bug
Projects
None yet
Development

No branches or pull requests

5 participants