We often see devstack forums errors like this after pulling a new forum image:
ConnectionError at /courses/course-v1:Test+10004000+1/discussion/forum/
HTTPConnectionPool(host='edx.devstack.forum', port=4567): Max retries exceeded with url: /api/v1/users/9?complete=True&request_id=301282af-91e9-4771-ab5e-b7e4723ac8bb (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fe1fc36d6d0>: Failed to establish a new connection: [Errno 111] Connection refused',))
How to reproduce
# see that you have a new forum image
See that the ruby app did not start cleanly:
docker-compose logs -f --tail=500 forum
Attaching to edx.devstack.forum
edx.devstack.forum | /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:88:in `block in materialize': Could not find rake-12.0.0 in any of the sources (Bundler::GemNotFound)
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:82:in `map!'
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:82:in `materialize'
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:170:in `specs'
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:237:in `specs_for'
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:226:in `requested_specs'
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:108:in `block in definition_method'
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:20:in `setup'
edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler.rb:107:in `setup'
edx.devstack.forum | from app.rb:5:in `<main>'
source forum/ruby_env && source forum/devstack_forum_env
...and then restart the forum container.
Note that I've seen this happen even when having the most recent version of cs_comments_service checked out in my devstack directory. Brian Beggs and I have taken a quick, informal look at this before - it looked like the ansible forum scripts did the right thing, but maybe it needs another look. The problem is that a bundle install never happened in the freshly pulled image.
Determine where we need to fix this, either in configuration or in devstack, and then fix it.