Why Red Hat Satellite fail with error 500 Error Internal Server Error when deleting a system?

Solution Verified - Updated -

Environment

  • Red Hat Satellite 5.7

Issue

  • Why Red Hat Satellite fail with error 500 Error Internal Server Error when deleting a system?

Resolution

  1. Increase the -Xmx value of tomcat6 on Red Hat Satellite server to higher number.
    Edit /etc/sysconfig/tomcat6 file and set:

    JAVA_OPTS="$JAVA_OPTS -ea -Xms256m -Xmx512m -Djava.awt.headless=true -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -XX:MaxNewSize=256 -XX:-UseConcMarkSweepGC"
    
  2. Increase the httpd timeout:

    # vim /etc/httpd/conf/httpd.conf
    [...]
    Timeout 600
    [...]
    
  3. Increase the timeout in /var/lib/tomcat6/webapps/rhn/WEB-INF/web.xml file.

    # vim /var/lib/tomcat6/webapps/rhn/WEB-INF/web.xml
    [...]
    <session-config>
    <session-timeout>90</session-timeout>
    </session-config>
    [...]
    
  4. Increase the ProxyTimeout in /etc/httpd/conf.d/zz-spacewalk-www.conf file.

    # vim /etc/httpd/conf.d/zz-spacewalk-www.conf
    [...]
    ProxyTimeout 600
    [...]
    
  5. Restart service:

    # rhn-satellite restart
    

Root Cause

  • Java out of memory

Diagnostic Steps

  • Entries from httpd logs:

    10.xx.xxx.xx - - [08/Jun/2015:19:27:32 +0000] "GET /rhn/systems/details/DeleteConfirm.do?sid=10000xxxxx HTTP/1.1" 200 11313
    10.xx.xxx.xx - - [08/Jun/2015:19:27:34 +0000] "POST /rhn/systems/details/DeleteConfirm.do?sid=10000xxxxx HTTP/1.1" 500 2846
    10.xx.xxx.xx - - [09/Jun/2015:11:07:00 +0000] "GET /rhn/systems/details/DeleteConfirm.do?sid=10000xxxxx HTTP/1.1" 200 11311
    10.xx.xxx.xx - - [09/Jun/2015:11:07:02 +0000] "POST /rhn/systems/details/DeleteConfirm.do?sid=10000xxxxx HTTP/1.1" 500 2846
    
  • Entry from java core file:

    Dump Event "systhrow" (00040000) Detail "java/lang/OutOfMemoryError" "Java heap space" received 
    

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