hello Team,
need some help here, struggling since yesterday. everything works fine via cmd line but when put into config password filed is alone doesnt get picked up.
Problem: hammer cli failing to connect foreman with ‘unable to authenticate user’ though password is configured in .hammer/cli.mdoules.d/foreman.yml its not picking it up.
if i user cmdline hammer -p <> subnet list, it works fine. It just not picking up the password field from config.
hammer cli version : 0.17.0 , tried with 0.18.1 too same problem
running this from '‘docker debian container’
rubby : 2.3.3-p222
foreman version : 1.20.3
Other relevant data:
hammer -d subnet list
[ INFO 2019-12-06T11:38:02 Init] Initialization of Hammer CLI (0.17.1) has started…
[DEBUG 2019-12-06T11:38:02 Init] Running at ruby 2.3.3-p222
[ INFO 2019-12-06T11:38:02 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2019-12-06T11:38:02 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2019-12-06T11:38:02 Init] Configuration from the file /usr/local/airflow/.hammer/cli_config.yml has been loaded
[ INFO 2019-12-06T11:38:02 Init] Configuration from the file /usr/local/airflow/.hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2019-12-06T11:38:03 SSLoptions] SSL options: {
:verify_ssl => false
}
[DEBUG 2019-12-06T11:38:03 API] Global headers: {
:content_type => “application/json”,
:accept => “application/json;version=2”,
“Accept-Language” => “en”
}
[DEBUG 2019-12-06T11:38:03 API] Follow redirects: never
[DEBUG 2019-12-06T11:38:03 Connection] Registered: foreman
[ INFO 2019-12-06T11:38:03 Modules] Extension module hammer_cli_foreman (0.17.0) loaded.
[DEBUG 2019-12-06T11:38:03 Init] Using locale ‘en’
[ INFO 2019-12-06T11:38:03 HammerCLI::MainCommand] Called with options: {“option_debug”=>true}
[ INFO 2019-12-06T11:38:03 HammerCLIForeman::Subnet] Called with options: {}
[ INFO 2019-12-06T11:38:03 HammerCLIForeman::Subnet::ListCommand] Called with options: {}
[ INFO 2019-12-06T11:38:03 API] Server: https://xyz-foreman.com/
[ INFO 2019-12-06T11:38:03 API] GET /api/subnets
[DEBUG 2019-12-06T11:38:03 API] Params: {
“page” => 1,
“per_page” => 1000
}
[DEBUG 2019-12-06T11:38:03 API] Headers: {
:params => {
“page” => 1,
“per_page” => 1000
}
}
[DEBUG 2019-12-06T11:38:03 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2019-12-06T11:38:03 API] 401 Unauthorized
[DEBUG 2019-12-06T11:38:03 API] {
“error” => {
“message” => “Unable to authenticate user svc_airflow”
}
}
[DEBUG 2019-12-06T11:38:03 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_foreman_unauthorized
[ERROR 2019-12-06T11:38:03 Exception] Unable to authenticate user svc_airflow
Unable to authenticate user svc_airflow
[ERROR 2019-12-06T11:38:03 Exception]
HammerCLIForeman::Api::UnauthorizedError (Unable to authenticate user svc_airflow):
/usr/lib/ruby/vendor_ruby/apipie_bindings/api.rb:249:in rescue in http_call' /usr/lib/ruby/vendor_ruby/apipie_bindings/api.rb:238:in
http_call’
/usr/lib/ruby/vendor_ruby/apipie_bindings/api.rb:190:in call_action' /usr/lib/ruby/vendor_ruby/apipie_bindings/api.rb:185:in
call’
/usr/lib/ruby/vendor_ruby/apipie_bindings/resource.rb:21:in call' /usr/lib/ruby/vendor_ruby/hammer_cli/apipie/command.rb:53:in
send_request’
/usr/lib/ruby/vendor_ruby/hammer_cli_foreman/commands.rb:168:in send_request' /usr/lib/ruby/vendor_ruby/hammer_cli_foreman/commands.rb:227:in
send_request’
/usr/lib/ruby/vendor_ruby/hammer_cli_foreman/commands.rb:276:in retrieve_all' /usr/lib/ruby/vendor_ruby/hammer_cli_foreman/commands.rb:246:in
execute’
/usr/lib/ruby/vendor_ruby/clamp/command.rb:63:in run' /usr/lib/ruby/vendor_ruby/hammer_cli/abstract.rb:69:in
run’
/usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in execute' /usr/lib/ruby/vendor_ruby/clamp/command.rb:63:in
run’
/usr/lib/ruby/vendor_ruby/hammer_cli/abstract.rb:69:in run' /usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in
execute’
/usr/lib/ruby/vendor_ruby/clamp/command.rb:63:in run' /usr/lib/ruby/vendor_ruby/hammer_cli/abstract.rb:69:in
run’
/usr/lib/ruby/vendor_ruby/clamp/command.rb:132:in run' /usr/bin/hammer:147:in
’