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

Document troubleshooting of Argument Error: invalid base64 #18

Closed
1 task
sigalsax opened this issue Apr 7, 2020 · 5 comments
Closed
1 task

Document troubleshooting of Argument Error: invalid base64 #18

sigalsax opened this issue Apr 7, 2020 · 5 comments

Comments

@sigalsax
Copy link

sigalsax commented Apr 7, 2020

Summary

When deploying Conjur as per the instructions, if CONJUR_DATA_KEY is not valid when starting Conjur container, you may get the following error:

rake aborted!
ArgumentError: invalid base64
/opt/conjur-server/config/initializers/authenticator.rb:16:in `<top (required)>'
...

AC:

  • We provide better UX or documentation for this common pitfall
@hertus
Copy link

hertus commented Apr 7, 2020

Had the same with a wrong "CONJUR_DATA_KEY" env variable for the conjur container which had a non-BASE64 conform string in it. Fixed with correct CONJUR_DATA_KEY generated from 'conjur data-key generate'

rake aborted!,
ArgumentError: invalid base64,
/opt/conjur-server/config/initializers/authenticator.rb:16:in `<top (required)>',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:268:in `load',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:268:in `block in load',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:240:in `load_dependency',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:268:in `load',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/engine.rb:652:in `block in load_config_initializer',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/notifications.rb:166:in `instrument',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/engine.rb:651:in `load_config_initializer',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/engine.rb:615:in `each',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/engine.rb:615:in `block in <class:Engine>',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/initializable.rb:30:in `instance_exec',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/initializable.rb:30:in `run',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/initializable.rb:55:in `block in run_initializers',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/initializable.rb:44:in `each',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/initializable.rb:44:in `tsort_each_child',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/initializable.rb:54:in `run_initializers',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/application.rb:352:in `initialize!',
/opt/conjur-server/config/environment.rb:19:in `<top (required)>',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:274:in `require',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:274:in `block in require',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:240:in `load_dependency',
/var/lib/gems/2.5.0/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:274:in `require',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/application.rb:328:in `require_environment!',
/var/lib/gems/2.5.0/gems/railties-4.2.11/lib/rails/application.rb:457:in `block in run_tasks_blocks',
Tasks: TOP => db:migrate => db:migrate:load => environment,
(See full trace by running task with --trace),
error: exit,

@sgnn7
Copy link
Contributor

sgnn7 commented Apr 7, 2020

@sigalsax: @hertus is correct so I'll change this story to be centered around documenting common failure issues.

@sgnn7 sgnn7 changed the title Argument Error invalid base64 has been fixed Document troubleshooting of Argument Error: invalid base64 Apr 7, 2020
@ravics09
Copy link

ravics09 commented Feb 4, 2021

I run the below command to set master key as environment variable on windows 10.

set CONJUR_DATA_KEY="$(< data_key)"

After that conjur/server restarting and not able to generate conjur account .

@izgeri
Copy link
Contributor

izgeri commented Feb 9, 2021

We do have a troubleshooting section in our README now - we should probably add the common failure modes around the Conjur data key to that section at this point.

@ravics09 are you experiencing an issue with your server? Since this issue is specifically about adding troubleshooting documentation, if you have an issue not covered by the proposed documentation, I'd encourage you to file a separate issue in this project that describes your problem. You can also post on discourse - we'd be happy to chat about your setup there.

@szh
Copy link
Contributor

szh commented Feb 6, 2023

I'm going to close this since it's old and may not be relevant anymore. Please reopen if it's still an issue.

@szh szh closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants