Multisite build error: #<MiniRacer::RuntimeError: Error: Parser rule not found: fragments_join>

Multisite build is failing with error message, more logs below

I, [2022-09-17T08:27:07.933480 #1]  INFO -- : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate

--------------------------------------------------------------------------------
2 migrations failed!

Failed to migrate site1
#<MiniRacer::RuntimeError: Error: Parser rule not found: fragments_join>
JavaScript at Ruler.before (<anonymous>:3453:13)
JavaScript at Function.<anonymous> (<anonymous>:156:24)
JavaScript at MarkdownIt.use (<anonymous>:8249:12)
JavaScript at <anonymous>:360:21
JavaScript at Array.forEach (<anonymous>)
JavaScript at setupMarkdownEngine (<anonymous>:356:26)
JavaScript at setup (<anonymous>:507:5)
JavaScript at buildOptions (<anonymous>:88:36)
JavaScript at <anonymous>:25:17
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:228:in `eval_unsafe'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:228:in `block (2 levels) in eval'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:369:in `timeout'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:227:in `block in eval'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:225:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:225:in `eval'
/var/www/discourse/lib/pretty_text.rb:234:in `block in markdown'
/var/www/discourse/lib/pretty_text.rb:597:in `block in protect'
/var/www/discourse/lib/pretty_text.rb:596:in `synchronize'
/var/www/discourse/lib/pretty_text.rb:596:in `protect'
/var/www/discourse/lib/pretty_text.rb:180:in `markdown'
/var/www/discourse/lib/pretty_text.rb:309:in `cook'
/var/www/discourse/app/models/post_analyzer.rb:31:in `cook'
/var/www/discourse/app/models/post.rb:325:in `cook'
/var/www/discourse/lib/post_creator.rb:281:in `before_create_tasks'
/var/www/discourse/app/models/post.rb:742:in `block in <class:Post>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:445:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:445:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:199:in `block (2 levels) in halting'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:687:in `block (2 levels) in default_terminator'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:686:in `catch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:686:in `block in default_terminator'

/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:595:in `invoke_before'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:106:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:929:in `_run_create_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:461:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/timestamp.rb:108:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/persistence.rb:1067:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:457:in `block in create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/autosave_association.rb:370:in `around_save_collection_association'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:138:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:929:in `_run_save_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:457:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/timestamp.rb:126:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/persistence.rb:648:in `save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/validations.rb:53:in `save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:302:in `block in save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:314:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:302:in `save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/suppressor.rb:54:in `save!'
/var/www/discourse/app/models/category.rb:303:in `block in create_category_definition'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:314:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:209:in `transaction'
/var/www/discourse/app/models/category.rb:295:in `create_category_definition'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:400:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:236:in `block in halting_and_conditional'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:599:in `block in invoke_after'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:599:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:599:in `invoke_after'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:108:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:929:in `_run_create_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:461:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/timestamp.rb:108:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/persistence.rb:1067:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:457:in `block in create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/autosave_association.rb:370:in `around_save_collection_association'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:138:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:929:in `_run_save_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:457:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/timestamp.rb:126:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/persistence.rb:648:in `save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/validations.rb:53:in `save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:302:in `block in save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:314:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'

ck in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:209:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:35:in `run_file'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:26:in `block in run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:25:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:25:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu.rb:29:in `seed'
/var/www/discourse/lib/tasks/db.rake:196:in `block (3 levels) in <main>'
/var/www/discourse/lib/tasks/db.rake:151:in `block (3 levels) in execute_concurrently'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:284:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:77:in `with_connection'
/var/www/discourse/lib/tasks/db.rake:149:in `block (2 levels) in execute_concurrently'


Failed to migrate site2
#<MiniRacer::RuntimeError: Error: Parser rule not found: fragments_join>
JavaScript at Ruler.before (<anonymous>:3453:13)
JavaScript at Function.<anonymous> (<anonymous>:156:24)
JavaScript at MarkdownIt.use (<anonymous>:8249:12)
JavaScript at <anonymous>:360:21
JavaScript at Array.forEach (<anonymous>)
JavaScript at setupMarkdownEngine (<anonymous>:356:26)
JavaScript at setup (<anonymous>:5
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:225:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_racer-0.6.3/lib/mini_racer.rb:225:in `eval'
/var/www/discourse/lib/pretty_text.rb:234:in `block in markdown'
/var/www/discourse/lib/pretty_text.rb:597:in `block in protect'
/var/www/discourse/lib/pretty_text.rb:596:in `synchronize'
/var/www/discourse/lib/pretty_text.rb:596:in `protect'
/var/www/discourse/lib/pretty_text.rb:180:in `markdown'
/var/www/discourse/lib/pretty_text.rb:309:in `cook'
/var/www/discourse/app/models/post_analyzer.rb:31:in `cook'
/var/www/discourse/app/models/post.rb:325:in `cook'
/var/www/discourse/lib/post_creator.rb:281:in `before_create_tasks'
/var/www/discourse/app/models/post.rb:742:in `block in <class:Post>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:445:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:445:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:199:in `block (2 levels) in halting'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:687:in `block (2 levels) in default_terminator'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:686:in `catch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:686:in `block in default_terminator'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:200:in `block in halting'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:595:in `block in invoke_before'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:595:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:595:in `invoke_before'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:106:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:929:in `_run_create_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:461:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/timestamp.rb:108:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/persistence.rb:1067:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:457:in `block in create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/autosave_association.rb:370:in `around_save_collection_association'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:138:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/call
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/validations.rb:53:in `save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:302:in `block in save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:314:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:302:in `save!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/suppressor.rb:54:in `save!'
/var/www/discourse/app/models/category.rb:303:in `block in create_category_definition'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:314:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:209:in `transaction'
/var/www/discourse/app/models/category.rb:295:in `create_category_definition'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:400:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:236:in `block in halting_and_conditional'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:599:in `block in invoke_after'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:599:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:599:in `invoke_after'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:108:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:929:in `_run_create_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:461:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/timestamp.rb:108:in `_create_record'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/persistence.rb:1067:in `create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:457:in `block in create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/autosave_association.rb:370:in `around_save_collection_association'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:138:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/callbacks.rb:929:in `_run_save_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/callbacks.rb:457:in `create_or_update'
/var/www/discours
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/suppressor.rb:54:in `save!'
/var/www/discourse/lib/seed_data/categories.rb:114:in `create_category'
/var/www/discourse/lib/seed_data/categories.rb:15:in `block (2 levels) in create'
/var/www/discourse/lib/seed_data/categories.rb:15:in `each'
/var/www/discourse/lib/seed_data/categories.rb:15:in `block in create'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/i18n-1.12.0/lib/i18n.rb:322:in `with_locale'
/var/www/discourse/lib/seed_data/categories.rb:14:in `create'
(eval):6:in `block (2 levels) in run_file'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:46:in `eval'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:46:in `block (2 levels) in run_file'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:58:in `block in open'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:57:in `open'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:57:in `open'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:36:in `block in run_file'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/transactions.rb:209:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:35:in `run_file'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:26:in `block in run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:25:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:25:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.9/lib/seed-fu.rb:29:in `seed'
/var/www/discourse/lib/tasks/db.rake:196:in `block (3 levels) in <main>'
/var/www/discourse/lib/tasks/db.rake:151:in `block (3 levels) in execute_concurrently'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:284:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:77:in `with_connection'
/var/www/discourse/lib/tasks/db.rake:149:in `block (2 levels) in execute_concurrently'

I, [2022-09-17T08:27:33.253685 #1]  INFO -- : gem install iso8601 -v 0.13.0 -i /var/www/discourse/plugins/discourse-automation/gems/2.7.6 --no-document --ignore-dependencies --no-user-install
Successfully installed iso8601-0.13.0
1 gem installed
gem install rrule -v 0.4.4 -i /var/www/discourse/plugins/discourse-automation/gems/2.7.6 --no-document --ignore-dependencies --no-user-install
Successfully installed rrule-0.4.4
1 gem installed
Multisite migrator is running using 1 threads

Migrating default
Migrating site1
Migrating site2
Seeding default
Seeding site1
Seeding site2



FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate failed with return #<Process::Status: pid 1094 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate"
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
1 Like

I can confirm this issue, Just tried on a fresh two container setup and multi site fails with exact same error.

3 Likes

Do you have any plugins installed?
FWIW: We’re able to deploy fresh multisites without any problems at the moment, at latest tests-passed.

1 Like

I tried it with a fresh install without any plugins. I even disabled docker manager at a point to test it.

2 Likes

Looks like it doesn’t find markdown-it v13. @david I wonder if this is due to DEV: Compile markdown-it-bundle with ember-cli (#18104) · discourse/discourse@1bd1664 · GitHub

Why are there multiple versions referenced in the lock file? That looks weird to me. :thinking:

3 Likes

Hmm interesting, let’s see:

`yarn why`
❯ yarn why markdown-it
yarn why v1.22.10
[1/4] 🤔  Why do we have the module "markdown-it"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "markdown-it@13.0.1"
info Reasons this module exists
   - "_project_#discourse" depends on it
   - Hoisted from "_project_#discourse#markdown-it"
info Disk size without dependencies: "732KB"
info Disk size with unique dependencies: "1.31MB"
info Disk size with transitive dependencies: "1.31MB"
info Number of shared dependencies: 5
=> Found "ember-cli#markdown-it@12.0.4"
info This module exists because "_project_#discourse#ember-cli" depends on it.
info Disk size without dependencies: "724KB"
info Disk size with unique dependencies: "1.3MB"
info Disk size with transitive dependencies: "1.3MB"
info Number of shared dependencies: 5
=> Found "markdown-it-terminal#markdown-it@8.4.2"
info This module exists because "_project_#discourse#ember-cli#markdown-it-terminal" depends on it.
info Disk size without dependencies: "708KB"
info Disk size with unique dependencies: "1.29MB"
info Disk size with transitive dependencies: "1.29MB"
info Number of shared dependencies: 5
✨  Done in 0.39s.

So discourse’s package.json is requesting 13.0.1, ember-cli’s own package.json requests 12.0.4, and markdown-it-terminal requires 8.4.2.

Anyway, in theory this should all be invisible. Discourse itself is asking for 13.0.1, and so the version in app/assets/javascripts/node_modules/markdown-it should be 13.0.1. The other older versions will be made available to their respective parents.

Given that we’re not seeing this internally, and this is only happening for people with non-standard installs, I suspect we’re missing a yarn install somewhere in the two-container setup templates, and so the database container is booting up with the cached version of markdown-it from the base image :eyes:

1 Like

I think this should take care of it - technical details in the PR description:

@TechGeek @itsbhanusharma if you try a rebuild again, it should work better now.

3 Likes

I’ll quickly try this on another fresh install and report!

EDIT: Builds are now working for me.

3 Likes

Working fine now. Somehow I can’t mark it as solution.

2 Likes

Bugs get closed rather than solved. :person_shrugging:

2 Likes

This topic was automatically closed after 17 hours. New replies are no longer allowed.