Hey there !
Big conflict on my Discourse since the change…
- Before i had :
- git clone https://github.com/discourse/discourse-question-answer
- Today i wanted to add :
- git clone https://github.com/discourse/discourse-question-answer
- git clone https://github.com/discourse/discourse-post-voting
I obtained a conflict between the two :
Summary
I, [2022-12-09T10:13:26.139287 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
/var/www/discourse/plugins/discourse-question-answer/lib/question_answer/engine.rb:4: warning: already initialized constant QuestionAnswer::CREATE_AS_QA_DEFAULT
/var/www/discourse/plugins/discourse-post-voting/lib/question_answer/engine.rb:4: warning: previous definition of CREATE_AS_QA_DEFAULT was here
/var/www/discourse/plugins/discourse-question-answer/app/controllers/question_answer/votes_controller.rb:75: warning: already initialized constant QuestionAnswer::VotesController::VOTERS_LIMIT
/var/www/discourse/plugins/discourse-post-voting/app/controllers/question_answer/votes_controller.rb:75: warning: previous definition of VOTERS_LIMIT was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_vote.rb:7: warning: already initialized constant QuestionAnswerVote::VOTABLE_TYPES
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_vote.rb:7: warning: previous definition of VOTABLE_TYPES was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_comment.rb:7: warning: already initialized constant QuestionAnswerComment::COOKED_VERSION
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_comment.rb:7: warning: previous definition of COOKED_VERSION was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_comment.rb:26: warning: already initialized constant QuestionAnswerComment::MARKDOWN_FEATURES
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_comment.rb:26: warning: previous definition of MARKDOWN_FEATURES was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_comment.rb:31: warning: already initialized constant QuestionAnswerComment::MARKDOWN_IT_RULES
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_comment.rb:31: warning: previous definition of MARKDOWN_IT_RULES was here
/var/www/discourse/plugins/discourse-question-answer/extensions/topic_extension.rb:9: warning: already initialized constant Topic::QA_SUBTYPE
/var/www/discourse/plugins/discourse-post-voting/extensions/topic_extension.rb:9: warning: previous definition of QA_SUBTYPE was here
rake aborted!
ArgumentError: Invalid route name, already in use: 'question_answer'
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
https://guides.rubyonrails.org/routing.html#restricting-the-routes-created
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/route_set.rb:587:in `add_route'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/mapper.rb:1986:in `add_route'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/mapper.rb:1957:in `decomposed_match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/mapper.rb:1921:in `block in map_match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/mapper.rb:1915:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/mapper.rb:1915:in `map_match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/mapper.rb:1663:in `match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/mapper.rb:642:in `mount'
/var/www/discourse/plugins/discourse-question-answer/config/routes.rb:16:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/route_set.rb:427:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/route_set.rb:427:in `eval_block'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/route_set.rb:434:in `block in finalize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/route_set.rb:434:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/routing/route_set.rb:434:in `finalize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application/routes_reloader.rb:51:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application/routes_reloader.rb:51:in `finalize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application/routes_reloader.rb:22:in `reload!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application/routes_reloader.rb:35:in `block in updater'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/file_update_checker.rb:83:in `execute'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application/routes_reloader.rb:10:in `execute'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application/finisher.rb:195:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application.rb:391:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `method_missing'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:88:in `register'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:332:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application.rb:367:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
I, [2022-12-09T10:13:36.170591 #1] INFO -- : gem install rrule -v 0.4.4 -i /var/www/discourse/plugins/discourse-calendar/gems/2.7.6 --no-document --ignore-dependencies --no-user-install
Successfully installed rrule-0.4.4
1 gem installed
FAILED
--------------------
- Then i removed the first one. Build is ok but the app is no longer running :
- I got an HTTP 500
- nginx error logs give me something like :
root@slazvmeutp01:/opt/discourse# cat /var/opt/discourse/var-log/nginx/error.log 2022/12/09 10:47:34 [notice] 537#537: signal process started 2022/12/09 10:47:37 [error] 554#554: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 18.156.156.214, server: _, request: "POST /message-bus/76e1bd78eedf43a5a337b6f44a8b88d0/poll?dlp=t HTTP/2.0", upstream: "http://127.0.0.1:3000/message-bus/76e1bd78eedf43a5a337b6f44a8b88d0/poll?dlp=t", host: "mydiscourse.domain.com", referrer: "https://mydiscourse.domain.com/admin/plugins" 2022/12/09 10:59:08 [crit] 554#554: *398 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 212.102.40.218, server: 0.0.0.0:443 2022/12/09 11:25:50 [notice] 530#530: signal process started
I noticed that Git repo https://github.com/discourse/discourse-question-answer now redirects to the second https://github.com/discourse/discourse-post-voting.
So it would explain the conflict on first build today.
But what about now ? It mentions TLS error rather than a plugin error…
Any idea ?