NextCloud 13.0.0 - OCP\Files\NotFoundException: - ldap user

Nextcloud version: 13.0.0
Operating system and version: Debian 9u3
Apache or nginx version: Nginx 1.10
PHP version 7.0

The issue you are facing:
One particular LDAP user, when logged in is presented with the

Internal Server Error

The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

Technical details

  • Remote Address: 192.168.x.x
  • Request ID: BWlS8vq0rBmXNBPJiHBW

Logged in as a different user and it’s fine.

I’m thinking this may be a memcache issue, but not sure how I can reset/clear it out.

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. Log in with ldap user
  2. Internal error displays
  3. Check log, log generates OCP\Files\NotFoundException error

The output of your Nextcloud log in Admin > Logging:

OCP\Files\NotFoundException: 
/var/www/nextcloud/apps/files/lib/Controller/ViewController.php - line 131: OC_Helper getStorageInfo('/', false)
/var/www/nextcloud/apps/files/lib/Controller/ViewController.php - line 160: OCA\Files\Controller\ViewController->getStorageInfo()
[internal function] OCA\Files\Controller\ViewController->index('', '', NULL, false)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 161: call_user_func_array(Array, Array)
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 91: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files\Controller\ViewController), 'index')
/var/www/nextcloud/lib/private/AppFramework/App.php - line 115: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files\Controller\ViewController), 'index')
/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('ViewController', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
/var/www/nextcloud/lib/private/Route/Router.php - line 297: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
/var/www/nextcloud/lib/base.php - line 998: OC\Route\Router->match('/apps/files/')
/var/www/nextcloud/index.php - line 37: OC handleRequest()
{main}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => 'cloud.domain.tld',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'https://cloud.domain.tld',
  'dbtype' => 'mysql',
  'version' => '13.0.0.14',
  'dbname' => '',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' =>0, 'timeout' => 0.0, ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'mailfromUser',
  'mail_domain' => 'domain.tld',
  'mail_smtphost' => 'mail.domain.tld',
  'mail_smtpport' => '25',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
);

The output of your Apache/nginx/system log in /var/log/____:

I don't see a system log, but here's the error.log output in /var/log/nginx


2018/03/10 09:42:21 [error] 585#585: *629 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /apps/logreader/poll?lastReqId=E04QgWuFoJWVb6s6K9JV HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "cloud.domain.tld"
2018/03/10 09:47:32 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520696851944 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:48:01 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520696881464 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:51:03 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520697063502 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:51:08 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520697068126 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:51:23 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520697083584 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:51:25 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520697085361 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:51:26 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520697086242 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:51:27 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520697087470 HTTP/2.0", host: "cloud.domain.tld"
2018/03/10 09:51:30 [error] 2720#2720: *1 access forbidden by rule, client: 192.168.x.x, server: cloud.domain.tld, request: "GET /data/.ocdata?t=1520697090506 HTTP/2.0", host: "cloud.domain.tld"

Fixed my own issue. After I ran the: sudo -u www-data php occ file:scan --all-users and left it for a day; the new file cache was fixed and errors went away.