[opensuse] why zypper refresh , works @ term, but not in cron?
On Suse 11.2, i386, at a terminal, I can do:
sudo su - root# zypper refresh Repository 'openSUSE-11.2-Non-Oss' is up to date. Repository 'openSUSE-11.2-Oss' is up to date. Repository 'openSUSE-11.2-Source' is up to date. Retrieving repository 'openSUSE-11.2-Update' metadata [done] Building repository 'openSUSE-11.2-Update' cache [done] All repositories have been refreshed.
But in cron same thing (i *added* --non-interactive since some error message
said it was necessary):
Cron
On 8/20/2010 11:57 PM, Linda Walsh wrote:
On another system, also suse 11.2, but x86-64, a simple 'zypper refresh' is all that was needed (no "--non-interactive")...
Did u get an error trying that ? Also, if you run kudpdateapplet in KDE it refreshes periodically. And it can be set up YaST too. Also, if I may ask, why would you want to run a refresh in cron, unless you're running zypper up in cron too. which isn't a good idea. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Michael S. Dunsaavage wrote:
On 8/20/2010 11:57 PM, Linda Walsh wrote:
On another system, also suse 11.2, but x86-64, a simple 'zypper refresh' is all that was needed (no "--non-interactive")...
Did u get an error trying that ?
nope -- just the 'zypper refresh', was all that was needed.
Also, if you run kudpdateapplet in KDE it refreshes periodically. And it can be set up YaST too.
I usually am not running a kde desktop on that computer. For the most part I use the command line though I use remote-X for alot of things.
Also, if I may ask, why would you want to run a refresh in cron, unless you're running zypper up in cron too. which isn't a good idea.
Because when I run zypper, if my local cache isn't fairly fresh, then there's a greater chance that what's in the local cache won't match what is on the server, resulting in occasion glitches or errors. When I run zypper interactively, it's because I want to install (or change) packages, not refresh. When you have several repos, auto-refresh is pain in the posterior. -linda -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 08/21/2010 02:44 AM, Linda Walsh pecked at the keyboard and wrote:
Michael S. Dunsaavage wrote:
On 8/20/2010 11:57 PM, Linda Walsh wrote:
On another system, also suse 11.2, but x86-64, a simple 'zypper refresh' is all that was needed (no "--non-interactive")...
Did u get an error trying that ?
nope -- just the 'zypper refresh', was all that was needed.
Also, if you run kudpdateapplet in KDE it refreshes periodically. And it can be set up YaST too.
I usually am not running a kde desktop on that computer. For the most part I use the command line though I use remote-X for alot of things.
Also, if I may ask, why would you want to run a refresh in cron, unless you're running zypper up in cron too. which isn't a good idea.
Because when I run zypper, if my local cache isn't fairly fresh, then there's a greater chance that what's in the local cache won't match what is on the server, resulting in occasion glitches or errors.
If the cache is not up to date a refresh is run in the background automatically. There should _not_ be any errors.
When I run zypper interactively, it's because I want to install (or change) packages, not refresh. When you have several repos, auto-refresh is pain in the posterior.
No, it is a necessary part of the download process. The repos will change because of updated packages being added and your cache needs to match the update so they are in sync. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
But in cron same thing (i *added* --non-interactive since some error message said it was necessary):
Cron
/usr/bin/zypper --non-interactive refresh >/dev/null
I think I'd try removing that "> /dev/null" just to try to get a better idea of what's going on when cron kicks it off. you're still getting std error, but std out is being thrown away. perhaps there's something funky going on that gets shown as a std out message. -- Even the Magic 8 ball has an opinion on email clients: Outlook not so good. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
zGreenfelder wrote:
But in cron same thing (i *added* --non-interactive since some error message said it was necessary):
Cron
/usr/bin/zypper --non-interactive refresh >/dev/null I think I'd try removing that "> /dev/null" just to try to get a better idea of what's going on when cron kicks it off. you're still getting std error, but std out is being thrown away. perhaps there's something funky going on that gets shown as a std out message.
Uh, er, um....(clackityclackityclackit...(test(test)))...er...** Um...Yeah...Been there! (ignore smoking keyboard behind the screen) done that!... doesn't help! Failed to download /content from http://download.opensuse.org/distribution/11.2/repo/non-oss/ Abort, retry, ignore? [a/r/i/?] (a): a Problem retrieving files from 'openSUSE-11.2-Non-Oss'. [AbstractCommand.cc:195] URI=http://download.opensuse.org/distribution/11.2/repo/non-oss/content Please see the above error message for a hint. Skipping repository 'openSUSE-11.2-Non-Oss' because of the above error. Failed to download /content from http://download.opensuse.org/distribution/11.2/repo/oss/ Abort, retry, ignore? [a/r/i/?] (a): a Problem retrieving files from 'openSUSE-11.2-Oss'. [AbstractCommand.cc:195] URI=http://download.opensuse.org/distribution/11.2/repo/oss/content Please see the above error message for a hint. Skipping repository 'openSUSE-11.2-Oss' because of the above error. Failed to download /content from http://download.opensuse.org/source/distribution/11.2/repo/oss/ Abort, retry, ignore? [a/r/i/?] (a): a Problem retrieving files from 'openSUSE-11.2-Source'. [AbstractCommand.cc:195] URI=http://download.opensuse.org/source/distribution/11.2/repo/oss/content Please see the above error message for a hint. Skipping repository 'openSUSE-11.2-Source' because of the above error. Failed to download /repodata/repomd.xml from http://download.opensuse.org/update/11.2/ Abort, retry, ignore? [a/r/i/?] (a): a Problem retrieving files from 'openSUSE-11.2-Update'. [AbstractCommand.cc:195] URI=http://download.opensuse.org/update/11.2/repodata/repomd.xml Please see the above error message for a hint. Skipping repository 'openSUSE-11.2-Update' because of the above error. Could not refresh the repositories because of errors. **--(doh!) good point! (unfortunately, didn't lead to the burst of enlightenment one might expect from turning normal output... ;-) At the console FWIW, I've tried I tried sending output to >/dev/null, closing it and stdin. No luck in reproducing it interactively on this system. Very weird... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2010-08-22 10:52, Linda Walsh wrote:
zGreenfelder wrote:
But in cron same thing (i *added* --non-interactive since some error message said it was necessary):
Cron
/usr/bin/zypper --non-interactive refresh >/dev/null I think I'd try removing that "> /dev/null" just to try to get a better idea of what's going on when cron kicks it off. you're still getting std error, but std out is being thrown away. perhaps there's something funky going on that gets shown as a std out message.
Uh, er, um....(clackityclackityclackit...(test(test)))...er...**
Um...Yeah...Been there! (ignore smoking keyboard behind the screen) done that!... doesn't help!
Failed to download /content from http://download.opensuse.org/distribution/11.2/repo/non-oss/ Abort, retry, ignore? [a/r/i/?] (a): a Problem retrieving files from 'openSUSE-11.2-Non-Oss'. [AbstractCommand.cc:195] URI=http://download.opensuse.org/distribution/11.2/repo/non-oss/content Please see the above error message for a hint.
Hum! Doesn't give a clue... :-( Perhaps a log? /var/log/zypper.log? /var/log/zypp/* ?
Very weird...
Indeed. I heard of a bug re the content file affecting the source repo of 11.3. But in you case, cron no, direct yes... who knows. You could try making sure that aria2c is enabled, it is more resilient (except if proxy is active, I think) -- Cheers / Saludos, Carlos E. R. (from 11.2 x86_64 "Emerald" GM (Elessar))
On Sun, 2010-08-22 at 01:52 -0700, Linda Walsh wrote:
Cron
/usr/bin/zypper --non-interactive refresh >/dev/null
Uh, er, um....(clackityclackityclackit...(test(test)))...er...**
Um...Yeah...Been there! (ignore smoking keyboard behind the screen) done that!... doesn't help!
Failed to download /content from http://download.opensuse.org/distribution/11.2/repo/non-oss/ Abort, retry, ignore? [a/r/i/?] (a): a
**--(doh!) good point! (unfortunately, didn't lead to the burst of enlightenment one might expect from turning normal output... ;-)
At the console FWIW, I've tried
I tried sending output to >/dev/null, closing it and stdin. No luck in reproducing it interactively on this system.
Very weird...
Could Cron be using too low a priority for zypper to retrieve the data? I wonder what { master:~ # /usr/bin/time /usr/bin/zypper --non-interactive refresh > /home/thpnalb/zyppertest.txt } might show you, if run both from console and then from your cron job. At console here on a painfully slow Sprint Aircard, it returns to the prompt with 5.95user 1.21system 8:09.15 elapsed 1%CPU .... and the zypper output is in the text file. Tom in NM -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Very weird...
Could Cron be using too low a priority for zypper to retrieve the data?
along similar lines.. are the interactive and the non interactive going at very similar times? can you move cron to kick zypper off at.. say every hour 10 after and look for different results? or to really really make sure the environments are the same, could you do (both as your id and within the cron) su - root -c "zypper command and flags"? I'm totally grasping at straws and I'm starting to suspect crazy, paranoid things.. like perhaps the network has something similar to the things I've seen in my linksys router where it can turn off all or certain types of traffic between certain hours -- Even the Magic 8 ball has an opinion on email clients: Outlook not so good. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2010-08-22 18:27, zGreenfelder wrote:
Very weird...
Could Cron be using too low a priority for zypper to retrieve the data?
No.
along similar lines.. are the interactive and the non interactive going at very similar times?
The error would be different. Rpm database busy or similar.
or to really really make sure the environments are the same, could you do
The environment is not the same, cron sets up, a limited, safer, environment. The path is different, for example. -- Cheers / Saludos, Carlos E. R. (from 11.2 x86_64 "Emerald" GM (Elessar))
On 2010-08-21 05:57, Linda Walsh wrote:
On Suse 11.2, i386, at a terminal, I can do:
sudo su - root# zypper refresh Repository 'openSUSE-11.2-Non-Oss' is up to date. Repository 'openSUSE-11.2-Oss' is up to date. Repository 'openSUSE-11.2-Source' is up to date. Retrieving repository 'openSUSE-11.2-Update' metadata [done] Building repository 'openSUSE-11.2-Update' cache [done] All repositories have been refreshed.
But in cron same thing (i *added* --non-interactive since some error message said it was necessary):
Cron
/usr/bin/zypper --non-interactive refresh >/dev/null Failed to download /content from http://download.opensuse.org/distribution/11.2/repo/non-oss/ Problem retrieving files from 'openSUSE-11.2-Non-Oss'. [AbstractCommand.cc:195] URI=http://download.opensuse.org/distribution/11.2/repo/non-oss/content Please see the above error message for a hint.
Try without devnulling, I don't see the error there. -- Cheers / Saludos, Carlos E. R. (from 11.2 x86_64 "Emerald" GM (Elessar))
participants (6)
-
Carlos E. R.
-
Ken Schneider - openSUSE
-
Linda Walsh
-
Michael S. Dunsaavage
-
Tom Patton
-
zGreenfelder