Il y a 15 jours, cette commande fonctionnait à merveille.
Aujourd’hui, elle génère cette erreur :
Vérification si la migration par défaut est déjà effectuée...
7 des 14 téléchargements n'ont pas été migrés vers S3. La migration S3 a échoué pour la base de données 'default'.
1 publication n'a pas été redirigée vers la nouvelle URL de téléchargement S3. La migration S3 a échoué pour la base de données 'default'.
Recherche de téléchargements manquants sur : default
Aucun téléchargement de publication n'est manquant.
Aucune publication ne nécessite une nouvelle cuisson (rebaking).
Migration des téléchargements vers S3 pour 'default'...
Certains téléchargements n'ont pas été migrés vers le nouveau schéma. Veuillez exécuter ces commandes dans la console Rails :
SiteSetting.migrate_to_new_scheme = true
Jobs::MigrateUploadScheme.new.execute(nil)
J’ai également exécuté ces deux commandes dans la console Rails, mais elles n’ont semblé apporter aucun bénéfice :
I had a similar problem. It had to do with the path of the uploads not matching what that test expects (like it’s missing ‘default’ in the path of something).
What I did was (in broad and likely unhelpful terms) to see what search is doing to find those uploads that it thinks are bad and fix them
I happen to solve it accidentally and in a way that I’m still not sure how it got solved.
I changed the command a couple of times mostly appending or removing the word ‘dualstack’ in the command and in CDN url field in Discourse Settings: https://bxyzbucket1.s3.dualstack.ap-south-1.amazonaws.com
But still it didn’t seem to work. Then randomly I gave the two same commands (told in the OP) in the rails console once again.
And 1 step I did randomly around this time was append the word /uploads to the bucketname in the command.
And ‘randomly’ (I need another random word here ), I succeeded.
So, I can’t say who was the hero of the resolution here.
Thanks for listening anyway.
Whatever error was coming/showing, I already included in my original post. But I agree that that error/msg wasn’t very helpful in diagnosis.
Alas, today again, I thought since I couldn’t understand the problem in migration, I created 1 upload locally. Then tried to shift that again to S3 with this command:
And though it shifted the 1 new upload to S3, but with this error included:
1 of 14 uploads are not migrated to S3. S3 migration failed for db 'default'.
1 posts are not remapped to new S3 upload URL. S3 migration failed for db 'default'.
What does this error signify? Can it pose some problem if there are thousands of images to be shifted from ‘Local >> S3’? @vinothkannans
I still get the error: " S3 migration failed for db ‘default’"
And although post uploads/images are showing ok in my bucket and on site, but site logos etc (under Admin Settings> Branding) are missing and I’m not even able to update them with fresh ones. They just stay blank.
I also ran (with no errors): rake posts:rebake_uncooked_posts and rake posts:rebake