zypper refresh not working

Hello,
I’m using openSUSE 12.3, my zypper has a trouble while refreshing repository

# zypper -v ref 1
Verbosity: 1
Non-option program arguments: '1' 
Initializing Target
Specified repositories: repo-update 
Checking whether to refresh metadata for openSUSE-12.3-Update
Retrieving: repomd.xml.asc ..........................................................................................................[done]
Retrieving: repomd.xml.key ..........................................................................................................[done]
Retrieving: repomd.xml ..............................................................................................................[done]
Retrieving: 72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz ......................................[error]
Permission to access 'http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz' denied.

And here’s /var/log/zypper.log:

2014-10-02 14:08:03 <1> linux-ukui.site(3960) [zypp++] MediaMultiCurl.cc(doGetFileCopy):1360 HTTP response: 200
2014-10-02 14:08:03 <1> linux-ukui.site(3960) [zypp] MediaCurl.cc(MediaCurl):450 MediaCurl::MediaCurl(http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz, )
2014-10-02 14:08:03 <1> linux-ukui.site(3960) [zypp++] MediaCurl.cc(setupEasy):650 Proxy: 'http://<myproxy>:8080'
2014-10-02 14:08:03 <1> linux-ukui.site(3960) [zypp++] MediaCurl.cc(setupEasy):676 Proxy: using provided proxy-user 'dungla4'
2014-10-02 14:08:03 <1> linux-ukui.site(3960) [zypp] MediaCurl.cc(MediaCurl):450 MediaCurl::MediaCurl(http://widehat.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz, )
2014-10-02 14:08:03 <1> linux-ukui.site(3960) [zypp++] MediaCurl.cc(setupEasy):650 Proxy: 'http://<myproxy>:8080'
2014-10-02 14:08:03 <1> linux-ukui.site(3960) [zypp++] MediaCurl.cc(setupEasy):676 Proxy: using provided proxy-user 'dungla4'

If I run curl command

# curl -v http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz
* About to connect() to proxy <myproxy> port 8080 (#0)
*   Trying 10.16.51.102...
* connected
* Connected to <myproxy> (10.16.51.102) port 8080 (#0)
* Proxy auth using Basic with user 'dungla4'
> GET http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz HTTP/1.1
> Proxy-Authorization: Basic ZHVuZ2xhNDpMYWlkb2lwYXNzMQ==
> User-Agent: firefox
> Host: download.opensuse.org
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 302 Found
< Date: Thu, 02 Oct 2014 07:14:28 GMT
< Server: Apache/2.2.12 (Linux/SUSE)
< X-Prefix: 118.70.240.0/20
< X-AS: 18403
< X-MirrorBrain-Mirror: ftp.uni-kl.de
< X-MirrorBrain-Realm: other_country
< Location: http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz
< Content-Length: 417
< Content-Type: text/html; charset=iso-8859-1
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz">here</a>.</p>
<hr>
<address>Apache/2.2.12 (Linux/SUSE) Server at download.opensuse.org Port 80</address>
</body></html>
* Connection #0 to host <myproxy> left intact
* Closing connection #0

I can still download this file from firefox or through wget app
Here’s my repositories:

# zypper lr --uri
# | Alias       | Name                 | Enabled | Refresh | URI                                                                                      
--+-------------+----------------------+---------+---------+------------------------------------------------------------------------------------------
1 | repo-update | openSUSE-12.3-Update | Yes     | Yes     | http://download.opensuse.org/update/12.3

Can you help me to solve it?
Thank you

Note: proxy, user, password are set correctly through Yast. But I don’t know how to set user-agent for curl (wget only works with user-agent=firefox or MozillaFirefox)

Is that the only Repository?

Post:

zypper lr -d

Try:

curl -v http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz

Thanks Sauerland for quick response
There’s only one repo in my system (I removed others to investigate easier)

# zypper lr -d
# | Alias       | Name                 | Enabled | Refresh | Priority | Type   | URI                                      | Service
--+-------------+----------------------+---------+---------+----------+--------+------------------------------------------+--------
1 | repo-update | openSUSE-12.3-Update | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/update/12.3 | 

# curl -v http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz
* About to connect() to proxy <myproxy> port 8080 (#0)
*   Trying 10.16.51.102...
* connected
* Connected to <myproxy> (10.16.51.102) port 8080 (#0)
* Proxy auth using Basic with user 'dungla4'
> GET http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz HTTP/1.1
> Proxy-Authorization: Basic ZHVuZ2xhNDpMYWlkb2lwYXNzMQ==
> User-Agent: firefox
> Host: ftp.uni-kl.de
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 OK
< Server: nginx/1.2.1
< Date: Thu, 02 Oct 2014 07:54:52 GMT
< Content-Type: text/plain
< Content-Length: 43707
< Last-Modified: Wed, 01 Oct 2014 18:05:11 GMT
< Accept-Ranges: bytes
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< Age: 0
< 
��s�gA���+۶�˶m۶m۶�e����mW�m���sO��s��y�yg��Y;r�޹3~�cgF���������F���XX�G����?����O00230�3300���Y��,��������`g���b�������j�t��&�v����f���gef�ߍ?

  �ߎ?�_�
        !����n��bp���.�$ą�Ԅ)���N���*,gug%;Sg7G�����     �����������è    7,!,���������y�����10u��\�.�!�!-����i)��_°�����b]��@��V��b�&S�$/DDL����&lt;�z��x�t

As root:

rpm --rebuilddb && zypper clean -a && zypper ref

Please post:

zypper se -si zypp

or

rpm -qa zyp*
rpm -qa libzypp

Here’re my results

  • zypper ref
# rpm --rebuilddb
# zypper clean -a
All repositories have been cleaned up.
# zypper ref
Retrieving repository 'openSUSE-12.3-Update' metadata ----------------------------------------------------------------------------------/]
Permission to access 'http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz' denied.

Abort, retry, ignore? [a/r/i/?] (a):
  • zypper se -si zypp
# zypper se -si zypp
Retrieving repository 'openSUSE-12.3-Update' metadata ----------------------------------------------------------------------------------\]
Permission to access 'http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz' denied.

Abort, retry, ignore? [a/r/i/?] (a): a           
Retrieving repository 'openSUSE-12.3-Update' metadata ..............................................................................[error]
Repository 'openSUSE-12.3-Update' is invalid.
|] Valid metadata not found at specified URL
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Disabling repository 'openSUSE-12.3-Update' because of the above error.
Loading repository data...
Reading installed packages...

S | Name                | Type    | Version      | Arch   | Repository       
--+---------------------+---------+--------------+--------+------------------
i | libzypp             | package | 12.9.0-1.1.1 | x86_64 | (System Packages)
i | snapper-zypp-plugin | package | 0.1.2-1.5.1  | x86_64 | (System Packages)
i | zypp-plugin-python  | package | 0.3-8.1.1    | x86_64 | (System Packages)
i | zypper              | package | 1.8.11-1.1.1 | x86_64 | (System Packages)
i | zypper-aptitude     | package | 1.8.11-1.1.1 | noarch | (System Packages)
i | zypper-log          | package | 1.8.11-1.1.1 | noarch | (System Packages)
  • rpm -qa zypp*
# rpm -qa zypp*
zypper-log-1.8.11-1.1.1.noarch
zypper-1.8.11-1.1.1.x86_64
zypp-plugin-python-0.3-8.1.1.x86_64
zypper-aptitude-1.8.11-1.1.1.noarch


  • rpm -qa libzypp
# rpm -qa libzypp
libzypp-12.9.0-1.1.1.x86_64

On 2014-10-02 10:06, banhbaochay wrote:


>     # curl -v http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz
>   * About to connect() to proxy <myproxy> port 8080 (#0)
>   *   Trying 10.16.51.102...
>   * connected
>   * Connected to <myproxy> (10.16.51.102) port 8080 (#0)
>   * Proxy auth using Basic with user 'dungla4'
>   > GET http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz HTTP/1.1
>   > Proxy-Authorization: Basic ZHVuZ2xhNDpMYWlkb2lwYXNzMQ==
>   > User-Agent: firefox
>   > Host: ftp.uni-kl.de
>   > Accept: */*
>   > Proxy-Connection: Keep-Alive

And if you set “User-Agent” to ZYpp, does it work, or does your proxy
block you?

My understanding is that the zypper-mirrorbrain setup needs
“User-Agent=ZYpp”, but perhaps I’m wrong. You may be able to change the
setting in “/root/.curlrc” and try:


--user-agent firefox

a line per setting. I use “–ipv4”.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Hi robin,
If I use user-agent as “ZYpp”, my proxy server block me. This is the reason I must set user-agent to “MozillaFirefox” or “firefox”

My /root/.curlrc was still set as you suggest and the result is in my previous post.

I think if zypper-mirrorbrain setup needs “User-Agent=ZYpp” as you said, I can’t update or install any more from repository.
In the past I still updated/installed from repos. However at the bad day, I can’t. My proxy management also don’t know why
I only know I can download this package from firefox, so I think I need use user-agent=firefox but no luck

What country are you from?

Try setting all your repositories to point to a mirror close to you instead of using the d.o.o redirector ( http://mirrors.opensuse.org/ )

On 2014-10-02 11:56, Miuku wrote:
>
> What country are you from?
>
> Try setting all your repositories to point to a mirror close to you
> instead of using the d.o.o redirector ( http://mirrors.opensuse.org/ )

Mmm, no redirector… yes, that might work.

banhbaochay, what about What ftp? Does your network allow it? There are
some mirrors that provide it, and zypper does indeed support it.
MirrorBrain does not (ie, ftp://download.opensuse.org/ does not work).


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-10-02 11:56, Miuku wrote:
>
> What country are you from?
>
> Try setting all your repositories to point to a mirror close to you
> instead of using the d.o.o redirector ( http://mirrors.opensuse.org/ )

Reminds me: the redirector runs havoc with caching proxies, if they try
to cache the actual mirror you get instead of “download.opensuse.org”.

Each time you download a file it can be from a different mirror, and the
cache ends by having a dozen, slow copies, of the same file… beats the
purpose.

For an organization it makes sense to bypass the proxy, if you maintain
a single machine, or to setup a local mirror instead, if you maintain
several Linux machines.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

@miuku,robin: Thanks. I’m from Vietnam

I don’t know my proxy server allow ftp or not. I will check later

I can’t access repos if I by pass proxy.

I try some mirror repos from countries near me. However, the same problem occurs. curl can’t retrieve packages

Now I go home and will come back tomorrow. Thanks for your helping very much

On 2014-10-02 12:26, banhbaochay wrote:
>
> @miuku,robin: Thanks. I’m from Vietnam
>
> I don’t know my proxy server allow ftp or not. I will check later
>
> I can’t access repos if I by pass proxy.

If you are maintaining several machines for your organization, it would
make sense you convince your network manager to setup a proxie bypass
PLUS a local mirror. The overall traffic to Internet is smaller, and
more efficient. And the downloads do not impact the proxy, but the local
mirror machine.

Only that local mirror would bypass the proxy. And the network personnel
can keep an eye or a dozen on it.

> I try some mirror repos from countries near me. However, the same
> problem occurs. curl can’t retrieve packages

Ah… of course, the agent setting may be hard-coded, intentionally.

> Now I go home and will come back tomorrow. Thanks for your helping very
> much

Welcome!


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

For debugging purposes you can add this line in your /etc/hosts

195.135.221.134 download.opensuse.org

Something like

cp -v /etc/hosts /etc/hosts.orig

echo '195.135.221.134 download.opensuse.org' >> /etc/hosts

Then try again with the refresh. This was the trick i use when i still have openSUSE 10.3
Good luck.

On 2014-10-02 13:36, jetchisel wrote:
>
> For debugging purposes you can add this line in your /etc/hosts
>
>
> Code:
> --------------------
> 195.135.221.134 download.opensuse.org
> --------------------

How would that help? :-??

His problem is that his network proxy does not authorize his machine:


Permission to access 'http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz' denied.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

It is worth a try :slight_smile:

Thanks jetchisel but it doesn’t work

@robin_listas: As I know, my IT manager blocks curl with other user-agent than “firefox” (It’s strange, I don’t know why). Unfortunately, I have power enough to ask him change it

So now, I can’t update anything. If I want to install an app, I need to download all dependencies libraries manually (if you know how to do it easier, please let me know) and put them in to local directory. Oopps!

Thank you so much, we can close this topic here

On 2014-10-03 10:06, banhbaochay wrote:
>
> Thanks jetchisel but it doesn’t work
>
> @robin_listas: As I know, my IT manager blocks curl with other
> user-agent than “firefox” (It’s strange, I don’t know why).
> Unfortunately, I have power enough to ask him change it

I suppose you mean “I don’t have power” …

> So now, I can’t update anything. If I want to install an app, I need to
> download all dependencies libraries manually (if you know how to do it
> easier, please let me know) and put them in to local directory. Oopps!

Me, I would download the entire oss, non-oss, and update repos, to a
local disk. It is not that big, under 50 Gigabytes of data. Not my
problem. Their network, their resources. >:-)

> Thank you so much, we can close this topic here

Welcome :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

@robin: Aaaagh, it’s my mistake typing :smiley:
Your idea is good, maybe I will follow it. Thanks