Error 500 / not logged in

Hello everyone,
our website starts to behave strangely those days : for not logged-in users, it shows error 500
https://forum.developer.parrot.com/

if logged-in, everything seems to work as expected!
Our website only uses [docker_manager] and [discourse-solved]

Thanks for your input.


the logs from the admin panel shoes

> OpenURI::HTTPError (403 Error: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AllAccessDisabled</Code><Message>All access to this object has been disabled</Message><RequestId>0C0B735FB6F5A565</RequestId><HostId>Q7rPrXnH7ohowB0zBtJEfoWWCkKlB9AMqrSVg7jVy+pPvTQ2wphmezwv+EIV7aCi5dr6taRHS5o=</HostId></Error>)
/var/www/discourse/lib/file_helper.rb:59:in `block in download'

> Uncaught [object Object]
Url: https://forum.developer.parrot.com/assets/ember_jquery-3a388c5a0562670ed1eea762f12e041d92b4a418316d3f9f83e793d3ba6be5d7.js
Line: 1
Column: 268182

and the backtrace

> /var/www/discourse/lib/file_helper.rb:59:in `block in download'
/var/www/discourse/lib/final_destination.rb:399:in `block (3 levels) in safe_get'
/var/www/discourse/lib/final_destination.rb:398:in `catch'
/var/www/discourse/lib/final_destination.rb:398:in `block (2 levels) in safe_get'
/usr/local/lib/ruby/2.6.0/net/http.rb:1518:in `block in transport_request'
/usr/local/lib/ruby/2.6.0/net/http/response.rb:165:in `reading_body'
/usr/local/lib/ruby/2.6.0/net/http.rb:1517:in `transport_request'
/usr/local/lib/ruby/2.6.0/net/http.rb:1479:in `request'
rack-mini-profiler-2.0.1/lib/patches/net_patches.rb:9:in `block in request_with_mini_profiler'
rack-mini-profiler-2.0.1/lib/mini_profiler/profiling_methods.rb:39:in `step'
rack-mini-profiler-2.0.1/lib/patches/net_patches.rb:8:in `request_with_mini_profiler'
/var/www/discourse/lib/final_destination.rb:370:in `block in safe_get'
/var/www/discourse/lib/final_destination.rb:414:in `block in safe_session'
/usr/local/lib/ruby/2.6.0/net/http.rb:920:in `start'
/usr/local/lib/ruby/2.6.0/net/http.rb:605:in `start'
/var/www/discourse/lib/final_destination.rb:411:in `safe_session'
/var/www/discourse/lib/final_destination.rb:362:in `safe_get'
/var/www/discourse/lib/final_destination.rb:131:in `get'
/var/www/discourse/lib/file_helper.rb:51:in `download'
/var/www/discourse/lib/file_store/base_store.rb:92:in `block in download'
/var/www/discourse/lib/distributed_mutex.rb:33:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:29:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:29:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:14:in `synchronize'
/var/www/discourse/lib/file_store/base_store.rb:80:in `download'
/var/www/discourse/app/models/upload.rb:193:in `fix_dimensions!'
/var/www/discourse/app/models/upload.rb:222:in `get_dimension'
/var/www/discourse/app/models/upload.rb:227:in `width'
/var/www/discourse/app/models/topic.rb:53:in `thumbnail_info'
/var/www/discourse/app/serializers/listable_topic_serializer.rb:39:in `thumbnails'
(eval):32:in `_fast_attributes'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:456:in `attributes'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:480:in `_serializable_hash'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:359:in `serializable_hash'
active_model_serializers-0.8.4/lib/active_model/serializer/associations.rb:124:in `block in serialize'
active_model_serializers-0.8.4/lib/active_model/serializer/associations.rb:123:in `map'
active_model_serializers-0.8.4/lib/active_model/serializer/associations.rb:123:in `serialize'
/var/www/discourse/lib/freedom_patches/ams_include_without_root.rb:57:in `include!'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:368:in `block in include_associations!'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:367:in `each_key'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:367:in `include_associations!'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:362:in `serializable_hash'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:343:in `as_json'
activesupport-6.0.3/lib/active_support/json/encoding.rb:22:in `encode'
activesupport-6.0.3/lib/active_support/json/encoding.rb:22:in `encode'
activesupport-6.0.3/lib/active_support/core_ext/object/json.rb:42:in `to_json'
active_model_serializers-0.8.4/lib/active_model/serializer.rb:331:in `to_json'
multi_json-1.14.1/lib/multi_json/adapters/oj.rb:56:in `dump'
multi_json-1.14.1/lib/multi_json/adapters/oj.rb:56:in `dump'
multi_json-1.14.1/lib/multi_json/adapter.rb:25:in `dump'
multi_json-1.14.1/lib/multi_json.rb:139:in `dump'
/var/www/discourse/lib/topic_list_responder.rb:16:in `block (2 levels) in respond_with_list'
actionpack-6.0.3/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'
/var/www/discourse/lib/topic_list_responder.rb:13:in `respond_with_list'
/var/www/discourse/app/controllers/list_controller.rb:100:in `block (2 levels) in <class:ListController>'
actionpack-6.0.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack-6.0.3/lib/abstract_controller/base.rb:195:in `process_action'
actionpack-6.0.3/lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack-6.0.3/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport-6.0.3/lib/active_support/callbacks.rb:135:in `run_callbacks'
actionpack-6.0.3/lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack-6.0.3/lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack-6.0.3/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
activesupport-6.0.3/lib/active_support/notifications.rb:180:in `block in instrument'
activesupport-6.0.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport-6.0.3/lib/active_support/notifications.rb:180:in `instrument'
actionpack-6.0.3/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack-6.0.3/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord-6.0.3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack-6.0.3/lib/abstract_controller/base.rb:136:in `process'
actionview-6.0.3/lib/action_view/rendering.rb:39:in `process'
rack-mini-profiler-2.0.1/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'
actionpack-6.0.3/lib/action_controller/metal.rb:190:in `dispatch'
actionpack-6.0.3/lib/action_controller/metal.rb:254:in `dispatch'
actionpack-6.0.3/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack-6.0.3/lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack-6.0.3/lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>'
actionpack-6.0.3/lib/action_dispatch/routing/mapper.rb:48:in `serve'
actionpack-6.0.3/lib/action_dispatch/journey/router.rb:49:in `block in serve'
actionpack-6.0.3/lib/action_dispatch/journey/router.rb:32:in `each'
actionpack-6.0.3/lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack-6.0.3/lib/action_dispatch/routing/route_set.rb:834:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
rack-2.0.8/lib/rack/tempfile_reaper.rb:15:in `call'
rack-2.0.8/lib/rack/conditional_get.rb:25:in `call'
rack-2.0.8/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:316:in `call'
rack-2.0.8/lib/rack/session/abstract/id.rb:259:in `context'
rack-2.0.8/lib/rack/session/abstract/id.rb:253:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/cookies.rb:648:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport-6.0.3/lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack-6.0.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
logster-2.8.0/lib/logster/middleware/reporter.rb:43:in `call'
railties-6.0.3/lib/rails/rack/logger.rb:37:in `call_app'
railties-6.0.3/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:18:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:31:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:22:in `call'
rack-2.0.8/lib/rack/method_override.rb:22:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
rack-2.0.8/lib/rack/sendfile.rb:111:in `call'
actionpack-6.0.3/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
rack-mini-profiler-2.0.1/lib/mini_profiler/profiler.rb:200:in `call'
message_bus-3.2.0/lib/message_bus/rack/middleware.rb:57:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:172:in `call'
railties-6.0.3/lib/rails/engine.rb:527:in `call'
railties-6.0.3/lib/rails/railtie.rb:190:in `public_send'
railties-6.0.3/lib/rails/railtie.rb:190:in `method_missing'
rack-2.0.8/lib/rack/urlmap.rb:68:in `block in call'
rack-2.0.8/lib/rack/urlmap.rb:53:in `each'
rack-2.0.8/lib/rack/urlmap.rb:53:in `call'
unicorn-5.5.5/lib/unicorn/http_server.rb:605:in `process_client'
unicorn-5.5.5/lib/unicorn/http_server.rb:701:in `worker_loop'
unicorn-5.5.5/lib/unicorn/http_server.rb:548:in `spawn_missing_workers'
unicorn-5.5.5/lib/unicorn/http_server.rb:144:in `start'
unicorn-5.5.5/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `<main>'

Did you try to rebuild?

yes, many times.
No error on building.

(I am currently making a snapshot on Digital ocean, thus site might be down).

Disable all plugins and try again a new rebuild… if it works enable one at a time…

already done.
And they are official plugins.

Topic serializer is calling a download method for thumbnails and getting an error.

Any ideas here @david ?

Categories page also work fine ARSDK3 - Parrot Developers Forum

2 Likes

For a test, I rolled back on a droplet 21 days ago and I don’t have the problem there.
I will investigate more tomorrow the differences between now and that date

So, I rolled back the digital ocean to a previous backup with an old version of discourse

I don’t have the issue here.

But if I do all the updates, the problem appears.

[EDIT]
I ran the wizard assistant (just to see what it looks like, and maybe change the homepage for Categorie/latest), and the problem seems to have disappear… :thinking:

1 Like

Thanks for the report @ParrotDeveloper, I’ll take a look. I think we try and re-download uploads if they are missing dimensions in the database. Clearly we do not want a failure there to blow up category/topic views, so I’ll get it fixed up :eyes:

4 Likes

This should ensure upload errors never cause a topic page to fail:

4 Likes