[ovirt-devel] Unable to access REST api

Juan Hernández jhernand at redhat.com
Tue Sep 5 19:10:32 UTC 2017


On 09/05/2017 08:49 PM, Marc Young wrote:
> While attempting to run some code using the ruby SDK i was never able to
> log in successfully (despite being logged into the Administrator portal)
> 
> I was met with an SSO error[1].
> I then attempted to get to the REST docs (/ovirt-engine/api/v4/model) and
> was unable to log in there as well.
> 
> Im now locked out of the administrator portal with the error:
> 
>   Cannot Login. User Account is Disabled or Locked, Please contact your
> system administrator.
> 
> 
> a) what did i do wrong per the ruby sdk to lock myself out

Maybe used a wrong password multiple times? I think what we lock the 
account after certain number of failed login attempts.

> b) how can i unlock my admin account?

In the engine machine use the "ovirt-aaa-jdbc-tool" command:

   # ovirt-aaa-jdbc-tool user unlock admin

Martin, Ondra, can you confirm?

> c) how can i prevent this from locking me out in the future?

Make sure that you don't use wrong passwords.

If you still have problems, enable the debug option of the SDK and share 
the generated log, so we can see what is happening. Be aware that the 
debug log will contain your password.

> 
> Server version is 4.1.0.4-1.el7.centos
> 
> [1]
> 
> Bringing machine 'default' up with 'ovirt4' provider...
> ==> default: Creating VM with the following settings...
> ==> default:  -- Name:          jenkins
> ==> default:  -- Cluster:       Default
> ==> default:  -- Template:      centos-6-x86_64-v1608
> ==> default:  -- Console Type:  vnc
> ==> default:  -- BIOS Serial:
> ==> default:  -- Memory:
> ==> default:  ---- Memory:      2048 MB
> ==> default:  ---- Maximum:     2048 MB
> ==> default:  ---- Guaranteed:  2048 MB
> ==> default:  -- Cpu:
> ==> default:  ---- Cores:       1
> ==> default:  ---- Sockets:     1
> ==> default:  ---- Threads:     1
> ==> default:  -- Cloud-Init:    true
> ==> default: An error occured. Recovering..
> ==> default: VM is not created. Please run `vagrant up` first.
> /home/myoung/.rvm/gems/ruby-2.3.1/gems/ovirt-engine-sdk-4.1.8/lib/ovirtsdk4/connection.rb:266:in
> `create_access_token': Error during SSO authentication: access_denied:
> Cannot authenticate user 'admin at internal': Cannot Login. User Account is
> Disabled or Locked, Please contact your system administrator..
> (OvirtSDK4::Error)
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/gems/ovirt-engine-sdk-4.1.8/lib/ovirtsdk4/connection.rb:217:in
> `send'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/gems/ovirt-engine-sdk-4.1.8/lib/ovirtsdk4/service.rb:172:in
> `internal_add'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/gems/ovirt-engine-sdk-4.1.8/lib/ovirtsdk4/services.rb:29450:in
> `add'
>          from
> /home/myoung/repos/github/vagrant-ovirt4/lib/vagrant-ovirt4/action/create_vm.rb:68:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:34:in
> `call'
>          from
> /home/myoung/repos/github/vagrant-ovirt4/lib/vagrant-ovirt4/action/set_name_of_domain.rb:17:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:34:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:95:in
> `block in finalize_action'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:34:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/builder.rb:116:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/runner.rb:66:in
> `block in run'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/util/busy.rb:19:in
> `busy'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/runner.rb:66:in
> `run'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/builtin/call.rb:53:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:34:in
> `call'
>          from
> /home/myoung/repos/github/vagrant-ovirt4/lib/vagrant-ovirt4/action/connect_ovirt.rb:31:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:34:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/builtin/config_validate.rb:25:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:34:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/builtin/handle_box.rb:56:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/warden.rb:34:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/builder.rb:116:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/runner.rb:66:in
> `block in run'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/util/busy.rb:19:in
> `busy'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/action/runner.rb:66:in
> `run'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/machine.rb:225:in
> `action_raw'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/machine.rb:200:in
> `block in action'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/environment.rb:567:in
> `lock'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/machine.rb:186:in
> `call'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/machine.rb:186:in
> `action'
>          from
> /home/myoung/.rvm/gems/ruby-2.3.1/bundler/gems/vagrant-4572267c33f4/lib/vagrant/batch_action.rb:82:in
> `block (2 levels) in run'
> 
> 
> 
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
> 



More information about the Devel mailing list