-
Notifications
You must be signed in to change notification settings - Fork 74
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
Cannot disable yum proxy #54
Comments
Hmm, The But yeah, I didn't think there would be need for ignoring a config while configuring globally otherwise. I think I'll introduce the But might take some days, as I'm still recovering from an intercontinental moving with my family. =) |
hi@all below maybe helpful outputs to fix this behav. thx for the fixation in advance! Error: Could not prefetch package provider 'yum': Execution of '/usr/bin/python /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py' returned 1: Loaded plugins: fastestmirror, presto, versionlock
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 5 - "Couldn't resolve proxy 'false'"
Traceback (most recent call last):
File "/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 115, in <module>
ypl = pkg_lists(my)
File "/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py", line 40, in pkg_lists
my.doTsSetup()
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 84, in doTsSetup
return self._getTs()
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 279, in populateSack
self.doSetup()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 105, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 197, in postreposetup_hook
if downgrade_ftp and _len_non_ftp(repo.urls) == 1:
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 699, in <lambda>
urls = property(fget=lambda self: self._geturls(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 696, in _geturls
self._baseurlSetup()
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 662, in _baseurlSetup
self.check()
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 426, in check
'Cannot find a valid baseurl for repo: %s' % self.id
yum.Errors.RepoError: Cannot find a valid baseurl for repo: base BTW I get trouble with setting of proxy for npm here is the output for % vagrant provision
[default] Configuring proxy environment variables...
[default] Configuring proxy for npm...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/usr/bin/npm config delete proxy
Stdout from the command:
Stderr from the command:
npm ERR! Error: ENOENT, unlink '/root/.npmrc'
npm ERR! If you need help, you may report this log at:
npm ERR! <https://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Linux 2.6.32-431.3.1.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "config" "delete" "proxy"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.6
npm ERR! path /root/.npmrc
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm ERR! not ok code 0
1 and cut from Vagrantfile VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# auto detect proxy values from environment
# ===============================
config.proxy.http = ENV['HTTP_PROXY'] || ENV['http_proxy'] || ''
config.proxy.https = ENV['HTTPS_PROXY'] || ENV['https_proxy'] || ''
config.proxy.ftp = ENV['FTP_PROXY'] || ENV['ftp_proxy'] || ''
config.proxy.no_proxy = ENV['NO_PROXY'] || ENV['no_proxy'] || '' |
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 5 - "Couldn't resolve proxy 'false'"
´´´
|
@olekhy thanks a lot, the information really helps! The first issue is clearly an NPM bug. IT has been reported multiple times (and even by you!): npm/npm#5065, npm/npm#5160, npm/npm#5223. But we can hack around it by creating the rc file if needed. The yum issue is still a mystery. Based on the logs it seems that vagrant-proxyconf works as expected. I have to see if I can reproduce it (on CentOS I guess). |
Yep centos6. If needed I can paste an URL to the box which we used in vagrant. |
That would probably help. I don't normally work with CentOS and have been using some Bento boxes for testing. |
Sorry, haven't found time for this yet. Trying hard on Thursday. |
Many thx for this because I work by the (crappy) way at office need to install proxyconf and set up proxy in Vagrantfile otherwise at home reverting all. |
Work around npm/npm#5065 Ref: #54 Cc: @olekhy
@olekhy OK, finally found the time to reproduce the yum issue, and it was actually bug in writing /etc/environment. That and the npm issue should now be fixed in master. I plan on releasing them tomorrow. |
Fyi, the npm bug should be fixed in npm v1.4.17 and later. And the yum bug in vagrant-proxyconf v1.3.2. |
thx 🙇 |
fastestmirror still causes issues https://wiki.centos.org/PackageManagement/Yum/FastestMirror says
So I think it should be disabled because we are behind a proxy server, I am still having issues with it. sudo sed -i 's/.*enabled=.*/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf patch #148 disables |
Using the following Vagrantfile (and setting the environment variables) does not seem to work:
Where the environment variables are:
I've also tried setting
VAGRANT_YUM_HTTP_PROXY
to nil and it also does not work. Unfortunately I run into this because the image I am provisioning on is already setup with a local RedHat satellite cache for RPMs.The text was updated successfully, but these errors were encountered: