Loading groups gives internal server error

The server is running the 2.8.0.beta6. All other features are working. Groups listing also works, but when clicking on any specific group gives the following error.

Server Error

while trying to load /groups/.json

Error code: 500 Internal Server Error

The log tells that it is report_js_error

It is critical since group functionality is down. Any clue on how to fix the problem will help. Thanks in advance.

The problem became more critical. Cannot read any topics now. The following error message appears:
Sorry, we couldn’t load that topic, possibly due to a connection problem. Please try again. If the problem persists, let us know.

Have you tried safe mode? You’ll also want to check your logs and probably provide those.

Even with those I personally can’t help you, but without trying those two things there isn’t much for anyone who can to help you with.

My personal self-hosted instance and a CDCK hosted instance I manage both load groups JSON files fine ( I just checked) when on latest.

4 Likes

This is one of the recurring errors found:

Message (113 copies reported)

ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR:  column "for_topic" does not exist
LINE 1: SELECT "bookmarks"."id", "bookmarks"."post_id", "for_topic",...
                                                        ^
)
app/controllers/application_controller.rb:520:in `render_json_dump'
app/controllers/topics_controller.rb:1191:in `block (2 levels) in perform_show_response'
app/controllers/topics_controller.rb:1181:in `perform_show_response'
app/controllers/topics_controller.rb:162:in `show'
app/controllers/application_controller.rb:397:in `block in with_resolved_locale'
app/controllers/application_controller.rb:397:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:355:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:187:in `call'

Backtrace

rack-mini-profiler (2.3.3) lib/patches/db/pg.rb:69:in `exec_params'
rack-mini-profiler (2.3.3) lib/patches/db/pg.rb:69:in `exec_params'
activerecord (6.1.4.1) lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `block (2 levels) in exec_no_cache'
activesupport (6.1.4.1) lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
activesupport (6.1.4.1) lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
activesupport (6.1.4.1) lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
activerecord (6.1.4.1) lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_no_cache'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'

Env

HTTP HOSTS: example.com

Another error is:

rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69:in `exec_params'
rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69:in `exec_params'
activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `block (2 levels) in exec_no_cache'
activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_no_cache'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_no_cache'
activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `execute_and_clear'
activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:53:in `exec_query'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:532:in `select'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:69:in `select_all'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:101:in `block in select_all'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:118:in `block in cache_sql'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:109:in `cache_sql'
activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/query_cache.rb:101:in `select_all'
activerecord-6.1.4.1/lib/active_record/querying.rb:47:in `find_by_sql'
activerecord-6.1.4.1/lib/active_record/relation.rb:843:in `block in exec_queries'
activerecord-6.1.4.1/lib/active_record/relation.rb:861:in `skip_query_cache_if_necessary'
activerecord-6.1.4.1/lib/active_record/relation.rb:828:in `exec_queries'
activerecord-6.1.4.1/lib/active_record/association_relation.rb:54:in `exec_queries'
activerecord-6.1.4.1/lib/active_record/relation.rb:631:in `load'
activerecord-6.1.4.1/lib/active_record/relation.rb:249:in `records'
activerecord-6.1.4.1/lib/active_record/relation/delegation.rb:88:in `as_json'
activesupport-6.1.4.1/lib/active_support/json/encoding.rb:22:in `encode'
activesupport-6.1.4.1/lib/active_support/json/encoding.rb:22:in `encode'
activesupport-6.1.4.1/lib/active_support/core_ext/object/json.rb:43:in `to_json'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json'
multi_json-1.15.0/lib/multi_json/adapters/oj.rb:56:in `dump'
multi_json-1.15.0/lib/multi_json/adapters/oj.rb:56:in `dump'
multi_json-1.15.0/lib/multi_json/adapter.rb:25:in `dump'
multi_json-1.15.0/lib/multi_json.rb:139:in `dump'
/var/www/discourse/app/controllers/topics_controller.rb:1186:in `block (2 levels) in perform_show_response'
actionpack-6.1.4.1/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'
/var/www/discourse/app/controllers/topics_controller.rb:1181:in `perform_show_response'
/var/www/discourse/app/controllers/topics_controller.rb:162:in `show'
actionpack-6.1.4.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack-6.1.4.1/lib/abstract_controller/base.rb:228:in `process_action'
actionpack-6.1.4.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack-6.1.4.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport-6.1.4.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/var/www/discourse/app/controllers/application_controller.rb:397:in `block in with_resolved_locale'
i18n-1.8.10/lib/i18n.rb:314:in `with_locale'
/var/www/discourse/app/controllers/application_controller.rb:397:in `with_resolved_locale'
activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
activesupport-6.1.4.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
actionpack-6.1.4.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack-6.1.4.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack-6.1.4.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `block in instrument'
activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `instrument'
actionpack-6.1.4.1/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
actionpack-6.1.4.1/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
activerecord-6.1.4.1/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack-6.1.4.1/lib/abstract_controller/base.rb:165:in `process'
actionview-6.1.4.1/lib/action_view/rendering.rb:39:in `process'
rack-mini-profiler-2.3.3/lib/mini_profiler/profiling_methods.rb:85:in `block in profile_method'
actionpack-6.1.4.1/lib/action_controller/metal.rb:190:in `dispatch'
actionpack-6.1.4.1/lib/action_controller/metal.rb:254:in `dispatch'
actionpack-6.1.4.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack-6.1.4.1/lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack-6.1.4.1/lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack-6.1.4.1/lib/action_dispatch/journey/router.rb:32:in `each'
actionpack-6.1.4.1/lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack-6.1.4.1/lib/action_dispatch/routing/route_set.rb:842:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
rack-2.2.3/lib/rack/conditional_get.rb:27:in `call'
rack-2.2.3/lib/rack/head.rb:12:in `call'
actionpack-6.1.4.1/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:353:in `call'
rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/cookies.rb:689:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport-6.1.4.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack-6.1.4.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
logster-2.9.7/lib/logster/middleware/reporter.rb:43:in `call'
railties-6.1.4.1/lib/rails/rack/logger.rb:37:in `call_app'
railties-6.1.4.1/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:23:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:31:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/request_id.rb:26:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:23:in `call'
rack-2.2.3/lib/rack/method_override.rb:24:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
actionpack-6.1.4.1/lib/action_dispatch/middleware/host_authorization.rb:92:in `call'
rack-mini-profiler-2.3.3/lib/mini_profiler/profiler.rb:249:in `call'
message_bus-3.3.6/lib/message_bus/rack/middleware.rb:61:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:187:in `call'
railties-6.1.4.1/lib/rails/engine.rb:539:in `call'
railties-6.1.4.1/lib/rails/railtie.rb:207:in `public_send'
railties-6.1.4.1/lib/rails/railtie.rb:207:in `method_missing'
rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
rack-2.2.3/lib/rack/urlm


Thanks. Exploring through safe-mode also gave the same error. Should I rebuild the container after commenting the plugins?

I don’t think you need to comment out the Plugins if you disabled them in safe-mode and the problem persisted. An upgrade and a rebuild might do the trick though. :+1:

Thanks.
Before posting the topic, I did launcher rebuild image-name. The errors persist after that.

Does that do the same job as ./launcher rebuild app?

1 Like

I think so. It should create a container called ‘app’.

1 Like

Ah, I see. I’m afraid I only know the basic ‘turn it off, and turn it back on again’ run-through -

  • Check it in safe-mode
  • Upgrade to latest
  • Rebuild app

Is there anything special about your install that may give someone else a clue as to your issue?

1 Like

It seems you’re missing

introduced in this commit

2 Likes

You saved it. This is it. Upgraded to the latest (aba08d1929) and the problem is solved. But the latest release (2.8.0.beta6) didn’t fix the issue.

Wondering why this issue did not crop up on other discourse instances that we are running which are all at 2.8.0.beta6.

2 Likes