Yum http error 407 proxy authentication required

Hello everyone, I have this problem:

MenozziSara

Posts: 12
Joined: 2010/11/16 08:58:27
Location: Modena, IT

problem with yum and proxy

Hello everyone,
I have this problem:

[root@localhost ~]# yum install yum-fastestmirror
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
* c5-media:
http://mirror.centos.org/centos/5/addons/i386/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost ~]#

I have alredy modified yum.conf

[main]
proxy=http://menozzis:al*********85@sgproxy:80/
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn’t honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

what is the problem?

Thanks a lot

Sara


User avatar

TrevorH

Site Admin
Posts: 32529
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem with yum and proxy

Post

by TrevorH » 2010/11/16 13:27:58

man yum.conf and search for proxy — you need to set proxy_username and _password


MenozziSara

Posts: 12
Joined: 2010/11/16 08:58:27
Location: Modena, IT

Re: problem with yum and proxy

Post

by MenozziSara » 2010/11/16 15:06:41

Thank you for the suggestion, but now I have this problem

[root@localhost ~]# yum install yum-fastestmirror
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
http://mirror.centos.org/centos/5/addons/i386/repodata/repomd.xml: [Errno 4] IOError:
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost ~]#

My yum.conf is the following

[main]
proxy_username=siadommenozzis
proxy_password=al*****85
proxy=http://siadommenozzis:al*****85@sgproxy:80/
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn’t honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

How can I fix it?


User avatar

TrevorH

Site Admin
Posts: 32529
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem with yum and proxy

Post

by TrevorH » 2010/11/16 17:30:08

You’ve left your username and password in the proxy= line in yum.conf.


MenozziSara

Posts: 12
Joined: 2010/11/16 08:58:27
Location: Modena, IT

Re: problem with yum and proxy

Post

by MenozziSara » 2010/11/17 09:00:32

I have followed the instruction to set the yum setting an now my yum.conf is

[main]
proxy_username=siadommenozzis
proxy_password=al*****85
proxy=http://proxy_username:proxy_password@sgproxy:80/
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn’t honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

but still the same type of problem.

I then followed AlanBartlett’s instruction reported in the post CentOS 5 — Application e Software Support —> fastestmirror installation problem end the result is as follows

[root@localhost ~]# yum —enablerepo * —disablerepo c5-media clean all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=centosplus error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=contrib error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@localhost ~]# yum —disablerepo addons check-update
Loaded plugins: fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
http://mirror.centos.org/centos/5/os/i386/repodata/repomd.xml: [Errno 4] IOError:
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@localhost ~]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
http://mirror.centos.org/centos/5/addons/i386/repodata/repomd.xml: [Errno 4] IOError:
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost ~]#

what should I do?
I have to solve th problem because ihave to install OpenNMS

thanks a lot
Sara


MenozziSara

Posts: 12
Joined: 2010/11/16 08:58:27
Location: Modena, IT

Re: problem with yum and proxy

Post

by MenozziSara » 2010/11/17 09:20:49

I have noticed an error …
I do not know why during the copy / paste text changed
My yum.conf is as follows

[Principale]
proxy_username = siadom menozzis
proxy_password = al*****85
proxy = http://proxy_username:proxy_password @ sgproxy: 80 /
cachedir = / var / cache / yum
keepcache = 0
debuglevel = 2
logfile = / var / log / yum.log
redhat-release distroverpkg =
tollerante = 1
exactarch = 1
obsoletes = 1
gpgcheck = 1
plugins = 1

# Nota: yum-RHN-plugin non onorare questo.
metadata_expire = 1h

# Predefinito.
# Installonly_limit = 3

# METTERE IL VOSTRO REPOS qui o in file separati denominati file.repo
# In / etc / yum.repos.d


User avatar

TrevorH

Site Admin
Posts: 32529
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem with yum and proxy

Post

by TrevorH » 2010/11/17 10:15:09

You [b]still[/b] have your username/password in the proxy= line!

Try

[code]
proxy_username=siadommenozzis
proxy_password=al*****85
proxy = http://sgproxy:80/
[/code]


MenozziSara

Posts: 12
Joined: 2010/11/16 08:58:27
Location: Modena, IT

Re: problem with yum and proxy

Post

by MenozziSara » 2010/11/17 10:35:19

I’m sorry I did not understand
now I feel
thanks for your support!


MenozziSara

Posts: 12
Joined: 2010/11/16 08:58:27
Location: Modena, IT

Re: problem with yum and proxy

Post

by MenozziSara » 2010/11/17 10:45:16

I tried the changes but now has returned to the initial problem

[root@localhost ~]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
http://mirror.centos.org/centos/5/addons/i386/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost ~]#

??????


User avatar

TrevorH

Site Admin
Posts: 32529
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem with yum and proxy

Post

by TrevorH » 2010/11/17 12:01:24

I don’t have a Microsoft proxy server to test with but I did just set my yum up with these settings to go via a squid proxy and I get your symptoms if my username or password is wrong.

[code]
[main]

proxy=http://proxy.mysite.com:3128/
proxy_username=myusername
proxy_password=password1234
[/code]

I did find that it is sensitive to embedded spaces in the proxy_username and proxy_password lines so that

[code]
proxy_password=password1234
[/code]

works but

[code]
proxy_password = password1234
[/code]

does not.


Содержание

  1. CentOS
  2. WGET not working with proxy
  3. WGET not working with proxy
  4. Re: WGET not working with proxy
  5. Re: WGET not working with proxy
  6. Re: WGET not working with proxy
  7. Re: WGET not working with proxy
  8. Re: WGET not working with proxy
  9. Re: WGET not working with proxy
  10. CentOS
  11. problem with yum and proxy
  12. problem with yum and proxy
  13. Re: problem with yum and proxy
  14. Re: problem with yum and proxy
  15. Re: problem with yum and proxy
  16. Re: problem with yum and proxy
  17. CentOS
  18. [SOLVED] http_proxy setting no effect (yum)
  19. [SOLVED] http_proxy setting no effect (yum)

CentOS

The Community ENTerprise Operating System

WGET not working with proxy

WGET not working with proxy

Post by AndyDev » 2016/09/27 00:16:54

Hi Folks,
I have a basic Centos 7 install running on a Windows VM. The host machine has NAT configured and is behind a proxy server. I have configured yum and firefox to work with the proxy and these can access the internet just fine. The issue is that WGET is returning an Error 407 proxy authorization error. It is returning the correct proxy cname and address, but appears to be failing to present the credentials correctly.

I see the messages Resolving. connecting. proxy request sent. Awaiting reponse 407 Proxy AUthorization required.

I have also tried to specify the credentials on the WGET command line using the —user —password options but these are also ignored.

Does anyone have an idea on how to get this working?

Re: WGET not working with proxy

Post by avij » 2016/09/27 06:29:27

Use —proxy-user and —proxy-password instead.

Or rather, set up an environment variable http_proxy (and possibly https_proxy) like http://username:password@proxy.example.com:proxyport which will be automatically picked up by wget.

Re: WGET not working with proxy

Post by AndyDev » 2016/09/27 20:42:44

Hi thanks,
I have tried both of those and they do not work, I still get 407 Proxy Authentication required.

As I have said, yum and Mozilla work fine, so I know I have network connectivity and their proxy settings configured correctly.

Also, is there any particular reason why every single application needs to have its own proxy configuration settings?

Re: WGET not working with proxy

Post by avij » 2016/09/27 21:01:32

(no, I don’t have a properly configured proxy to test with, but looks like this would use the proxy)

Setting the http_proxy environment variable should cover most of the command line utilities, not only wget.

Re: WGET not working with proxy

Post by mghe » 2016/09/27 22:02:31

Read this post in fedora forum, everything clear explain.

Re: WGET not working with proxy

Post by AndyDev » 2016/09/28 01:02:57

(no, I don’t have a properly configured proxy to test with, but looks like this would use the proxy)

Setting the http_proxy environment variable should cover most of the command line utilities, not only wget.

Yes, It is correctly resolving and sending, but it is not sending the credentials correctly by the looks of things [or in a format the proxy understands]. Hence the 407

The actual last part of the message is. connecting to myproxy.domain.local|199.199.199.01:1234 . connected.
Proxy request sent, awaiting response. 407 Proxy Authorisation Required.

This makes me think that it is not processing the credentials correctly. Note that I have also updated the wgetrc file to ensure that contains the correct info and I set passive=on as well.

Re: WGET not working with proxy

Post by mghe » 2016/09/28 06:18:51

Other apps works ? like yum,

Do you have special characters in password ?

Источник

CentOS

The Community ENTerprise Operating System

problem with yum and proxy

problem with yum and proxy

Post by MenozziSara » 2010/11/16 12:21:49

Hello everyone,
I have this problem:

]# yum install yum-fastestmirror
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
* c5-media:
http://mirror.centos.org/centos/5/addons/i386/repodata/repomd.xml: [Errno 14] HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost

I have alredy modified yum.conf

[main]
proxy=http://menozzis:al*********85@sgproxy:80/
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn’t honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

what is the problem?

Re: problem with yum and proxy

Post by TrevorH » 2010/11/16 13:27:58

Re: problem with yum and proxy

Post by MenozziSara » 2010/11/16 15:06:41

Thank you for the suggestion, but now I have this problem

]# yum install yum-fastestmirror
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
http://mirror.centos.org/centos/5/addons/i386/repodata/repomd.xml: [Errno 4] IOError:
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost

My yum.conf is the following

[main]
proxy_username=siadommenozzis
proxy_password=al*****85
proxy=http://siadommenozzis:al*****85@sgproxy:80/
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn’t honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

How can I fix it?

Re: problem with yum and proxy

Post by TrevorH » 2010/11/16 17:30:08

Re: problem with yum and proxy

Post by MenozziSara » 2010/11/17 09:00:32

I have followed the instruction to set the yum setting an now my yum.conf is

[main]
proxy_username=siadommenozzis
proxy_password=al*****85
proxy=http://proxy_username:proxy_password@sgproxy:80/
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn’t honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

but still the same type of problem.

I then followed AlanBartlett’s instruction reported in the post CentOS 5 — Application e Software Support —> fastestmirror installation problem end the result is as follows

]# yum —enablerepo * —disablerepo c5-media clean all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=centosplus error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=contrib error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@localhost

]# yum —disablerepo addons check-update
Loaded plugins: fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
http://mirror.centos.org/centos/5/os/i386/repodata/repomd.xml: [Errno 4] IOError:
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@localhost

]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was
[Errno 4] IOError:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates error was
[Errno 4] IOError:
http://mirror.centos.org/centos/5/addons/i386/repodata/repomd.xml: [Errno 4] IOError:
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost

what should I do?
I have to solve th problem because ihave to install OpenNMS

Источник

CentOS

The Community ENTerprise Operating System

[SOLVED] http_proxy setting no effect (yum)

[SOLVED] http_proxy setting no effect (yum)

Post by jack » 2011/12/14 09:01:55

I am setting correctly for yum’s proxy and proxy username and password, but still get HTTP Error 407. If I am right, HTTP Error 407 means need proxy auth.
(1)I have centos6 installed in Oracle virtualbox. the host is windows xp.
(2)I use bridged for centos6.
(3)Both windows xp and centos6 using proxy to connect to internet(our company using proxy 172.20.20.237:8080).
(4)I can open the www.centos.com via Firfox in centos6.

I have problem with the following command:

]# yum install telnet-server

Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: HTTP Error 407 : http://mirrorlist.centos.org/?release=6&arch=i386&repo=os
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=extras error was
14: HTTP Error 407 : http://mirrorlist.centos.org/?release=6&arch=i386&repo=extras
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=updates error was
14: HTTP Error 407 : http://mirrorlist.centos.org/?release=6&arch=i386&repo=updates
http://mirror.ta139.com/centos/6.1/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 407 : http://mirror.ta139.com/centos/6.1/os/i386/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

# Get the aliases and functions
if [ -f

# User specific environment and startup programs

http_proxy=»http://LondonTom Yang:Password1234x@172.20.20.237:8080″
export http_proxy

the file /etc/yum.repos.d/CentOS-Base.repo

# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=Cent-OS-$releasever — Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.ta139.com/centos/6.1/os/i386
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever — Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever — Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever — Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib — packages by Centos Users
[contrib]
name=CentOS-$releasever — Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

the file /etc/yum.conf

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
#proxy=http://172.20.20.237:8080/
#proxy_username=LondonTom Yang
#proxy_password=Password1234x

# This is the default, if you make this bigger yum won’t see if the metadata
# is newer on the remote and so you’ll «gain» the bandwidth of not having to
# download the new metadata and «pay» for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don’t keep old packages around. If you don’t like this checking

the file /etc/resolv.conf

# Generated by NetworkManager
domain shanghai.lom.com
search shanghai.lom.com
nameserver 172.20.11.10
nameserver 8.8.8.8 #this line is added by me

I search the internet, HTTP Error 407 means need proxy auth, but I have offered correct name and password.
The name is: LondonTom Yang, there is a space between Tom and Yang, and also there is London prefix, is this cause the auth failed?
but when I open page in the Firefox, I put the same username and password, it auth is ok and the request page opened.

Источник

Why am I receiving errors when using yum on my EC2 instance running Amazon Linux 1 or Amazon Linux 2?

Last updated: 2022-11-21

Why am I receiving errors when using yum on my Amazon Elastic Compute Cloud (Amazon EC2) instance running Amazon Linux 1 or Amazon Linux 2?

Short description

Use the output messages of the yum command to determine what error occurred. The following are common error messages:

  • Connection timed out XXX milliseconds
  • HTTP Error 403 — Forbidden
  • Could not resolve host: xxxxxxxxx.$awsregion.$awsdomain
  • HTTP Error 407 — Proxy Authentication Required
  • Resolving timed out after 5000 milliseconds

Resolution

Connection timed out XXXX milliseconds

1.    Verify that the security group attached to your EC2 instance allows outbound http/https traffic.

2.    Verify that the network ACLs associated with your EC2 instance’s subnet allows outbound http/https traffic through your NACLs.

The following example shows a custom network ACL that allows outbound traffic on port 80 and 443:

Inbound rules
Rule#    Type                    Protocol    Port Range    Source        Allow/Deny
100      Custom TCP Rule         TCP (6)     1024-65535    0.0.0.0/0     ALLOW
101      Custom TCP Rule         TCP (6)     1024-65535    ::/0          ALLOW
*        ALL Traffic             ALL         ALL           ::/0          DENY
*        ALL Traffic             ALL         ALL           0.0.0.0/0     DENY

Outbound rules
Rule #    Type                   Protocol    Port Range    Source       Allow/Deny
100       HTTP (80)              TCP (6)     80            0.0.0.0/0    ALLOW
101       HTTPS (443)            TCP (6)     443           0.0.0.0/0    ALLOW
102       HTTP (80)              TCP (6)     80            ::/0         ALLOW
103       HTTPS (443)            TCP (6)     443           ::/0         ALLOW
*         ALL Traffic            ALL         ALL           ::/0         DENY
*         ALL Traffic            ALL         ALL           0.0.0.0/0    DENY

3.    Verify that your EC2 instance has access to Amazon Linux repositories using one of the following options

  • Your instance is in a public subnet with an internet gateway. For more information, see Turn on internet access.
  • Your instance is in a private subnet with a NAT gateway. For more information, see NAT gateways.
  • Your instance is in a private subnet with a NAT instance. For more information, see NAT instances.
  • Your instance is in a public or private subnet with an Amazon Simple Storage Service (Amazon S3) VPC endpoint. For more information, see How can I update yum or install packages without internet access on EC2 instances running Amazon Linux 1 or Amazon Linux 2?
  • Your instance is in a private subnet with a proxy. To configure yum to use a proxy, modify the /etc/yum.conf file with the following parameters. In the following example, replace proxy-port, proxy-user-name, and proxy-password with the correct values for your proxy.
proxy=http://proxy-server-IP-address:proxy_port
proxy_username="proxy-user-name"
proxy_password="proxy-password"

For more information, see Using yum with a proxy server on the fedoraproject.org website.

4.    After configuring your instance using one of the preceding options, run the following curl command to confirm that the instance can access the repository. In the following command, replace us-east-1 with your instance’s Region.

Amazon Linux 1

curl -I repo.us-east-1.amazonaws.com

Amazon Linux 2

curl -I amazonlinux.us-east-1.amazonaws.com

Note: curl is pre-installed on all AMIs, but the Amazon Linux repositories aren’t accessible without credentials. curl can’t take the credentials of a yum repository. You receive an access denied error message similar to the one below. The curl command is used to test whether the timeout issue is still occurring. The error message shows that the network is reachable and the timeout issue is no longer occurring:

$ curl -I amazonlinux.us-east-1.amazonaws.com
HTTP/1.1 403 Forbidden
x-amz-bucket-region: us-east-1
x-amz-request-id: xxxxxxxx
x-amz-id-2: xxxxxxxxxxxxx=
Content-Type: application/xml
Date: Thu, 17 Nov 2022 16:59:59 GMT
Server: AmazonS3

To install software, such as telnet, run the following command:

HTTP Error 403 — Forbidden

1.    If you use an Amazon S3 VPC endpoint in your instance’s VPC, verify that the attached policy allows the s3:GetObject API call on the following resources:

Amazon Linux 1:

«arn:aws:s3:::packages.region.amazonaws.com/*»

«arn:aws:s3:::repo.region.amazonaws.com/*»

Amazon Linux 2:

«arn:aws:s3:::amazonlinux.region.amazonaws.com/*»

«arn:aws:s3:::amazonlinux-2-repos-region/*»

Note: Replace the Region in the preceding examples with your instance’s Region.

For more information, see Endpoint policies for Amazon S3.

2.    If you use a proxy to access Amazon Linux repositories, verify that the subdomains .amazonaws.com are on the allow list in your proxy configuration.

Could not resolve host: xxxxxxxx.$awsregion.$awsdomain

1.    Run the following commands to verify that the directory /etc/yum/vars defines the custom yum variables. The directory must include the variables awsdomain and awsregion. In the following example command, replace us-east-1 with your instance’s Region.

$ cat /etc/yum/vars/awsregion
us-east-1

$ cat /etc/yum/vars/awsdomain
amazonaws.com

2.    Verify the DNS resolution of your instance. The instance must resolve the domain name of the Amazon Linux repositories:

$ dig amazonlinux.us-east-1.amazonaws.com

$ dig repo.us-east-1.amazonaws.com

Queries to the Amazon provided DNS server at the 169.254.169.253 IPv4 address and the fd00:ec2::253 IPv6 address will succeed. Queries to the Amazon provided DNS server at the reserved IP address at the base of the VPC IPv4 network range plus two will also succeed. The IPv6 address is accessible only on EC2 instances built on the Nitro System.

HTTP Error 407 — Proxy Authentication Required

This occurs if your proxy can’t complete the request because yum doesn’t have proper authentication credentials for your proxy server. To configure yum to use a proxy, modify the /etc/yum.conf file with the following parameters:

proxy=http://proxy-server-IP-address:proxy_port
proxy_username=proxy-user-name
proxy_password=proxy-password

Resolving timed out after 5000 milliseconds

Run the following command to verify that the /etc/resolv.conf file has the correct IP for your DNS server:

cat /etc/resolv.conf
nameserver YourDNSIP

You can modify the time-out period of 5000 milliseconds by modifying the timeout value in the yum configuration file.

To check the query time using dig, run the following command:

$ dig repo.us-east-1.amazonaws.com | grep time


Did this article help?


Do you need billing or technical support?

AWS support for Internet Explorer ends on 07/31/2022. Supported browsers are Chrome, Firefox, Edge, and Safari.
Learn more »

Hi all,
I have some issue with OEL 6.1 YUM proxy.

*[root@rac1 tmp]# uname -a*
Linux rac1.oracle.cloud 2.6.32-100.34.1.el6uek.x86_64 #1 SMP Wed May 25 17:46:45 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
*[root@rac1 tmp]# rpm -qa | grep yum*
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-3.2.29-17.0.1.el6.noarch
yum-rhn-plugin-0.9.1-26.0.2.el6.noarch
yum-utils-1.1.30-6.el6.noarch
PackageKit-yum-plugin-0.5.8-19.0.1.el6.x86_64
PackageKit-yum-0.5.8-19.0.1.el6.x86_64
*[root@rac1 tmp]# cat /etc/yum.repos.d/public-yum-ol6.repo*
[ol6_ga_base]
name=Oracle Linux 6 GA — $basearch — base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=0
enabled=1

[ol6_u1_base]
name=Oracle Linux 6 U1 — $basearch — base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=0
enabled=1
*[root@rac1 tmp]# cat /etc/yum.conf*
[main]
cachedir=/var/cache/yum/$basearch/$releasever
debuglevel=2
sslverify=false
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

# The proxy server — proxy server:port number
proxy=http://xxx.xxx.xxx.xxx:3128
# The account details for yum connections
proxy_username=xxx
proxy_password=@$xxx

*[root@rac1 tmp]# yum update*
http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 5 — «Couldn’t resolve proxy ‘$xxx@192.168.1.50′»
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ol6_ga_base. Please verify its path and try again
[root@rac1 tmp]#

In OEL5.7 this works fine without any problem. I think this related to OEL6.1, maybe YUM does not understand proxy, my password for proxy starting with @$ but I changed my password and
output is changed to

*[root@rac1 tmp]# yum update*
http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 — «The requested URL returned error: 407»
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ol6_ga_base. Please verify its path and try again
[root@rac1 tmp]#

If anyone can help me please reply.

./thanks

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Yum error nothing to do
  • Yum error 256
  • Youtube произошла ошибка повторите попытку на телефоне
  • Youtube произошла ошибка повторите попытку iphone
  • Youtube произошла ошибка повторите попытку ios

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии