angrox / spacewalk-api-scripts

Addon script for spacewalk to sync RHN packages to a local spacewalk server
GNU General Public License v3.0
67 stars 32 forks source link

Issue with spacewalk-rhn-sync script excuting rhnget command #11

Closed glenc2004 closed 10 years ago

glenc2004 commented 10 years ago

While executing an rhnget command, the redhat network came back with an error which was not caught by the script and continued to try and push the packages into spacewalk. The issue was RHN noticed that my system some how was abusing the service and didn't allow the node to download the RPM which in turn failed the upload to spacewalk.

So either rhnget execution needs to make sure the get was properly executed or the file actually exists before trying to push it into spacewalk, or both. Here is the error I received from RHN:


Error Message: Abuse of Service detected for server xxxxxxxxx-6Server-x86_64-mrepo (1036885126) Error Class Code: 49 Error Class Info: You are getting this error because RHN has detected an abuse of service from this system and account. This error is triggered when your system makes too many connections to Red Hat Network. This error can not be triggered under a normal use of the Red Hat Network service as configured by default on Red Hat Linux.

 The Red Hat Network services for this system will remain disabled
 until you will reduce the RHN network traffic from your system to
 acceptable limits.

 Please log into RHN and visit https://rhn.redhat.com/help/contact.pxt
 to contact technical support if you think you have received this
 message in error.

angrox commented 10 years ago

Hi,

sorry for my late answer. The script itself makes only one persistant connection to the RHN. Are there other hosts using this one as proxy? How often do you start the script?

glenc2004 commented 10 years ago

Hi,

Thanks for the reply. I think I may have found the issue. Right after the download was happening I was also doing an errata update. And I'm thinking there was not enough time for the connection to close before another connection was made using the same profile. So I put a sleep in-between the commands to allow enough time for the connection to close with the sync script and another one to open to get the errata's. Have not seen the issue yet after doing this. If I get it again I'll let you know. I don't know if there is a way in your code to check for that kind of issue or not since it seems to use return code 0 from rhnget even though RHN disallowed it.

----- Original Message -----

Hi,

sorry for my late answer. The script itself makes only one persistant connection to the RHN. Are there other hosts using this one as proxy? How often do you start the script?

— Reply to this email directly or view it on GitHub .