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

occ file scan on some big file failed #26516

Closed
zjsywcc opened this issue Nov 1, 2016 · 4 comments
Closed

occ file scan on some big file failed #26516

zjsywcc opened this issue Nov 1, 2016 · 4 comments

Comments

@zjsywcc
Copy link

zjsywcc commented Nov 1, 2016

Steps to reproduce

  1. sudo -u apache php /var/www/html/owncloud/occ files:scan [my user name]
  2. threre is a big file aroud 4.1 g in my folder

Expected behaviour

should be added in database

Actual behaviour

error trace back:
Exception while scanning: filemtime(): stat failed for /var/www/html/owncloud/data/[my user name]/files/bigfile.mkv
#0 [internal function]: OCA\Files\Command\Scan->exceptionErrorHandler(2, 'filemtime(): st...', '/var/www/html/o...', 176, Array)
#1 /var/www/html/owncloud/lib/private/Files/Storage/Local.php(176): filemtime('/var/www/html/o...')
#2 /var/www/html/owncloud/lib/private/Files/Storage/Common.php(645): OC\Files\Storage\Local->filemtime('files/bigfile.m...')
#3 /var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Encryption.php(172): OC\Files\Storage\Common->getMetaData('files/bigfile.m...')
#4 /var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php(572): OC\Files\Storage\Wrapper\Encryption->getMetaData('files/bigfile.m...')
#5 /var/www/html/owncloud/lib/private/Files/Cache/Scanner.php(113): OC\Files\Storage\Wrapper\Wrapper->getMetaData('files/bigfile.m...')
#6 /var/www/html/owncloud/lib/private/Files/Cache/Scanner.php(145): OC\Files\Cache\Scanner->getData('files/bigfile.m...')
#7 /var/www/html/owncloud/lib/private/Files/Cache/Scanner.php(409): OC\Files\Cache\Scanner->scanFile('files/bigfile.m...', 3, '2', NULL, true)
#8 /var/www/html/owncloud/lib/private/Files/Cache/Scanner.php(377): OC\Files\Cache\Scanner->handleChildren('files', true, 3, '2', true, 4039431)
#9 /var/www/html/owncloud/lib/private/Files/Cache/Scanner.php(380): OC\Files\Cache\Scanner->scanChildren('files', true, 3, '2', true)
#10 /var/www/html/owncloud/lib/private/Files/Cache/Scanner.php(311): OC\Files\Cache\Scanner->scanChildren('', true, 3, 1, true)
#11 /var/www/html/owncloud/lib/private/Files/Utils/Scanner.php(195): OC\Files\Cache\Scanner->scan('', true, 3)
#12 /var/www/html/owncloud/apps/files/lib/Command/Scan.php(158): OC\Files\Utils\Scanner->scan('/[my user name]')
#13 /var/www/html/owncloud/apps/files/lib/Command/Scan.php(226): OCA\Files\Command\Scan->scanFiles('[my user name]', '/[my user name]', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#14 /var/www/html/owncloud/3rdparty/symfony/console/Command/Command.php(259): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/owncloud/core/Command/Base.php(158): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/owncloud/3rdparty/symfony/console/Application.php(844): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/owncloud/3rdparty/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/owncloud/3rdparty/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/owncloud/lib/private/Console/Application.php(146): Symfony\Component\Console\Application->run(NULL, NULL)
#20 /var/www/html/owncloud/console.php(94): OC\Console\Application->run()
#21 /var/www/html/owncloud/occ(11): require_once('/var/www/html/o...')
#22 {main}

Server configuration

Operating system:
LSB Version: :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.6 (Final)
Release: 6.6
Codename: Final

Web server:
Server version: Apache/2.2.15 (Unix)
Server built: Jul 18 2016 15:21:39

Database:
sqlite3 -version
3.6.20

PHP version:
PHP 5.4.45 (cli) (built: Sep 19 2016 15:19:45)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

ownCloud version: (see ownCloud admin page)
sudo -u apache ./occ -V
ownCloud version 9.1.1

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
rpm --import https://download.owncloud.org/download/repositories/stable/CentOS_6/repodata/repomd.xml.key

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

No errors have been found.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder

 sudo -u apache php occ app:list
Enabled:
  - activity: 2.3.2
  - comments: 0.3.0
  - dav: 0.2.6
  - federatedfilesharing: 0.3.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.10.0
  - files_texteditor: 2.1
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.0
  - notifications: 0.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - files_antivirus
  - files_external
  - user_external
  - user_ldap

The content of config/config.php:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

{
    "system": {
        "updatechecker": false,
        "instanceid": "oc3edj5vgupf",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "[my user name].com",
            "www.[my user name].com"
        ],
        "datadirectory": "\/var\/www\/html\/owncloud\/data",
        "overwrite.cli.url": "http:\/\/[my user name]\/owncloud",
        "dbtype": "sqlite3",
        "version": "9.1.1.3",
        "logtimezone": "UTC",
        "installed": true
    }
}

or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

sudo -u apache php occ ldap:show-config


  [Symfony\Component\Console\Exception\CommandNotFoundException]
  There are no commands defined in the "ldap" namespace.

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

{"reqId":"1LopEr40DXtuBYeBeAo0","remoteAddr":"183.157.160.44","app":"PHP","message":"fopen(\/var\/www\/html\/owncloud\/data\/[my user name]\/files\/bigfile.mkv): failed to open stream: Value too large for defined data type at \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Local.php#278","l
{"reqId":"XB6\/ZEJ\/QBzAUjnUmIX2","remoteAddr":"183.157.162.35","app":"PHP","message":"fopen(\/var\/www\/html\/owncloud\/data\/[my user name]\/files\/bigfile.mkv): failed to open stream: Value too large for defined data type at \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Local.php#278","level":3,"time":"2016-10-31T23:37:59+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/bigfile.mkv","user":"[my user name]"}
{"reqId":"XB6\/ZEJ\/QBzAUjnUmIX2","remoteAddr":"183.157.162.35","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Could not open file\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/html\\\/o...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php\",\"Line\":306,\"User\":\"[my user name]\"}","level":4,"time":"2016-10-31T23:37:59+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/bigfile.mkv","user":"[my user name]"}
{"reqId":"XB6\/ZEJ\/QBzAUjnUmIX2","remoteAddr":"183.157.162.35","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/html\/owncloud\/3rdparty\/sabre\/http\/lib\/Sapi.php:83) at \/var\/www\/html\/owncloud\/3rdparty\/sabre\/http\/lib\/Sapi.php#58","level":3,"time":"2016-10-31T23:37:59+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/bigfile.mkv","user":"[my user name]"}
{"reqId":"XB6\/ZEJ\/QBzAUjnUmIX2","remoteAddr":"183.157.162.35","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/html\/owncloud\/3rdparty\/sabre\/http\/lib\/Sapi.php:83) at \/var\/www\/html\/owncloud\/3rdparty\/sabre\/http\/lib\/Sapi.php#63","level":3,"time":"2016-10-31T23:37:59+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/bigfile.mkv","user":"[my user name]"}
{"reqId":"ypuK9m3G3QqqA9NBvm17","remoteAddr":"183.157.160.58","app":"PHP","message":"filemtime(): stat failed for \/var\/www\/html\/owncloud\/data\/[my user name]\/files\/bigfile.mkv at \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Local.php#176","level":3,"time":"2016-11-01T01:25:28+00:00","method":"POST","url":"\/owncloud\/index.php\/login","user":"[my user name]"}

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@zjsywcc
Copy link
Author

zjsywcc commented Nov 1, 2016

it seems like the file is too large to be processed, so migrate to mysql can solve this?

@zjsywcc
Copy link
Author

zjsywcc commented Nov 1, 2016

after doing some search i found maybe it is because i'm on 32-bit platform

@zjsywcc
Copy link
Author

zjsywcc commented Nov 1, 2016

didn't have this issue on ubuntu 16.04 64 platform, should have looked up in the log file

@lock
Copy link

lock bot commented Jul 31, 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 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants