Bug 811442

Summary: Page error when adding hosts to monitoring list.
Product: [Community] Spacewalk Reporter: William Brown <william>
Component: WebUIAssignee: Tomas Lestach <tlestach>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.7   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-12 13:47:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 871344    

Description William Brown 2012-04-11 05:00:20 UTC
Description of problem:
When attempting to add hosts to a list to be monitored, a page error occurs.

Version-Release number of selected component (if applicable):
1.7.3

How reproducible:
Always

Steps to Reproduce:
1. Enable monitoring in rhn.conf
2. Create a new probe
3. Attempt to add systems to probe
  
Actual results:
Page error

Expected results:
Systems are added to monitoring probe.

Additional info:

The following exception occurred while executing this request:
POST /rhn/monitoring/config/ProbeSuiteSystemsEditSubmit.do

Date:4/11/12 2:02:58 PM CST
Headers:
 host: spacewalk.dev.firstyear.id.au
 user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
 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
 connection: keep-alive
 referer: https://spacewalk.dev.firstyear.id.au/rhn/monitoring/config/ProbeSuiteSystemsEdit.do?suite_id=1
 cookie: JSESSIONID=016EC3C1E85BAD5F565F735860090097; pxt-session-cookie=48x29820e6032b8ac76ae81aab846a42020
 content-type: application/x-www-form-urlencoded
 content-length: 237

Request:
Local Name = spacewalk.dev.firstyear.id.au
Server Name = spacewalk.dev.firstyear.id.au
Requested Session Id came from Cookie
Requested Session Valid = true
Session = org.apache.catalina.session.StandardSessionFacade@1f4b9eaf[session=StandardSession[016EC3C1E85BAD5F565F735860090097]]
Protocol = https
Request Locale = en_US
Request Character Encoding = UTF-8
Attribute Names = rhnActiveLang, javax.servlet.request.ssl_session, org.apache.struts.action.MESSAGE, com.opensymphony.sitemesh.APPLIED_ONCE, javax.servlet.jsp.jstl.fmt.timeZone.request, session, javax.servlet.request.key_size, javax.servlet.request.cipher_suite, requestedUri, org.apache.struts.action.mapping.instance, org.apache.struts.action.MODULE, 

Form Variables:
 last_lower: 1
 lower: 1
 suite_id: 1
 items_on_page: 1000010000
 prev_filter_value: 
 first_lower: 1
 dispatch: Add systems to probe suite
 prev_lower: 1
 items_selected: 1000010000
 filter_string: 
 csrf_token: -3983948562310931343
 next_lower: 11
 checkall: on


User Information:
User william (id 1, org_id 1)

Exception:
javax.servlet.ServletException: java.lang.NumberFormatException: null
	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:99)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	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:91)
	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:108)
	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:55)
	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:298)
	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:776)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
	at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.NumberFormatException: null
	at java.lang.Long.parseLong(Long.java:401)
	at java.lang.Long.<init>(Long.java:690)
	at com.redhat.rhn.frontend.action.monitoring.ProbeSuiteSystemsEditAction.lookupSatCluster(ProbeSuiteSystemsEditAction.java:97)
	at com.redhat.rhn.frontend.action.monitoring.ProbeSuiteSystemsEditAction.addSystems(ProbeSuiteSystemsEditAction.java:75)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)
	at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
	at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:146)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
	... 40 more

Comment 1 Tomas Lestach 2012-04-11 07:53:48 UTC
I am afraid, that enabling monitoring in rhn.conf isn't the correct way, how to enable monitoring.

Please check "Enabling Monitoring":
http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/5.4/html/Reference_Guide/chap-Reference_Guide-Monitoring.html

Please, try to disable monitoring and enable it back in the supported way.

I am not sure how you add systems to the probe (reproducer step nr.3). Don't you mean probe suite?

Comment 2 William Brown 2012-04-12 13:47:32 UTC
You are correct. Enabling monitoring this way works correctly.