{"record":{"id":"e32d563872f111b2","repo":"hashicorp/vagrant","slug":"vagrant-failed-to-load-a-configured-plugin-source","errorCode":null,"errorMessage":"Vagrant failed to load a configured plugin source. This can be caused by a variety of issues including: transient connectivity issues, proxy filtering rejecting access to a configured plugin source, or a configured plugin source not responding correctly. Please review the error message below to help resolve the issue:\n\n  %{error_msg}\n\nSource: %{source}","messagePattern":"Vagrant failed to load a configured plugin source\\. This can be caused by a variety of issues including: transient connectivity issues, proxy filtering rejecting access to a configured plugin source, or a configured plugin source not responding correctly\\. Please review the error message below to help resolve the issue:\n\n  %(.+?)\n\nSource: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::PluginSourceError","httpStatus":null,"severity":"error","filePath":"lib/vagrant/bundler.rb","lineNumber":718,"sourceCode":"        end\n      end\n      list.values\n    end\n\n    # Iterates each configured RubyGem source to validate that it is properly\n    # available. If source is unavailable an exception is raised.\n    def validate_configured_sources!\n      Gem.sources.each_source do |src|\n        begin\n          src.load_specs(:released)\n        rescue Gem::Exception => source_error\n          if ENV[\"VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS\"]\n            @logger.warn(\"Failed to load configured plugin source: #{src}!\")\n            @logger.warn(\"Error received attempting to load source (#{src}): #{source_error}\")\n            @logger.warn(\"Ignoring plugin source load failure due user request via env variable\")\n          else\n            @logger.error(\"Failed to load configured plugin source `#{src}`: #{source_error}\")\n            raise Vagrant::Errors::PluginSourceError,\n              source: src.uri.to_s,\n              error_msg: source_error.message\n          end\n        end\n      end\n    end\n\n    # Generate the builtin resolver set\n    def generate_builtin_set(system_plugins=[])\n      builtin_set = BuiltinSet.new\n      @logger.debug(\"Generating new builtin set instance.\")\n      vagrant_internal_specs.each do |spec|\n        if !system_plugins.include?(spec.name)\n          builtin_set.add_builtin_spec(spec)\n        end\n      end\n      builtin_set\n    end","sourceCodeStart":700,"sourceCodeEnd":736,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/bundler.rb#L700-L736","documentation":"PluginSourceError is raised by Vagrant::Bundler#validate_configured_sources! (lib/vagrant/bundler.rb:718) when a configured gem source fails src.load_specs(:released) with a Gem::Exception. It fires during plugin install/update (called from the install path at bundler.rb:581) and names both the failing source URI and the underlying error.","triggerScenarios":"Running 'vagrant plugin install/update/expunge' while one of the configured gem sources (default rubygems/Vagrant Cloud endpoint, or one added with 'vagrant plugin source add') is unreachable, filtered by a proxy, or returns a bad response. Setting VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS makes it log-and-continue instead of raising.","commonSituations":"Corporate proxies/MITM filtering blocking gems.rabbitmq.com-style or internal Artifactory/Gemfury sources; air-gapped machines; stale custom sources left from old team infrastructure; transient rubygems.org outages.","solutions":["Test the source directly: 'gem fetch -s <source> rails' or curl the source's /specs.*/ endpoint to see the real failure","Remove dead custom sources: 'vagrant plugin source list' then 'vagrant plugin source remove <url>'","Fix network/proxy env (HTTPS_PROXY, SSL_CERT_FILE) so the source is reachable","As an explicit opt-out for flaky sources, set VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS=1 (the code path in the source shows it only warns then)"],"exampleFix":"# before\nvagrant plugin install vagrant-share   # PluginSourceError from dead source\n\n# after\nvagrant plugin source remove https://gems.old-corp.internal\nvagrant plugin install vagrant-share\n# or bypass when the source is known-flaky:\nVAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS=1 vagrant plugin install vagrant-share","handlingStrategy":"retry","validationCode":"require 'net/http'\nsources = `vagrant plugin source list`.split(\"\\n\")\nsources.each do |s|\n  uri = URI.join(URI(s), '/specs.4.8.gz') rescue URI(s)\n  code = Net::HTTP.get_response(uri).code rescue 'ERR'\n  warn \"source #{s} unhealthy (#{code})\" unless code == '200'\nend","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Bundler::new.init!([]) # plugin install path\nrescue Vagrant::Errors::PluginSourceError => e\n  retry_after_backoff(e) or raise # transient rubygems hiccups often clear\nend","preventionTips":["Prune stale sources with 'vagrant plugin source remove' when infra changes","Pin internal Artifactory/Gemfury sources in provisioning docs and keep them monitored"],"tags":["vagrant","plugin","gem","source","network","bundler"],"backgroundTag":"package-registry-unreachable","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}