Bug 703273 - rhn satellite traceback when adding systems to channel
Summary: rhn satellite traceback when adding systems to channel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 540
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Dimitar Yordanov
URL:
Whiteboard:
Depends On:
Blocks: sat54-blockers
TreeView+ depends on / blocked
 
Reported: 2011-05-09 19:52 UTC by Jonathan Smith
Modified: 2018-11-26 19:08 UTC (History)
3 users (show)

Fixed In Version: spacewalk-java-1.2.39-113
Doc Type: Bug Fix
Doc Text:
Consequence: When subscribing a system to a channel without having appropriate channel entitlement on WebUI, the action failed with an Internal Server Error. Result: When subscribing a system to a channel without having appropriate channel entitlement, an error message will be displayed on WebUI notifying the user the subscription isn't possible.
Clone Of:
Environment:
Last Closed: 2012-01-31 01:56:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0072 0 normal SHIPPED_LIVE Red Hat Network Satellite server spacewalk-java bug fix update 2012-01-31 06:55:07 UTC

Description Jonathan Smith 2011-05-09 19:52:26 UTC
"Channel family subscription count cannot exceed maximum membership" error should be trapped and displayed to the user in a web page, instead of an email traceback. The web page gave me an internal server error.

The following traceback was emailed:
---------------------------------------
The following exception occurred while executing this request:
POST /rhn/channels/ConfirmTargetSystems.do

Date:5/9/11 11:47:01 AM AKDT
Headers:
  host: rhn.alaska.edu
  user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
  accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  accept-language: en-us,en;q=0.5
  accept-encoding: gzip, deflate
  accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 115
  connection: keep-alive
  referer: https://rhn.alaska.edu/rhn/channels/ConfirmTargetSystems.do?cid=109
  cookie: JSESSIONID=63D72430F93019D60ED5D44D08DE863D; pxt-session-cookie=815665xe514ac99c2520917353d7f3cd1327f37
  content-type: application/x-www-form-urlencoded
  content-length: 368

Request:
Local Name = rhn.alaska.edu
Server Name = rhn.alaska.edu
Requested Session Id came from Cookie
Requested Session Valid = true
Session = org.apache.catalina.session.StandardSessionFacade@22da22da[session=StandardSession[63D72430F93019D60ED5D44D08DE863D]]
Protocol = https
Request Locale = en_US
Request Character Encoding = UTF-8
Attribute Names = rhnActiveLang, javax.servlet.jsp.jstl.fmt.timeZone.request, javax.servlet.request.key_size, javax.servlet.request.ssl_session, org.apache.struts.action.MESSAGE, javax.servlet.request.cipher_suite, channel_name, org.apache.struts.action.MODULE, __sitemesh__filterapplied, session, org.apache.struts.action.mapping.instance, requestedUri, list_1154021400_selected_amt, cid, 

Form Variables:
  list_1154021400_sortdir: 
  1154021400_PAGE_SIZE_LABEL_SELECTED: null
  list_1154021400_sortby: 
  list_1154021400_parent_is_an_element: true
  list_1154021400_oldfilterval: 
  list_1154021400_search_parent: true
  dispatch: Subscribe
  cid: 109
  list_1154021400_search_child: false
  submitted: true
  list_1154021400_filterby: System Name
  list_1154021400_filterval: 
  1154021400_PAGE_SIZE_LABEL: 500


User Information:
User jrsmith13 (id 4, org_id 2)

Exception:
javax.servlet.ServletException: ORA-20235: (channel_family_no_subscriptions) - Channel family subscription count cannot exceed maximum membership
ORA-06512: at "RHNSAT.RHN_EXCEPTION", line 23
ORA-06512: at "RHNSAT.RHN_CHANNEL", line 151
ORA-06512: at line 1

	at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)
	at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:82)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:101)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142)
	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:67)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:55)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
	at java.lang.Thread.run(Thread.java:736)
Caused by: com.redhat.rhn.common.db.WrappedSQLException: ORA-20235: (channel_family_no_subscriptions) - Channel family subscription count cannot exceed maximum membership
ORA-06512: at "RHNSAT.RHN_EXCEPTION", line 23
ORA-06512: at "RHNSAT.RHN_CHANNEL", line 151
ORA-06512: at line 1

	at com.redhat.rhn.common.translation.SqlExceptionTranslator.oracleSQLException(SqlExceptionTranslator.java:84)
	at com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:42)
	at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:119)
	at com.redhat.rhn.common.db.datasource.CachedStatement.executeCallable(CachedStatement.java:507)
	at com.redhat.rhn.common.db.datasource.CallableMode.execute(CallableMode.java:34)
	at com.redhat.rhn.manager.system.SystemManager.subscribeServerToChannel(SystemManager.java:1234)
	at com.redhat.rhn.manager.system.SystemManager.subscribeServerToChannel(SystemManager.java:1170)
	at com.redhat.rhn.frontend.action.channel.TargetSystemsConfirmAction.execute(TargetSystemsConfirmAction.java:74)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	... 40 more
Caused by: java.sql.SQLException: ORA-20235: (channel_family_no_subscriptions) - Channel family subscription count cannot exceed maximum membership
ORA-06512: at "RHNSAT.RHN_EXCEPTION", line 23
ORA-06512: at "RHNSAT.RHN_CHANNEL", line 151
ORA-06512: at line 1

	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:676)
	at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:602)
	at oracle.jdbc.driver.T2CCallableStatement.executeForDescribe(T2CCallableStatement.java:572)
	at oracle.jdbc.driver.T2CCallableStatement.executeForRows(T2CCallableStatement.java:765)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476)
	at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4400)
	at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2706)
	at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:116)
	... 46 more

Comment 2 Tomas Lestach 2011-05-23 12:16:02 UTC
Fixed in spacewalk.git: de86594b87ed8877707594356845ef44e4aa08e7

Tasos, thank you for the nice reproducer!

Comment 5 Tomas Lestach 2012-01-04 16:46:48 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Consequence:
When subscribing a system to a channel without having appropriate channel entitlement on WebUI, the action failed with an Internal Server Error.
Result:
When subscribing a system to a channel without having appropriate channel entitlement, an error message will be displayed on WebUI notifying the user the subscription isn't possible.

Comment 7 Tomas Lestach 2012-01-13 13:01:36 UTC
Right. Fixing the issue.

spacewalk.git: 6ad4edc1149eb4752c3961861aa2e5921dfebb34

Comment 9 Dimitar Yordanov 2012-01-25 14:17:23 UTC
FAILED QA

Error Message:

Unable to subscribe this system to the requested channel: "smqa-x3550m3-01.lab.eng.brq.redhat.com

is missing, when only one system is in the list of "Target systems" for a channel that has no more free entitlements.
In case there are two systems and one entitlement free the message is displayed. 
(See Attachment)

Comment 10 Dimitar Yordanov 2012-01-25 14:18:15 UTC
Created attachment 557459 [details]
2 system but just one entitlement free

Comment 14 Tomas Lestach 2012-01-27 13:10:16 UTC
Thank you Dimitar,
now I understand also your Comment#9.

Save information messages only if having messages to display ...

spacewalk.git: 3231836e572128a6cb38b0b179eb9e2434ea8055

Comment 17 errata-xmlrpc 2012-01-31 01:56:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0072.html


Note You need to log in before you can comment on or make changes to this bug.