ElasticSearch: cluster_block_exception: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]

Hello!
For some time I see that daemon.log is growing fast because of these messages:

    Nov 30 15:13:49 mastodon bundle[457]: 2020-11-30T14:13:49.254Z pid=457 tid=ovthnr78d WARN: /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.1.0/lib/chewy/type/import.rb:88:in `import!'
    Nov 30 15:13:49 mastodon bundle[457]: /home/mastodon/live/lib/chewy/strategy/custom_sidekiq.rb:13:in `perform'
    Nov 30 15:13:49 mastodon bundle[457]: /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.1.0/lib/sidekiq/processor.rb:196:in `execute_job'
    Nov 30 15:13:49 mastodon bundle[457]: 2020-11-30T14:13:49.254Z pid=457 tid=ovtdphpvt WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"pull","class":"Chewy::Strategy::CustomSidekiq::Worker","args":["StatusesIndex::Status",[105299679527011413]],"jid":"bd78904e8e5f0cc8e5d76403","created_at":1606745598.267121,"enqueued_at":1606745628.7327433,"error_message":"Import failed for `StatusesIndex::Status` with:\n    Index errors:\n      `{\"type\"=>\"cluster_block_exception\", \"reason\"=>\"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\"}`\n        on 1 documents: [\"105299679527011413\"]\n","error_class":"Chewy::ImportFailed","failed_at":1606745598.3231955,"retry_count":0},"jobstr":"{\"retry\":true,\"queue\":\"pull\",\"class\":\"Chewy::Strategy::CustomSidekiq::Worker\",\"args\":[\"StatusesIndex::Status\",[105299679527011413]],\"jid\":\"bd78904e8e5f0cc8e5d76403\",\"created_at\":1606745598.267121,\"enqueued_at\":1606745628.7327433,\"error_message\":\"Import failed for `StatusesIndex::Status` with:\\n    Index errors:\\n      `{\\\"type\\\"=>\\\"cluster_block_exception\\\", \\\"reason\\\"=>\\\"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\\\"}`\\n        on 1 documents: [\\\"105299679527011413\\\"]\\n\",\"error_class\":\"Chewy::ImportFailed\",\"failed_at\":1606745598.3231955,\"retry_count\":0}"}
    Nov 30 15:13:49 mastodon bundle[457]: 2020-11-30T14:13:49.257Z pid=457 tid=ovtdphpvt WARN: Chewy::ImportFailed: Import failed for `StatusesIndex::Status` with:
    Nov 30 15:13:49 mastodon bundle[457]:     Index errors:
    Nov 30 15:13:49 mastodon bundle[457]:       `{"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}`
    Nov 30 15:13:49 mastodon bundle[457]:         on 1 documents: ["105299679527011413"]
    Nov 30 15:13:49 mastodon bundle[457]: 2020-11-30T14:13:49.257Z pid=457 tid=ovtdphpvt WARN: /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.1.0/lib/chewy/type/import.rb:88:in `import!'
    Nov 30 15:13:49 mastodon bundle[457]: /home/mastodon/live/lib/chewy/strategy/custom_sidekiq.rb:13:in `perform'
    Nov 30 15:13:49 mastodon bundle[457]: /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.1.0/lib/sidekiq/processor.rb:196:in `execute_job'
    Nov 30 15:13:49 mastodon bundle[457]: 2020-11-30T14:13:49.258Z pid=457 tid=ovtg48zbl WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"pull","class":"Chewy::Strategy::CustomSidekiq::Worker","args":["AccountsIndex::Account",[1494]],"jid":"27d447230203c1dfa0f0a3af","created_at":1606743064.6568315,"enqueued_at":1606745628.7295647,"error_message":"Import failed for `AccountsIndex::Account` with:\n    Index errors:\n      `{\"type\"=>\"cluster_block_exception\", \"reason\"=>\"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\"}`\n        on 1 documents: [\"1494\"]\n","error_class":"Chewy::ImportFailed","failed_at":1606743064.7330081,"retry_count":5,"retried_at":1606744890.3342233},"jobstr":"{\"retry\":true,\"queue\":\"pull\",\"class\":\"Chewy::Strategy::CustomSidekiq::Worker\",\"args\":[\"AccountsIndex::Account\",[1494]],\"jid\":\"27d447230203c1dfa0f0a3af\",\"created_at\":1606743064.6568315,\"enqueued_at\":1606745628.7295647,\"error_message\":\"Import failed for `AccountsIndex::Account` with:\\n    Index errors:\\n      `{\\\"type\\\"=>\\\"cluster_block_exception\\\", \\\"reason\\\"=>\\\"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\\\"}`\\n        on 1 documents: [\\\"1494\\\"]\\n\",\"error_class\":\"Chewy::ImportFailed\",\"failed_at\":1606743064.7330081,\"retry_count\":5,\"retried_at\":1606744890.3342233}"}
    Nov 30 15:13:49 mastodon bundle[457]: 2020-11-30T14:13:49.258Z pid=457 tid=ovtg48zbl WARN: Chewy::ImportFailed: Import failed for `AccountsIndex::Account` with:
    Nov 30 15:13:49 mastodon bundle[457]:     Index errors:
    Nov 30 15:13:49 mastodon bundle[457]:       `{"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}`
    Nov 30 15:13:49 mastodon bundle[457]:         on 1 documents: ["1494"]
    Nov 30 15:13:49 mastodon bundle[457]: 2020-11-30T14:13:49.258Z pid=457 tid=ovtg48zbl WARN: /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/chewy-5.1.0/lib/chewy/type/import.rb:88:in `import!'
    Nov 30 15:13:49 mastodon bundle[457]: /home/mastodon/live/lib/chewy/strategy/custom_sidekiq.rb:13:in `perform'
    Nov 30 15:13:49 mastodon bundle[457]: /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.1.0/lib/sidekiq/processor.rb:196:in `execute_job'

How to fix it?

I went to https://ddg.gg and searched for cluster_block_exception and found this quite informative answer:

Thank you! It really helped!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.