How to use the Satellite API method channel.software.mergePackages()?
Environment
- Red Hat Satellite 5.6
Issue
- I hit an
Internal Server Error
when using the Satellite API methodchannel.software.mergePackages()
.
[2014-05-26 18:34:24,395] ERROR - REQUESTED FROM: 10.5.81.100 CALL: channel.software.mergePackages(2354xbe9d120d7871c12794e68a6c23f8b639, rhel-x86_64-server-6, testq2-2014-rhel-x86_64-server-6) CALLER: (auto-clone) TIME: 382.717 seconds
redstone.xmlrpc.XmlRpcFault: unhandled internal exception: HibernateException executing CachedStatement
at com.redhat.rhn.frontend.xmlrpc.BaseHandler.invoke(BaseHandler.java:165)
- Why when using the Satellite API method
channel.software.mergePackages()
, the packages are only displayed on the channel after some time.
Resolution
-
To address the
Internal Server Error
when using this API method, you can reduce the number of packages to be merged. For example, you can create a loop to merge the packages in group of 20 errata. -
Another method, is to increase the timeout on Apache and on AJP connector.
# vim /etc/httpd/conf/httpd.conf
Timeout <integer value in seconds>
# vim /etc/httpd/conf.d/zz-spacewalk-www.conf
ProxyTimeout <integer value in seconds>
# rhn-satellite restart
Root Cause
- The Satellite API method
channel.software.mergePackages()
will merge the packages in background and because of it, the packages will take some time to be listed on the given channel.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments