I am trying to connect the forum docker with MongoDB cluster.
The configurations are -
environment: SEARCH_SERVER: "http://elasticsearch:9200" MONGODB_AUTH: "mongouser:password@" MONGODB_HOST: "mongo_primary_host_url" MONGODB_PORT: 27017 MONGODB_DATABASE: "cs_comments_service" MONGOID_USE_SSL: true MONGOID_SSL_VERIFY: true MONGOID_READ_MODE: "primary" MONGOID_AUTH_MECH: ":mongodb_x509" MONGOID_SSL_CA_CERT: "My_certificate_path_in_the_forum_docker" MONGOID_TIMEOUT: 10
This is the error i get in the forum.
tutor_local-forum-1 | Waiting for mongodb/elasticsearchâŚ
tutor_local-forum-1 | 2022/06/13 08:47:46 Waiting for: tcp://mongo_primary_host_url:27017
tutor_local-forum-1 | 2022/06/13 08:47:46 Waiting for: http://elasticsearch:9200
tutor_local-forum-1 | 2022/06/13 08:47:46 Connected to tcp://mongo_primary_host_url:27017
tutor_local-forum-1 | 2022/06/13 08:47:46 Received 200 from http://elasticsearch:9200
tutor_local-forum-1 | W, [2022-06-13T08:47:47.948442 #17] WARN â : Overwriting existing field _id in class User.
tutor_local-forum-1 | W, [2022-06-13T08:47:47.977085 #17] WARN â : MONGODB | Unsupported client option âmax_retriesâ. It will be ignored.
tutor_local-forum-1 | W, [2022-06-13T08:47:47.977157 #17] WARN â : MONGODB | Unsupported client option âretry_intervalâ. It will be ignored.
tutor_local-forum-1 | W, [2022-06-13T08:47:47.977173 #17] WARN â : MONGODB | Unsupported client option âtimeoutâ. It will be ignored.
tutor_local-forum-1 | /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/mongo-2.5.3/lib/mongo/server_selector/selectable.rb:110:inselect_server': No server is available matching preference: #<Mongo::ServerSelector::Primary:0x47181947531780 tag_sets=[] max_staleness=nil> using server_selection_timeout=30 and local_threshold=0.015 (Mongo::Error::NoServerAvailable) tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/mongo-2.5.3/lib/mongo/collection/view/iterable.rb:41:in
block in eachâ
tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/mongo-2.5.3/lib/mongo/retryable.rb:44:inread_with_retry' tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/mongo-2.5.3/lib/mongo/collection/view/iterable.rb:40:in
eachâ
tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/mongoid-7.0.5/lib/mongoid/query_cache.rb:227:ineach' tutor_local-forum-1 | from /app/cs_comments_service/app.rb:175:in
mapâ
tutor_local-forum-1 | from /app/cs_comments_service/app.rb:175:in<top (required)>' tutor_local-forum-1 | from config/unicorn_tcp.rb:4:in
requireâ
tutor_local-forum-1 | from config/unicorn_tcp.rb:4:inreload' tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/unicorn-5.3.1/lib/unicorn/configurator.rb:84:in
instance_evalâ
tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/unicorn-5.3.1/lib/unicorn/configurator.rb:84:inreload' tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/unicorn-5.3.1/lib/unicorn/configurator.rb:77:in
initializeâ
tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/unicorn-5.3.1/lib/unicorn/http_server.rb:77:innew' tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/unicorn-5.3.1/lib/unicorn/http_server.rb:77:in
initializeâ
tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/unicorn-5.3.1/bin/unicorn:126:innew' tutor_local-forum-1 | from /app/cs_comments_service/vendor/bundle/ruby/2.5.0/gems/unicorn-5.3.1/bin/unicorn:126:in
<top (required)>â
tutor_local-forum-1 | from ./bin/unicorn:16:inload' tutor_local-forum-1 | from ./bin/unicorn:16:in
â
The same cluster is used for lms/cms. That works fine, but the forum does not connect.