5

I've been setting up a private repo for the company I'm working. At the beginning it was working properly, but today, when I'll try to install a new rpm that I've build I had this ugly error :

http://<server_name>/centos/7/repodata/a6ecd0c880b1f5128974cd147a53cd84d7dab269b9055215b6fbe99fb98f6d7a-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found-:-- ETA

I've already tried :

yum clean all
rm -rf /var/cahe/yum
yum repolist

And again the same error.

I've erased all the contents under repodata on the repo server and recreate the repo again with :

createrepo /path/to/repo/directory

After recreate the repo againg I've ran again

yum clean all
rm -rf /var/cahe/yum
yum repolist

But still nothing working

I'm 100% sure that the client configuration is OK, because I'm the only one playing with the servers for the moment and last week it was working well.

Otherwise the repo is accessible in http, I can see all packages and repodata with a web browser. If a execute

curl http://<server_name>/centos/7/repodata/repomd.xml

from the client, I get the correct file.

I've realized that the name of the primary DB name is not the correct one in the client (even after running yum clean all; rm-rf /var/cache/yum; yum update). How can I fix this please ? I've been all the afternoon digging into this problem but nothing changes

Permissions in repo directories are setup OK (triple checked)

What I'm missing ???

Thank you in advance for your help

Abel
  • 322
  • 3
  • 13
  • Is SELinux enabled? Have you looked at the web server log? I see you can curl repomd.xml, but can you curl the stated file? – Aaron Copley Dec 04 '17 at 16:50
  • Hi Aaron ! SELinux is disabled in Repo server and client. Web Server logs shows that client is trying to get the wrong primary database. This morning everything is working again, nobody touch to configurations during the night, how is it possible ??? If I execute `curl http://server_ip/ – Abel Dec 05 '17 at 09:05
  • Problem is for the moment solved, but I would like to know what is the cause of this dysfunction ? I wouldn't like if the client call me in a few months saying that the repo is not working. Thank's for your help ! – Abel Dec 05 '17 at 09:15
  • **UPDATE** : actually ***problem is not solved***. I can see the package that I've included in the repo yesterday, but not the ones that I've included today. And again client is searching for the uncorrects repodata files. If I execute `curl http://ip_address/repo_file_name` with the real file in the repodata directory I can visualize it. Even with `yum clean all, rm -rf /var/cache/yum` I get the same problems. – Abel Dec 05 '17 at 10:04
  • This is the order you are following? On the server, add `$newpackage` to repository and regenerate repository metadata. (`createrepo`) Then, on the client, `yum clean all && yum list $newpackage`? Any proxying or caching of HTTP traffic between you and the server? – Aaron Copley Dec 05 '17 at 17:59
  • Yes, after include a new package in the repo I run `createrepo --update /path/to/repo/` and on the client `yum clean all; rm -rf /var/cache/yum; yum repolist`and get the same errors. (But actually I've found a possible solution yesterday night, I'll explain it in the answer) – Abel Dec 07 '17 at 09:19

2 Answers2

5

I think that I've found the answer yesterday night, at least for the moment I'm not facing the problems descrived before.

The solution is simple, avoid that client keep a local cache of the repos. This can be done including in /etc/yum.conf clients file the next line :

http_caching=none

With this option set up, each time the client executes a yum updateor yum repolist it downloads all the repodata from the repository server, so all the files are in their last version.

I still do not understand why if I was erasing all the local cache in the client with yum clean all; rm -rf /var/cache/yum the client kept searching for old repodata files. If someone has an answer please share it. It drove me crazy for the last few days.

Thank you anyway for yous tips and advices

Abel
  • 322
  • 3
  • 13
0

I was running into a similar error and wanted to share my findings here.

The private company repository server was placed behind a kind of web accelerator. Therefore I had to switch off the caching and optimization in that too.

After, the error was gone.

U880D
  • 597
  • 7
  • 17