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

NC Client Uploading some files - Error Could not resolve filesService! Class filesService does not exist #9351

Closed
warnerbryce opened this issue Apr 30, 2018 · 11 comments

Comments

@warnerbryce
Copy link

warnerbryce commented Apr 30, 2018

Steps to reproduce

  1. Having NC 13 with or without Redis-Caching/Locking
  2. On a computer add a new folder with some files inside to the Nextcloud Sync Folder
  3. Wait for Nextcloud to sync the folder on the NC Server

Expected behaviour

Normally you should get a sync without error.

Actual behaviour

Some randomly files get reds with Errors... Waiting that your sync is over to get clues, but the next sync will bring those crashed files into a welly synced files... It's anoying because the user get lost about this state and don't know if the client works well.

Server configuration detail

Operating system: Linux 4.4.0-121-generic #145-Ubuntu SMP Fri Apr 13 13:47:23 UTC 2018 x86_64
4Cores - 16Go of RAM

Webserver: Apache/2.4.18 (Ubuntu) (apache2handler)

Database: mysql 10.2.14 - MariaDB

PHP version: 7.0.28-0ubuntu0.16.04.1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, json, exif, mcrypt, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 13.0.2 - 13.0.2.1

Updated from an older Nextcloud/ownCloud or fresh install:
Updated form 13.0.1 - just a fresh install the bug was present on this version too

Where did you install Nextcloud from: .zip file from the website

List of activated apps
Enabled:
 - activity: 2.6.1
 - bruteforcesettings: 1.0.3
 - calendar: 1.6.1
 - camerarawpreviews: 0.5.2
 - caniupdate: 0.1.2
 - comments: 1.3.0
 - contacts: 2.1.3
 - dashboard: 4.0.6
 - dav: 1.4.6
 - federatedfilesharing: 1.3.1
 - federation: 1.3.0
 - files: 1.8.0
 - files_downloadactivity: 1.2.0
 - files_pdfviewer: 1.2.1
 - files_rightclick: 0.6.0
 - files_sharing: 1.5.0
 - files_texteditor: 2.5.1
 - files_trashbin: 1.3.0
 - files_versions: 1.6.0
 - files_videoplayer: 1.2.0
 - firstrunwizard: 2.2.1
 - gallery: 18.0.0
 - impersonate: 1.0.4
 - issuetemplate: 0.3.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.1.0
 - nextcloud_announcements: 1.2.0
 - notifications: 2.1.2
 - oauth2: 1.1.0
 - password_policy: 1.3.0
 - polls: 0.8.1
 - previewgenerator: 1.0.9
 - provisioning_api: 1.3.0
 - quota_warning: 1.2.0
 - richdocuments: 2.0.8
 - serverinfo: 1.3.0
 - sharebymail: 1.3.0
 - spreed: 3.1.0
 - survey_client: 1.1.0
 - systemtags: 1.3.0
 - theming: 1.4.1
 - twofactor_backupcodes: 1.2.3
 - twofactor_totp: 1.4.1
 - updatenotification: 1.3.0
 - workflowengine: 1.3.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - groupfolders
 - ojsxc
 - user_external
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "SECRET",
        ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "SECRET",
    "dbtype": "mysql",
    "version": "13.0.2.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "maintenance": false,
    "htaccess.RewriteBase": "\/",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "theme": "",
    "loglevel": 2,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "filelocking.enabled": "true",
    "redis": {
        "host": "localhost",
        "port": 6379,
        "timeout": 0
    }
}

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

Logs :
{"reqId":"WJSH3j9VOki8a3KF5BRM","level":3,"time":"2018-04-27T16:38:44+00:00","remoteAddr":"10.114.45.5","user":"USER","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/USER/images/Nouveau%20dossier/IMGP3441.JPG","message":"Exception: {"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve filesService! Class filesService does not exist","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php(118): OC\\AppFramework\\Utility\\SimpleContainer->resolve('filesService')
#1 \/var\/www\/nextcloud\/lib\/private\/ServerContainer.php(132): OC\\AppFramework\\Utility\\SimpleContainer->query('filesService')
#2 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/DependencyInjection\/DIContainer.php(441): OC\\ServerContainer->query('filesService')
#3 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php(74): OC\\AppFramework\\DependencyInjection\\DIContainer->query('filesService')
#4 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php(97): OC\\AppFramework\\Utility\\SimpleContainer->buildClass(Object(ReflectionClass))
#5 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php(118): OC\\AppFramework\\Utility\\SimpleContainer->resolve('OCA\\\\Files_FullT...')
#6 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/DependencyInjection\/DIContainer.php(467): OC\\AppFramework\\Utility\\SimpleContainer->query('OCA\\\\Files_FullT...')
#7 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/DependencyInjection\/DIContainer.php(438): OC\\AppFramework\\DependencyInjection\\DIContainer->queryNoFallback('OCA\\\\Files_FullT...')
#8 \/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Hooks\/FilesHooks.php(52): OC\\AppFramework\\DependencyInjection\\DIContainer->query('OCA\\\\Files_FullT...')
#9 \/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Hooks\/FilesHooks.php(66): OCA\\Files_FullTextSearch\\Hooks\\FilesHooks::getController()
#10 \/var\/www\/nextcloud\/lib\/private\/legacy\/hook.php(106): OCA\\Files_FullTextSearch\\Hooks\\FilesHooks::onNewFile(Array)
#11 \/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php(309): OC_Hook::emit('OC_Filesystem', 'post_create', Array)
#12 \/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php(241): OCA\\DAV\\Connector\\Sabre\\File->emitPostHooks(false)
#13 \/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(151): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #22)
#14 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1096): OCA\\DAV\\Connector\\Sabre\\Directory->createFile('IMGP3441.JPG', Resource id #22)
#15 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(525): Sabre\\DAV\\Server->createFile('files\/USER..', Resource id #22, NULL)
#16 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))
#17 \/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#18 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)
#19 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))
#20 \/var\/www\/nextcloud\/apps\/dav\/lib\/Server.php(283): Sabre\\DAV\\Server->exec()
#21 \/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php(35): OCA\\DAV\\Server->exec()
#22 \/var\/www\/nextcloud\/remote.php(164): require_once('\/var\/www\/nextcl...')
#23 {main}","File":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","Line":103}","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)","version":"13.0.2.1"}

@warnerbryce
Copy link
Author

warnerbryce commented Apr 30, 2018

I have a similar Nextcloud Server with quite the same config file but with less RAM and i don't have this kind of errors.
Could you help me to see if i have to do some tunning on the server ?
My other server who don't have problem having only 4GB of RAM but don't have a lot of cached mem, wheras the problematic server have 12GB of cached mem...

On the client Side i got this error log :
Error Transferring https://URL of the file ... server replied : Internal Server Error (An exception occurred while executing 'INSERT INTO' 'oc_filecache' ('mimepart','mimetype','mtime','size','etag','storage_mtime','premission'... SQLSTATE[40001]: Serialization Faillure: 1213 Deadlock found when trying to get lock; try restarting transaction)

@rullzer
Copy link
Member

rullzer commented May 1, 2018

This seems to be caused by files_fulltextsearch.
Please submit to https://github.com/nextcloud/files_fulltextsearch

@rullzer rullzer closed this as completed May 1, 2018
@warnerbryce
Copy link
Author

No it is not.
I had this problem before activating the full text search beta app.

I delete it and retry, nothing get better... so it isn’t closed.

@rullzer
Copy link
Member

rullzer commented May 1, 2018

That can't be the same issue. As your log shows it is looking for a class from the fulltextsearch app.

/var/www/nextcloud/apps/files_fulltextsearch/lib/Hooks/FilesHooks.php(52): OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\Files_FullT...')

@warnerbryce
Copy link
Author

warnerbryce commented May 1, 2018

No here is the logs i got without full text search beta


{"reqId":"cXninaVmj04X3oCNHtdv","level":4,"time":"2018-05-08T13:51:19+00:00","remoteAddr":"10.114.45.5","user":"USER","app":"webdav","method":"MKCOL","url":"\/remote.php\/dav\/uploads\/USER\/638489116","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`parent`,`checksum`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params [\\\"1\\\", \\\"2\\\", 1525787468, -1, \\\"5af1ab56cc0b6\\\", 1525787468, 31, 727140, \\\"\\\", \\\"e5017d851f0ff9350548ee6ec8aa2bd0\\\", \\\"uploads\\\\\\\/638489116\\\", \\\"638489116\\\", 27, 27, \\\"e5017d851f0ff9350548ee6ec8aa2bd0\\\"]:\
\SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\
#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(1015): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'INSERT INTO `oc...', Array)\
#2 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(216): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\
#3 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Adapter.php(114): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO `oc...', Array)\
#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(254): OC\\\\DB\\\\Adapter->insertIfNotExist('*PREFIX*filecac...', Array, Array)\
#5 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Cache.php(273): OC\\\\DB\\\\Connection->insertIfNotExist('*PREFIX*filecac...', Array, Array)\
#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Cache.php(230): OC\\\\Files\\\\Cache\\\\Cache->insert('uploads\\\/6384891...', Array)\
#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Scanner.php(292): OC\\\\Files\\\\Cache\\\\Cache->put('uploads\\\/6384891...', Array)\
#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Scanner.php(221): OC\\\\Files\\\\Cache\\\\Scanner->addToCache('uploads\\\/6384891...', Array, -1)\
#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Scanner.php(335): OC\\\\Files\\\\Cache\\\\Scanner->scanFile('uploads\\\/6384891...', 3, 727140, false, false)\
#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Updater.php(124): OC\\\\Files\\\\Cache\\\\Scanner->scan('uploads\\\/6384891...', false, 3, false)\
#11 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(319): OC\\\\Files\\\\Cache\\\\Updater->update('uploads\\\/6384891...', 1525787478)\
#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1163): OC\\\\Files\\\\View->writeUpdate(Object(OCA\\\\Files_Trashbin\\\\Storage), 'uploads\\\/6384891...')\
#13 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(267): OC\\\\Files\\\\View->basicOperation('mkdir', '\\\/638489116', Array)\
#14 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(180): OC\\\\Files\\\\View->mkdir('\\\/\\\/638489116')\
#15 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Upload\\\/UploadHome.php(47): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createDirectory('638489116')\
#16 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1210): OCA\\\\DAV\\\\Upload\\\\UploadHome->createDirectory('638489116')\
#17 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(590): Sabre\\\\DAV\\\\Server->createCollection('uploads\\\/Service...', Object(Sabre\\\\DAV\\\\MkCol))\
#18 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpMkcol(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\
#19 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\
#20 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:MKCOL', Array)\
#21 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\
#22 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(283): Sabre\\\\DAV\\\\Server->exec()\
#23 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(35): OCA\\\\DAV\\\\Server->exec()\
#24 \\\/var\\\/www\\\/nextcloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/nextcl...')\
#25 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":115}","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.2.1"}

@warnerbryce
Copy link
Author

It looks like deadlock in oc filecache but i don’t know how to trigger it correctly...
After another sync no problem but it’s very anoying

@rullzer
Copy link
Member

rullzer commented May 1, 2018

Well see that is a totally different error.

@icewind1991 any idea^^

@rullzer rullzer reopened this May 1, 2018
@warnerbryce
Copy link
Author

(pray) Hope dev team or helpful people could find what's going wrong with this Nextcloud instance.

@warnerbryce
Copy link
Author

Little UP,
As seen on several topics about deadlock nothing helped me,
I am in the good
+-----------------------+----------------+
| @@GLOBAL.tx_isolation | @@tx_isolation |
+-----------------------+----------------+
| READ-COMMITTED | READ-COMMITTED |
+-----------------------+----------------+
for my MariaDB InnoBD.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@nextcloud-bot
Copy link
Member

Hey, this issue has been closed because the label stale is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jul 5, 2018
@familyman-131
Copy link

have exact bug when sync 50Gb folder with 6,5k files

on almost exact config except 13.0.4.0 , php 7.1 , nginx
fresh install
have read and seems done all from https://docs.nextcloud.com/server/13/admin_manual/configuration_server/caching_configuration.html#cache-directory-location

  'filelocking.enabled' => false,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
# redis-cli
127.0.0.1:6379> info keyspace
# Keyspace
db0:keys=850,expires=457,avg_ttl=1640924
MariaDB [(none)]> SHOW VARIABLES LIKE '%tx_isolation%';
+---------------+----------------+
| Variable_name | Value          |
+---------------+----------------+
| tx_isolation  | READ-COMMITTED |
+---------------+----------------+
1 row in set (0.01 sec)
[mysqld]
...
transaction_isolation       = READ-COMMITTED
expire_logs_days            = 1
max_binlog_size             = 100M
binlog_format = ROW
skip-log-bin
...

have free memory and CPU resources on server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants