From: Jonathan K. <jk...@cs...> - 2005-01-27 08:19:55
|
On Tue, 25 Jan 2005, Chris Halls wrote: > You should be using the utility written for this purpose, apt-proxy-import. > If you can arrange to mount the server cache via some means e.g. nfs, you can > also save network traffic by getting apt-proxy-import to read the server tree > itself. That way, it will only copy files that it does not already have in > its own cache. The destination was completely out of date and would have needed to transfer the entire cache anyway so network utilization couldn't have been lessened in this case. I needed to resync the caches again, however this time I tried to use apt-proxy-import. It didn't work. apt-proxy-import refused to do anything saying the same thing for every file in the nfs mounted cache: apt-proxy-import -r -v -i /mnt/ 2005/01/27 00:27 CST [-] [import] considering: /mnt/debian/pool/main/p/perl-tk/perl-tk_800.025-2_i386.deb 2005/01/27 00:27 CST [-] [import] Not found, trying to guess 2005/01/27 00:27 CST [-] [import] perl-tk_800.025-2_i386.deb skipped - no suitable backend found I do know that the cache needs to be updated, and I did run `apt-get update` on both machines immediately prior to running apt-proxy-import. >>> The problem I'm having is that when apt-proxy starts on the server it >>> spends hours and hours recycling, and whenever apt-proxy restarts, the >>> entire process starts all over again. > > This will be caused by the problems with your database files. > >>> Furthermore, I believe that this >>> recycling is the cause of the "503 Service Unavailable" I receive when I >>> try and access the cache through apt. > > That's odd, I don't know what that problem is In the week since my original email, I managed to do something to server that fixed this problem. I don't remember exactly what I did. It was something minor like eliminating a stale lock file or something. > I'm not sure. There were some problems with this bit of code and it has been > recently changed. Which version of apt-proxy are you running? From my original email: >>> I'm running 1.9.24 on debian. > That indicates the database library could not open the databse, very strange. > Is it possible you copied that database from the server, and the server has > different apt-proxy/db library versions? The two caches do have different versions of libdb, but I'm not convinced that version incompatabilities account for the access error every time ap starts. According to the log, it appears ap fails to open the database, and as a result moves the broken database to .error and then creates new database from scratch. The problem I have appears to be that every newly created database is also broken in someway. I just cleared out .apt-proxy/db and restarted it. After 13 hours of recycling, the recycling stopped. I restarted apt-proxy, and recycling started immediately. 2005/01/26 23:57 CST [-] [debug] Verifying database: /var/cache/apt-proxy/.apt-proxy/db/access.db 2005/01/26 23:57 CST [-] [db] /var/cache/apt-proxy/.apt-proxy/db/access.db could not be opened, moved to /var/cache/apt-proxy/.apt-proxy/db/access.db.error 2005/01/26 23:57 CST [-] [db] Recreating /var/cache/apt-proxy/.apt-proxy/db/access.db 2005/01/26 23:57 CST [-] [debug] Opening database /var/cache/apt-proxy/.apt-proxy/db/access.db 2005/01/26 23:57 CST [-] [recycle] Adopting new file: /debian/.apt-proxy 2005/01/26 23:58 CST [-] [recycle] Adopting new file: /debian/pool/non-US/non-free/r/rsaref2/rsaref2_19940415-3_i386.deb > Can you run 'file *' in that directory please? bubbles:/var/cache/apt-proxy/.apt-proxy/db# file * access.db: Berkeley DB (Hash, version 7, native byte-order) access.db.error: Berkeley DB (Hash, version 7, native byte-order) packages.db: Berkeley DB (Hash, version 7, native byte-order) update.db: Berkeley DB (Hash, version 7, native byte-order) -- Jonathan Koren World domination? I'll leave that to the jk...@cs... religious nuts and Republicans, thank you. http://www.cs.siu.edu/~jkoren/ -- The Monarch, "Venture Brothers" |