Cannot refresh the data from the vCenter

Hello everyone,

I’m new to ManageIQ and like what I have seen, however I am having an issue with refreshing the data from our vCenter. When I added it originially it synced all the data, but after that it is not willing to refresh the data anymore. The error I’m seeing in the logs is pasted below. Big thanks in advance!

[----] E, [2021-02-23T09:23:39.042641 #694106:2aca4f606b04] ERROR -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#vim_collector) EMS: [vcenter], id: [3] Refresh failed
[----] E, [2021-02-23T09:23:39.043022 #694106:2aca4f606b04] ERROR -- : [ActiveRecord::ConnectionTimeoutError]: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use  Method:[block (2 levels) in <class:LogProxy>]
[----] E, [2021-02-23T09:23:39.043368 #694106:2aca4f606b04] ERROR -- : /opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:in `block in wait_poll'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `loop'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `wait_poll'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:151:in `internal_poll'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:277:in `internal_poll'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:145:in `block in poll'
/usr/share/ruby/monitor.rb:230:in `mon_synchronize'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:155:in `synchronize'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:145:in `poll'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:818:in `acquire_connection'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/connection_handling.rb:90:in `connection'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:76:in `connection'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:530:in `alias_tracker'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/association_scope.rb:26:in `scope'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/association_scope.rb:7:in `scope'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/association.rb:90:in `association_scope'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/association.rb:79:in `scope'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/collection_association.rb:287:in `scope'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/collection_association.rb:305:in `find_target'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/collection_association.rb:272:in `load_target'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/collection_proxy.rb:46:in `load_target'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/associations/collection_proxy.rb:1004:in `records'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/relation/delegation.rb:71:in `each'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/relation/query_methods.rb:226:in `select'
/opt/manageiq/manageiq-gemset/gems/activerecord-5.2.4.4/lib/active_record/relation/query_methods.rb:226:in `select'
/var/www/miq/vmdb/app/models/mixins/authentication_mixin.rb:85:in `authentication_userid_passwords'
/var/www/miq/vmdb/app/models/mixins/authentication_mixin.rb:491:in `available_authentications'
/var/www/miq/vmdb/app/models/mixins/authentication_mixin.rb:257:in `authentication_type'
/var/www/miq/vmdb/app/models/mixins/authentication_mixin.rb:479:in `authentication_best_fit'
/var/www/miq/vmdb/app/models/mixins/authentication_mixin.rb:157:in `auth_user_pwd'
/opt/manageiq/manageiq-gemset/bundler/gems/manageiq-providers-vmware-eb218a96aad1/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:137:in `vim_connect'
/opt/manageiq/manageiq-gemset/bundler/gems/manageiq-providers-vmware-eb218a96aad1/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:61:in `vim_collector'
/opt/manageiq/manageiq-gemset/bundler/gems/manageiq-providers-vmware-eb218a96aad1/app/models/manageiq/providers/vmware/infra_manager/inventory/collector.rb:55:in `block in vim_collector_thread'

Hi @Flaya1278

That sounds like the bug that Move save_inventory thread out of the inventory collector by agrare · Pull Request #700 · ManageIQ/manageiq-providers-vmware · GitHub fixed, caused by Clear cached tags after finishing a full refresh by agrare · Pull Request #695 · ManageIQ/manageiq-providers-vmware · GitHub

Can you try applying those two patches and see if that resolves it for you?

1 Like

Hello @agrare,

thank you very much, seems to be working perfectly now! I changed the collector.rb, saver.rb, runner.rb, refresher.rb, virtual_machine.rb but I didn’t have the parser_spec.rb refresher_spec.rb files, so I created those.

Awesome! You don’t need the *_spec.rb files, they’re tests and aren’t included in the production build.