1 de 16551 cargas no se migraron a S3. La migración a S3 falló para la base de datos 'default'

,

Hoy lo intenté una vez más: realicé una instalación limpia y luego restauré desde una copia de seguridad. Mismos errores en todas partes. No hay forma de ver qué 1 medio falta, esto de 1 de 16545 subidas no se migraron a S3. La migración a S3 falló para la base de datos 'default'. me perseguirá.

Subiendo este hilo, tal vez alguien pueda ayudar…

Más información. Esto ocurre en Discourse (en Docker):

root@forum-app:/var/www/discourse# rake uploads:missing
--------------------------------------------------------------------------------
ADVERTENCIA! ADVERTENCIA! ADVERTENCIA!
--------------------------------------------------------------------------------

¡default tiene subidas en S3!
validar sin inventario probablemente tomará una cantidad de tiempo enorme.
Recomendamos ejecutar SKIP_EXTERNAL=1 rake uploads:missing para omitir la validación si está en multisitio.
rake abortado!
PG::SyntaxError: ERROR:  error de sintaxis al final de la entrada
LINE 1: INSERT INTO verified_ids VALUES
                                        ^
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.1.0/lib/patches/db/pg.rb:56:in `exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.1.0/lib/patches/db/pg.rb:56:in `exec'
/var/www/discourse/lib/file_store/s3_store.rb:423:in `list_missing'
/var/www/discourse/lib/file_store/s3_store.rb:303:in `list_missing_uploads'
/var/www/discourse/lib/tasks/uploads.rake:277:in `list_missing_uploads'
/var/www/discourse/lib/tasks/uploads.rake:270:in `block (2 levels) in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:90:in `each_connection'
/var/www/discourse/lib/tasks/uploads.rake:255:in `block in <main>'
/var/www/discourse/lib/tasks/uploads.rake:281:in `block in <main>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => uploads:missing_files
(Ver traza completa ejecutando la tarea con --trace)

y

root@forum-app:/var/www/discourse# rake uploads:missing_files
--------------------------------------------------------------------------------
ADVERTENCIA! ADVERTENCIA! ADVERTENCIA!
--------------------------------------------------------------------------------

¡default tiene subidas en S3!
validar sin inventario probablemente tomará una cantidad de tiempo enorme.
Recomendamos ejecutar SKIP_EXTERNAL=1 rake uploads:missing para omitir la validación si está en multisitio.
rake abortado!
PG::SyntaxError: ERROR:  error de sintaxis al final de la entrada
LINE 1: INSERT INTO verified_ids VALUES
                                        ^
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.1.0/lib/patches/db/pg.rb:56:in `exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.1.0/lib/patches/db/pg.rb:56:in `exec'
/var/www/discourse/lib/file_store/s3_store.rb:423:in `list_missing'
/var/www/discourse/lib/file_store/s3_store.rb:303:in `list_missing_uploads'
/var/www/discourse/lib/tasks/uploads.rake:277:in `list_missing_uploads'
/var/www/discourse/lib/tasks/uploads.rake:270:in `block (2 levels) in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:90:in `each_connection'
/var/www/discourse/lib/tasks/uploads.rake:255:in `block in <main>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => uploads:missing_files
(Ver traza completa ejecutando la tarea con --trace)

y luego:

root@forum-app:/var/www/discourse#  rake posts:missing_uploads
Buscando subidas faltantes en: default

0 subidas de posts faltan.

root@forum-app:/var/www/discourse#

Y, la estrella principal, rake uploads:migrate_to_s3 --trace

root@forum-app:/var/www/discourse# rake uploads:migrate_to_s3 --trace
** Invoke uploads:migrate_to_s3 (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute uploads:migrate_to_s3
¡Tenga en cuenta que la migración a S3 actualmente no se puede revertir!
[CTRL+c] para cancelar, [ENTER] para continuar

Migrando subidas a S3 para 'default'...
Subiendo archivos a S3...
 - Listando archivos locales
 => 3 archivos
 - Listando archivos de S3
................... => 18784 archivos
 - Sincronizando archivos a S3
...
Actualizando las URLs en la base de datos...
Eliminando imágenes optimizadas antiguas...
Marcando todos los posts que contienen lightboxes para rebake...
10116 posts fueron marcados para rebake
rake abortado!
FileStore::ToS3MigrationError: 1 de 17210 subidas no se migraron a S3. La migración a S3 falló para la base de datos 'default'.
/var/www/discourse/lib/file_store/to_s3_migration.rb:138:in `raise_or_log'
/var/www/discourse/lib/file_store/to_s3_migration.rb:79:in `migration_successful?'
/var/www/discourse/lib/file_store/to_s3_migration.rb:389:in `migrate_to_s3'
/var/www/discourse/lib/file_store/to_s3_migration.rb:65:in `migrate'
/var/www/discourse/lib/tasks/uploads.rake:127:in `migrate_to_s3'
/var/www/discourse/lib/tasks/uploads.rake:106:in `block in migrate_to_s3_all_sites'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:90:in `each_connection'
/var/www/discourse/lib/tasks/uploads.rake:104:in `migrate_to_s3_all_sites'
/var/www/discourse/lib/tasks/uploads.rake:100:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
bin/rake:13:in `<top (required)>'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/cli.rb:491:in `exec'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/cli.rb:28:in `start'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/exe/bundle:45:in `block in <top (required)>'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.4/exe/bundle:33:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => uploads:migrate_to_s3
root@forum-app:/var/www/discourse#