Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't launch decidim - message_encryptor openssl::cipher error #5

Closed
enlight3d opened this issue Oct 20, 2020 · 2 comments · Fixed by #6
Closed

Can't launch decidim - message_encryptor openssl::cipher error #5

enlight3d opened this issue Oct 20, 2020 · 2 comments · Fixed by #6

Comments

@enlight3d
Copy link

Hello, first of all, thanks a lot for this repo, it looks promising and should help with docker deployment of decidim !

I cloned your repo and built my own image (didn't change anything in your files). Build went ok, but once docker runs decidim container, it is stuck on this error :

/usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/message_encryptor.rb:201:in `final': OpenSSL::Cipher::CipherError
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/message_encryptor.rb:201:in `_decrypt`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/message_encryptor.rb:157:in `decrypt_and_verify`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/encrypted_file.rb:79:in `decrypt`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/encrypted_file.rb:42:in `read`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/encrypted_configuration.rb:21:in `read`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/encrypted_configuration.rb:33:in `config`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/encrypted_configuration.rb:38:in `options`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/core_ext/module/delegation.rb:271:in `method_missing`
	from /usr/local/bundle/ruby/2.6.0/gems/devise-4.7.3/lib/devise/secret_key_finder.rb:24:in `key_exists?`
	from /usr/local/bundle/ruby/2.6.0/gems/devise-4.7.3/lib/devise/secret_key_finder.rb:10:in `find`
	from /usr/local/bundle/ruby/2.6.0/gems/devise-4.7.3/lib/devise/rails.rb:37:in `block in <class:Engine>`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `instance_exec`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `run`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:61:in `block in run_initializers`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `call`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each`
	from /usr/local/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/initializable.rb:60:in `run_initializers`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/application.rb:361:in `initialize!`
	from /decidim-app/config/environment.rb:5:in `<main>`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative`
	from config.ru:3:in `block in <main>`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `eval`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `new_from_string`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:105:in `load_file`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:66:in `parse_file`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:349:in `build_app_and_options_from_config`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:249:in `app`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:27:in `app`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:422:in `wrapped_app`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:312:in `block in start`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:379:in `handle_profiling`
	from /usr/local/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/server.rb:311:in `start`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:53:in `start`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:147:in `block in perform`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:142:in `tap`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:142:in `perform`
	from /usr/local/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run`
	from /usr/local/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command`
	from /usr/local/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/command/base.rb:69:in `perform`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/command.rb:46:in `invoke`
	from /usr/local/bundle/ruby/2.6.0/gems/railties-5.2.4.3/lib/rails/commands.rb:18:in `<main>`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi`
	from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency`
	from /usr/local/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require`
	from bin/rails:4:in `<main>`
Exiting

Any help would be greatly appreciated :)

@enlight3d enlight3d changed the title Can't launch decidim Can't launch decidim - message_encryptor openssl::cipher error Oct 20, 2020
@enlight3d
Copy link
Author

it seems like it may be linked to the rails_master_key env var. But I don't know how to get another one and where it's used as in the base decidim repo, there's no mention of this variable....

@raulsperoni
Copy link
Contributor

Hi, I'm not ruby expert and maybe this breaks something but if you comment rails_master_key in docker compose it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants