-
Notifications
You must be signed in to change notification settings - Fork 244
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
trovebox uploads fail with " Integrity constraint violation:" #1581
Comments
How did you upload the 1.7k photos? |
Yes, there are 1710 photos in the system, I can see their icons and modify titles and descriptions through the web interface, but I can't upload any new photos either through the web interface or through the "import.py" scripts. |
Jaisen, The 7010 photos were uploaded by "import.py" in batches of from 10 .. 250 Adrian footnote: Proof checking of the JSON needed as there are problems with titles and On Tue, Jun 2, 2015 at 2:59 PM, Jaisen Mathai notifications@github.com
Adrian Tritschler |
Can the "migration" email from trovebox.com be found somewhere online? I am using the Amazon Ubuntu Server 14.04 LTS (HVM) image now and I am just curious how to prepare the Amazon Linux AMI 2015.03 (HVM) image so it can run Trovebox. |
Fixed on 02-Jun-2015 with email help from Jaisen: (reply below, with real domains and names repalced by xyz) Thank you. I've not used mysql before (other than to create the database), but some reading of the other github issues and man pages and the following did the trick: mysql> update user set extra='{"lastPhotoId":"1o5","lastActionId":"","lastGroupId":"","lastWebhookId":"","attrtutorialAll":"1","lastActivityId":"17t","attrprofileName":"xyz","attrtutorialPhotos":"4","attrtutorialAlbums":"1","attrtutorialUpload":"2"}' where id='xyz@xyz.com"; Tested it by uploading a photo through the web interface -- went to http://xyz.com/p/1o6 -- then a further two with the import.py script (to URLs ending in 1o7 and 1o8 respectively) |
@joephein The link from the email points to https://trovebox.com/archive/migrate --- We're taking the site offline this weekend :) |
I suspect I've managed to trigger #1471 or #1543, after successfully uploading 1710 photos I'm now unable to upload any more. Troveox is running on a new (four day old) AMI instance that I created following the "migration" email from trovebox.com. Photo imports fail with:
Processing 1 of 1 20120418T115249-200.json ... FAILED: Code 500: Query error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'trovebox@ajft.org-d' for key 'owner' - INSERT INTO
photo
(appId,host,views,status,permission,license,hash,size,filenameOriginal,width,height,dateTaken,dateTakenDay,dateTakenMonth,dateTakenYear,dateUploaded,dateUploadedDay,dateUploadedMonth,dateUploadedYear,pathOriginal,pathBase,description,longitude,latitude,title,rotation,tags,owner,actor,id,exif,dateSortByDay)
VALUES
(:appId,:host,:views,:status,:permission,:license,:hash,:size,:filenameOriginal,:width,:height,:dateTaken,:dateTakenDay,:dateTakenMonth,:dateTakenYear,:dateUploaded,:dateUploadedDay,:dateUploadedMonth,:dateUploadedYear,:pathOriginal,:pathBase,:description,:longitude,:latitude,:title,:rotation,:tags,:owner,:actor,:id,:exif,:dateSortByDay)
Results. Processed: 0. Errored: 1.
DB queries as per $1543 show:
mysql> select count() from photo where owner="trovebox@ajft.org";
+----------+
| count() |
+----------+
| 1710 |
+----------+
1 row in set (0.00 sec)
mysql> select extra from user where id='trovebox@ajft.org';
| {"lastPhotoId":"e","lastActionId":"","lastGroupId":"","lastWebhookId":"","attrtutorialAll":"1","lastActivityId":"ti","attrprofileName":"ajft","attrtutorialPhotos":"4","attrtutorialAlbums":"1","attrtutorialUpload":"2"} |
1 row in set (0.00 sec)
mysql> select id from photo ORDER by dateUploaded DESC LIMIT 1;
+-----+
| id |
+-----+
| 1o1 |
(although 1o5 is the highest I can find when I go to http://.../p/1o1 and press "next" until it stops.)
The text was updated successfully, but these errors were encountered: