Tuesday, June 30, 2009

Fixing RHL up2date InvalidRedirectionError

I wanted to install pstack on Red Hat Linux and decided to use up2date for the first time. I kept getting an InvalidRedirectionError when it tried to update pstack's gdb dependency. Looking in the /var/log/up2date file I had:

[Fri Jun 26 14:05:22 2009] up2date   File "/usr/sbin/up2date", line 1312, in ?
sys.exit(main() or 0)
File "/usr/sbin/up2date", line 813, in main
fullUpdate, dryRun=options.dry_run))
File "/usr/sbin/up2date", line 1160, in batchRun
batch.run()
File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 93, in run
self.__getPackages()
File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 225, in __getPackages
up2date.getPackage(pkg, wrapperUtils.printPkg, wrapperUtils.printRetrieveHash)
File "/usr/share/rhn/up2date_client/up2date.py", line 180, in getPackage
buf = rpcServer.doCall(repos.getPackage, pkg, msgCallback, progressCallback)
File "/usr/share/rhn/up2date_client/rpcServer.py", line 238, in doCall
ret = apply(method, args, kwargs)
File "/usr/share/rhn/up2date_client/repoDirector.py", line 37, in getPackage
return self.handlers[channel['type']].getPackage(pkg, msgCallback, progressCallback)
File "/usr/share/rhn/up2date_client/rpmSource.py", line 186, in getPackage
package = source.getPackage(pkg, MsgCallback, progressCallback)
File "/usr/share/rhn/up2date_client/repoBackends/up2dateRepo.py", line 201, in getPackage
fd = self.s.getPackage(channel, filename, offset=startpoint)
File "/usr/lib/python2.3/site-packages/rhn/rpclib.py", line 622, in __call__
result = self._send(self._name, args)
File "/usr/lib/python2.3/site-packages/rhn/rpclib.py", line 290, in _request
raise InvalidRedirectionError("Too many redirects")


I'm not sure what had happened previously on this particular lab machine, but it looks like a previous attempt to update gdb was corrupt, or perhaps interrupted. When I deleted /var/spool/up2date/gdb-6.3.0.0-1.162.el4.x86_64.rpm, then the up2date command worked like a charm.

No comments: