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

Not syncing with S3 after upgrade to 12.0.0 #5101

Closed
judgej opened this issue May 24, 2017 · 3 comments
Closed

Not syncing with S3 after upgrade to 12.0.0 #5101

judgej opened this issue May 24, 2017 · 3 comments

Comments

@judgej
Copy link

judgej commented May 24, 2017

Steps to reproduce

  1. Installed 11.0.0 intially
  2. Took online upgrades through 11.0.5(?) to 12.0.0
  3. Amazon S3 external storage is showing no files.
  4. Adding a file does show up in the bucket when looked at through the Amazon control panel.

Expected behaviour

Let's see the files on S3! I've got 5000 of the, in 169 diectories, nested four deep.

Actual behaviour

As described above.

Server configuration

Operating system: Linux

Web server: CentOS

Database: MySQL

PHP version: 5.6 FastCGI

Nextcloud version: 12.0.0

Updated from an older Nextcloud/ownCloud or fresh install: 11.0.0

Where did you install Nextcloud from: Initially the single PHP script through the web browser. The update through the web browser too.

Okay - getting bored now, and I need to go. I'll post the logged message further down.

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

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

Nextcloud configuration:

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

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

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)

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

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

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

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

a) The javascript console log
b) The network log
c) ...

This shows up in the log entries for each time I try to view the S2 external storage files:

Undefined index: lastmodified at /var/www/vhosts/my-web-root/apps/files_external/lib/Lib/Storage/AmazonS3.php#273

^^ I'm guessing this is the key point, and I can supply further details on request.

@judgej
Copy link
Author

judgej commented May 25, 2017

Changing this bit of code where the error is reported gets the files displaying again:

				$stat['size'] = $result['ContentLength'] ? $result['ContentLength'] : 0;
				if ($result['Metadata']['lastmodified']) {
					$stat['mtime'] = strtotime($result['Metadata']['lastmodified']);
				} else {
					$stat['mtime'] = strtotime($result['LastModified']);
				}

to

				$stat['size'] = $result['ContentLength'] ? $result['ContentLength'] : 0;
				if (! empty($result['Metadata']['lastmodified'])) { // catch not set as well as not true
					$stat['mtime'] = strtotime($result['Metadata']['lastmodified']);
				} else {
					$stat['mtime'] = strtotime($result['LastModified']);
				}

Refreshing S3 file lists when they change is still not working though - seems like it caches the files forever, even when I flush the cache, but I think that's a problem for another issue.

@judgej
Copy link
Author

judgej commented May 25, 2017

Oh, issue #3673 says that nothing should touch the bucket other than Nextcloud. Wasn't expecting that. I thought it could be used as an external service in the same way that an external local file system could be used to dump files into. Guess I'm going to have to rethink how I use this tool.

@MorrisJobke
Copy link
Member

Oh, issue #3673 says that nothing should touch the bucket other than Nextcloud. Wasn't expecting that. I thought it could be used as an external service in the same way that an external local file system could be used to dump files into. Guess I'm going to have to rethink how I use this tool.

Correct. It is only used with file IDs for example and Nextcloud will not detect changes, because this would cause a whole new set of problems.

Closing this.

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

No branches or pull requests

3 participants