Repository navigation
Description
Hi,
This follows the post #7641 closed a little faster in my opinion.
I followed the advice of Dragotin which seemed to indicate that he had to use php-mysqlnd instead php-mysql. But the problem remains!
Here is a complete example of improper transaction log.
An example of local log of unatended sync. This file (02 Love Song.mp3) is stores since a long time, I never touch it. Look the log:
---- --logwindow log ----------------------------------------------------------
.......................
03-17 09:23:58:739 oc_module: owncloud_stat ownclouds:///remote.php/webdav/Partages-Piotr/Musiques/02 Love Song.mp3 called
03-17 09:23:58:739 csync_walker: file: ownclouds:///remote.php/webdav/Partages-Piotr/Musiques/02 Love Song.mp3
03-17 09:23:58:739 csyncdetect_update: ==> file: Partages-Piotr/Musiques/02 Love Song.mp3 - hash 7105420082254617972, mtime: 1370103920, fileId: 0016038550bf3dbe239c8
03-17 09:23:58:739 csyncdetect_update: Database entry found, compare: 1370103920 <-> 1370103920, etag: 531f03373a195 <-> 52d722bcdecd6, inode: 0 <-> 32521574
03-17 09:23:58:739 csyncdetect_update: file: Partages-Piotr/Musiques/02 Love Song.mp3, instruction: INSTRUCTION_EVAL <<=
.................................................................
03-17 09:23:58:767 oc_module: closedir method called 0x608000634820!
03-17 09:23:58:767 csync_ftw: <= Closing walk for ownclouds:///remote.php/webdav with read_from_db 0
03-17 09:23:58:767 csync_update: Update detection for remote replica took 164,71 seconds walking 9437 files.
03-17 09:23:58:767 <<#### Update end #################################################### 168116
.................................................................
03-17 09:23:58:798 csyncmerge_algorithm_visitor: INSTRUCTION_NONE file: Partages-Piotr/Musiques/02 Love Song.mp3
.................................................................
03-17 09:23:58:927 csync_reconcile: Reconciliation for remote replica took 0,08 seconds visiting 9437 files.
03-17 09:23:58:937 Transaction Start "checkConnect"
03-17 09:23:58:937 Columns in the current journal: ("phash", "pathlen", "path", "inode", "uid", "gid", "mode", "modtime", "type", "md5", "fileid")
03-17 09:24:02:769 \* csync thread started
03-17 09:24:02:769 Folder in overallStatus Message: Mirall::Folder(0x104135150) with name "ownCloud"
03-17 09:24:02:770 Sync state changed for folder "ownCloud" : "Sync Running"
03-17 09:24:02:770 SocketApi: Sync state changed
03-17 09:24:02:771 SocketApi: Broadcasting to 0 listeners: "UPDATE_VIEW"
03-17 09:23:58:987 N------N Network Limits changed!
03-17 09:23:58:997 "INSERT OR REPLACE INTO downloadinfo (path, tmpfile, etag, errorcount) VALUES ( ? , ?, ? , ? )" "Partages-Piotr/Musiques/02 Love Song.mp3" "Partages-Piotr/Musiques/.02 Love Song.mp3.~41a7" "531f03373a195" 0
03-17 09:23:58:997 Transaction Start "download file start"
03-17 09:23:59:184 Content encoding ist with status 200
03-17 09:24:14:102 !!! Mirall::CheckQuotaJob created for QUrl( "https://" ) querying "/"
03-17 09:24:14:141 "INSERT OR REPLACE INTO metadata (phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid) VALUES ( ? , ?, ? , ? , ? , ? , ?, ? , ? , ?, ? )" 7105420082254617972 40 "Partages-Piotr/Musiques/02 Love Song.mp3" 32523501 0 0 0 "1370103920" "0" "531f03373a195" "0016038550bf3dbe239c8"
03-17 09:24:14:141 "DELETE FROM downloadinfo WHERE path=?" "Partages-Piotr/Musiques/02 Love Song.mp3"
03-17 09:24:14:141 Transaction Start "download file start2"
03-17 09:24:14:142 void Mirall::CSyncThread::transferCompleted(const Mirall::SyncFileItem&) "Partages-Piotr/Musiques/02 Love Song.mp3" 4 ""
.................................................................
---- End of --logwindow log ------------------------------------------------
If I understand something to this log:
1- a different checksum is found ==> NSTRUCTION_EVAL
2- the évaluation give ==> "csyncmerge_algorithm_visitor: INSTRUCTION_NONE"
3- but, in fact, it download the file...
Take a look to this file on my computer:
$ ls -l OwnCloud_plm/Partages-Piotr/Musiques/02\ Love\ Song.mp3
-rw-r--r-- 1 piotr ird 1361559 1 jui 2013 /Users/Shared/OwnCloud_plm/Partages-Piotr/Musiques/02 Love Song.mp3
$ md5 OwnCloud_plm/Partages-Piotr/Musiques/02\ Love\ Song.mp3
MD5 (OwnCloud_plm/Partages-Piotr/Musiques/02 Love Song.mp3) = 46d9037a3dc7c8c6c3321a69b878a125
And this file on our server:
# ls -la files/Partages-Piotr/Musiques/02\ Love\ Song.mp3
-rw-r--r-- 1 www-data www-data 1361559 juin 1 2013 files/Partages-Piotr/Musiques/02 Love Song.mp3
# md5sum files/Partages-Piotr/Musiques/02\ Love\ Song.mp3
46d9037a3dc7c8c6c3321a69b878a125 files/Partages-Piotr/Musiques/02 Love Song.mp3
As you can see, their is no differences between theese files!
Their is no log in "owncloud.log" file after "2014-03-17T08:19:29+00:00" and this sync start at "03-17 09:23:58:739".
And it's the case for 555 Mb which are not really different...
I don't understand! If these log can help you... I can also check the MySQL datables but I don't know where to see.
Best whishes
Activity
karlitschek commentedon Mar 18, 2014
@dragotin Any idea?
PVince81 commentedon Mar 18, 2014
@piotr58 in your original post I saw you were using OC 6.0.1. and the sync client 1.5.2
Have you tried upgrading to OC 6.0.2 and the sync client 1.5.3 ?
PVince81 commentedon Mar 18, 2014
Note: the php-mysqlnd change mentionned in the other post was a mistake and intended for a different report, see #7641 (comment)
dragotin commentedon Mar 18, 2014
see in the logfile:
03-17 09:23:58:739 csyncdetect_update: Database entry found, compare: 1370103920 <-> 1370103920, etag: 531f03373a195 <-> 52d722bcdecd6, inode: 0 <-> 32521574while analyzing the remote repository, which is the one on the server.
That shows that the server reports a different ETag than the one the client knows for the file. That happens if the file on the server changed, which results in a download. Exactly what you experience. The empty inode is ok for the server walkthrough.
But why does the server deliver a different ETag? Was the filecache on the server rebuild? Is the file on an external storage which changed? Is the file a long term resident on your ownCloud and the server db is not consistent? @PVince81 can that happen? In that case, the rebuild of the fs-cache could help, but lets please follow @PVince81 advice on that.
Does the download happen once or all the time?
piotr58 commentedon Mar 18, 2014
@PVince81 "Have you tried upgrading to OC 6.0.2 and the sync client 1.5.3 ?"
Yes, I have update the server to 6.0.2 and my client is effectively 1.5.3 for Mac OS X.
When I leave my home this morning OC sync 1.2 Gb, this evening 2.3 Gb... It never stop.
After the suggestion of php_myslnd, as I would to test from scratch, I erase my local home repository and rebuild it to a new local directory from file stored on OC server. So, after that, their is no "zombies" like ".csync..." or else.
piotr58 commentedon Mar 18, 2014
@dragotin
Nobody, even me has touch any file. I was away today and, at night, I sleep :-)
The filecache was not rebuild
The file is not change and on a local FS
I'll wait advice from PVince81
All the time
Thanks
PVince81 commentedon Mar 18, 2014
Does it redownload all the files or just a few of them ?
PVince81 commentedon Mar 18, 2014
Ok, on your other post you said everything.
I still have no clue what is happening here or what could trigger this.
Are you using the external storage app ?
Did you set a quota ? Maybe disable it if you have one.
In another post you mentionned that you had "numbers", "notes", etcs files. Maybe you can try remove them all from ownCloud and see if the problem persists (in case it's related somehow, who knows...).
Another idea to try: remove all files from your ownCloud and just upload one or two, that might help finding out what happens on a smaller set of files.
If you don't want to remove them all, you can create a separate test user and do the sync test with 1-2 files with that user.
Here is the idea:
owncloud --confdir /path/to/configdir --logfile /path/to/logfile.logto have a separate config)If the sync client redownloads them, then do the following:
select * from oc_storages, find the "numeric_id" of the test user.select * from oc_filecache where storage = %numeric_id% order by path(replace the "%numeric_id%" with the id from before.Post the result here.
This way we can compare what happens before and after.
But from what I understand, there must be something in-between that modifies the etags directly on the server.
If the sync client works correctly, then increase the number of files and see when the redownloading starts happening.
Maybe we can find a pattern.
Thanks.
PVince81 commentedon Mar 18, 2014
Would also be good to see the logs (server log, sync log) at steps 3 and 5 (between sync client runs).
I asked you to use less files because with too many files it will be hard to read the logs.
Thanks.
piotr58 commentedon Mar 20, 2014
@PVince81 Thanks for all these advises. I'll try then as far I can, I would not be home until Friday...
Meanwhile, I noticed that the same repository does not have the same fault when I am on my computer at work ... I have the same set: iMac, Mac OS X 10.9, OC 1.5.3, even I synchronizes user rsync, .... The only difference is that my work computer is connected to the same network than the server.
I tried, last night, to replace the deposit of my home configuration with the one of my work computer. Both deposit are stored outside of my home directory (/Users/Shared/OwnCloud_PLM) but they are on the same disk than home directory, not an external one. I created a tar archive of work deposit and I have installed in my home in the house.
Initially, after the analysis phase of the customer OC, I really thought have passed since only new files created during the day have been added :-) But it did not last :-(. Approximately half hour, OC decided to take the entire deposit (3.1 GB) and started ballet.
I have the log file since I launched OC mod "logWindow" but it is heavy and I do not want to clutter the list.
A question: were is stored this log file? Is it a way to force OC to write a log file?
Best whishes
PVince81 commentedon Mar 20, 2014
Like I said above, you need to run the client as follows:
owncloud --confdir /path/to/configdir --logfile /path/to/logfile.logIt will create the log file in the specified location.
Yes, to avoid a huge log file it would be better to do a test with very few files so we can maybe have a look at the DB for these files.
piotr58 commentedon Mar 21, 2014
@PVince81
Ok RTFM, I should read this link: http://doc.owncloud.org/desktop/1.5/advancedusage.html
On Mac OS X, it could also be:
open -a /Applications/owncloud.app --args --confdir /path/to/configdir --logfile /path/to/logfile.logI have trying your suggestion and create a test user at work last afternoon, test it at home last evening and let it synchronize all night. This is a local user (not LDAP one), basic quota (500 Mb) with about 165 Mb of images files (.jpg) and music (.mp3).
Their is no problems:
I'll let it this week-end and see.
At least I don't uderstand problems with iWork's pseudo file (Pages, Numbers, Keynotes). This is only a directory storage (a little bit like OpenOffice old documents) in place of archive one with all coponents of document (XML, data, description, …). In my opinion, it's not a good idea because if one of theses files is corrupted or erasing, the document is corrupted and no one can suppose it. But their is no special file or attributes in this system. Take a look of the file structure I add at the end of this message.
I'll also test your other suggests.
No
Yes, a specific one (défaut 512 Mb, mine 10 Gb) I'll try this we also.
A question:
I use my LDAP account to test OC since OC 4. We have had an huge problem with LDAP user references when UUID were gave in place of UID. All our accounts became UUID on a simple update from 4.5 to 5.
My question is: is our MySQL DB could be corrupted?
May I can clean all references of my deposit on
oc_filecache?Or erase all references of my account in all table? you must help me to do that...
Thanks
PS:
Structure of Numbers file "Piles.numbers":
And about specials attributs:
PVince81 commentedon Mar 21, 2014
@piotr58 please don't mix different issues here.
For the "numbers" information, please post it in #7103
Let's focus on the syncing problem of regular files here.
If the syncing works properly with a local user, then next step is doing the same with a LDAP user. I don't see why it would make a difference, but let's test it still to be sure.
Please post the result for this, and replace "username" with the user.
select * from oc_storages where id like '%username%';Do this for:
piotr58 commentedon Mar 22, 2014
@PVince81 Thanks
I have an other LDAP account which were never be used :-)
This give only the line with "numeric_id" corresponding to the string "home:<LDAP_UUID>". I thing you want the:
select * from oc_filecache where storage = %numeric_id% order by path;for each account?
The test LDAP account with the same set of data seem to work. I'll let it live during this night.
Follow the link to get the test non-LDAP account filecache DB result file: oc_filecache-testpiotr.txt (*)
Follow the link to get the test LDAP account filecache DB result file:oc_filecache-espace_plm.txt (*)
Here, their is an strange thing! The "numeric_id" in "oc_storage" corresponding to LDAP_UUID account (home::<MY_LDAP_UUID>) have no file in "oc_filecache". But their an other "numeric_id" which have an other string (local::<OC_BASE_DIRECTORY>/owncloud/data/<MY_EMAIL>/) seem to refer to my deposits... I have expuged this file of any too personal references...
You can download it: oc_filecache-espace_mtd-expurgé.txt (*)
Tell me if it's not you had expect.
Thanks
(*) : The link to shared file can't be access after 2014-03-26.
piotr58 commentedon Mar 23, 2014
@PVince81 Hi,
After our test, it seem that all new accounts are normal. Only my "old" LDAP account have problems. I ask my collègues who also test OC with their LDAP account, they don't have problems. That's true they don't test OC with a lot of move...
It's very important the actual pb can be solved. We are just to purpose this solution to our institute. We have now storage space and it will be very bad if some other users have problems like me. I must know if the origin is that I have too much test and corrupt my account or if it's a structural bug. And, at least, I must know how to solve it.
I have a question and suggestion:
If I understand, the only difference between tests configuration is my real LDAP account have a strange reference in MySQL DB attached with OC. It's true I have use this account to do all OC tests since OC 4.
So, my question:
Is it possible my account reference can be broken on MySQL DB?
And my suggestion:
Is it a way if I erase all references of my real LDAP account in DB in these table:
If this scenario is good, I'll need your help because I don't want to brake anything...
Best whishes
PS:
(*) in 'oc_storage', I have other records with number with 'Id' (eg: 209b4b7e5f703f9b4795828a2757fad8). It's not on UUID format (eg: de38957a-6dcf-1032-8350-75b60456a2b0). Is it normal?
PVince81 commentedon Mar 24, 2014
Hi @piotr58, it seems you're onto something, and this looks like the issue described here: #6493 (comment)
The issue you're having with the "oc_storages" ids is a known issue that can happen in the following conditions:
and
As you saw there were some hard-coded paths for your "buggy" user.
The correct/new format for the storage id is "home::UUID".
This issue isn't specific to LDAP and could happen to legacy non-LDAP users as well.
The logic used by OC to find the matching "oc_storage" entry is as follows:
If you changed the $datadir in config.php then 1) will always fail, so it goes to 2) and since it doesn't exist it creates it.
You said that your "buggy" user has two entries:
a) "local::$datadir/piotr"
b) "home::piotr"
You said that a) has entries in the "oc_filecache" but b) doesn't.
So I suggest that you delete the "home::piotr" entry in "oc_storages", then rename "local::$datadir/piotr" to "home::piotr" in the "oc_storages" table. This should fix your particular user and avoid losing any shares you might have.
Whenever "home::$userid" becomes too long, the $userid is replaced with a hash based on the $userid.
Hope this helps.
If after fixing your user, syncing works correctly, then let's mark this as duplicate of #6493
PVince81 commentedon Apr 10, 2014
@piotr58 any update on your situation ?
I believe that newly created users won't be affected by the issue and should sync normally.
PVince81 commentedon Apr 10, 2014
Closing as duplicate of #6493
If the sync issue still happens with newly created users, feel free to reopen.