Internal server error when trying to clone a channel from Red Hat Satellite 5.8 WebUI

Solution Verified - Updated -

Environment

  • Red Hat Satellite 5.8

Issue

  • Getting ISE when trying to clone a channel from satellite WebUI.
  • Unable to clone a channel if the Org does not have software entitlements to the parent channel.

Resolution

  • This is a known issue and resolved in a recent advisory, refer Errata.
  • Update spacewalk-java package to version 2.5.14-132 to fix the issue.

Diagnostic Steps

  • Complete traceback:
2019-02-18 10:48:30,902 [TP-Processor6] DEBUG net.rkbloom.logdriver.LogPreparedStatement - executing PreparedStatement: 'SELECT AC.channel_id AS ID,
       AC.channel_name AS NAME,
       rhn_channel.user_role_check(AC.channel_id, ?, 'subscribe') AS HAS_PERM,
       CASE rhn_channel.org_channel_setting(AC.channel_id, ?,'not_globally_subscribable') WHEN 0 THEN 1 ELSE NULL END AS GLOBALLY_SUBSCRIBABLE
  FROM rhnAvailableChannels AC
 WHERE AC.org_id = ?
ORDER BY UPPER(AC.channel_name)' with bind parameters: {1=141, 2=42, 3=42}
2019-02-18 10:48:30,933 [TP-Processor6] DEBUG net.rkbloom.logdriver.LogPreparedStatement - executing PreparedStatement: 'select Distinct C.id,
                   C.name,
                   C.label as channel_label,
                   C.parent_channel as parent_id,
                        (SELECT COUNT(P.package_id)
                          FROM rhnChannelPackage P
                          WHERE P.channel_id = C.id
                                ) AS package_count,
         C.org_id,
         (select org.name
            from web_customer org
            where org.id = C.org_id) as org_name,
         CA.name as arch_name
        from rhnChannel C inner join
         rhnUserChannel UC on UC.channel_id = C.id
        inner join rhnChannelArch CA ON CA.ID  = C.channel_arch_id
         where UC.user_id = ?' with bind parameters: {1=141}
2019-02-18 10:48:31,011 [TP-Processor6] WARN  org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.NullPointerException
2019-02-18 10:48:31,011 [TP-Processor6] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException: java.lang.NullPointerException
    at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:520)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:427)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
    at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:105)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:127)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:67)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:101)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:57)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:299)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    at java.lang.Thread.run(Thread.java:812)
Caused by: 
java.lang.NullPointerException
    at com.redhat.rhn.frontend.action.channel.manage.CloneChannelAction.execute(CloneChannelAction.java:105)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
    ... 40 more

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.