Bug 1134367

Summary: 'Red Hat Access' open new case with jdr report throws exception if JON is under proxy
Product: [JBoss] JBoss Operations Network Reporter: Jeeva Kandasamy <jkandasa>
Component: UIAssignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Jeeva Kandasamy <jkandasa>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: myarboro, theute
Target Milestone: ER03   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 13:59:17 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:
Bug Depends On:    
Bug Blocks: 1070431    

Description Jeeva Kandasamy 2014-08-27 11:56:54 UTC
Description of problem:
When opening new case in 'Red Hat Access' throws exception, if JON is under proxy.

Version-Release number of selected component (if applicable):
JBoss Operations Network	
Version : 3.3.0.ER01
Build Number : 23b3476:f3aa7e7
GWT Version : 2.5.0
SmartGWT Version : 3.0p

How reproducible:
always

Steps to Reproduce:
1. Login to JON as a admin user
2. Go to 'Administrator->Settings' add proxy server details
3. Open new case with JDR report.
4. It's working however throws an exception in server.log

Proxy server detail:
Server: squid (7:3.1.10-1.el6_2.4)
Base OS: RHEL 6 x86_64


Exception:
-------------------------
07:43:51,003 ERROR [org.rhq.server.rhaccess.Config] (http-/0.0.0.0:7080-5) Unable to parse PROXY_SERVER_HOST setting to URL: java.net.MalformedURLException: no protocol: 10.16.23.199
	at java.net.URL.<init>(URL.java:583) [rt.jar:1.7.0_03-icedtea]
	at java.net.URL.<init>(URL.java:480) [rt.jar:1.7.0_03-icedtea]
	at java.net.URL.<init>(URL.java:429) [rt.jar:1.7.0_03-icedtea]
	at org.rhq.server.rhaccess.Config.getProxyURL(Config.java:76) [classes:]
	at org.rhq.server.rhaccess.AttachmentsServlet.doPost(AttachmentsServlet.java:177) [classes:]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03-icedtea]

07:43:51,812 INFO  [org.rhq.server.rhaccess.JdrReportRunner] (http-/0.0.0.0:7080-5) Executing /subsystem=jdr/:generate-jdr-report()
07:44:53,928 INFO  [org.rhq.server.rhaccess.JdrReportRunner] (http-/0.0.0.0:7080-5) JDR report written to /home/hudson/jon-server-3.3.0.ER01/jbossas/standalone/tmp/jdr_14-08-27_07-43-51_jeeva-lab-pvywk.zip
07:44:57,400 INFO  [org.rhq.server.rhaccess.AttachmentsServlet] (http-/0.0.0.0:7080-5) File attached to URL https://api.access.redhat.com

Comment 2 Libor Zoubek 2014-09-01 15:36:31 UTC
I have fixed the issue locally (in your case, proxy server was not used at all) but when proxy server is used I ran into Bug 1136079

Comment 3 Libor Zoubek 2014-09-01 15:50:52 UTC
master

commit 931f8549fc36abfb0fef93e474bb7e4368a7d146
Author: Libor Zoubek <lzoubek@redhat.com>
Date:   Mon Sep 1 17:45:17 2014 +0200

    Bug 1134367 - 'Red Hat Access' open new case with jdr report throws
    exception if JON is under proxy
    
    Properly return http proxy server url (in global settings we have setting
    for host/IP .. needed to prefix with http://. Also other proxy related
    settings now return null if set to null or empty (our UI sets to "" as unset
    value)

release branch

commit 62f67e06e5d72a298b4e0e707903a5d47b9dcef3
Author: Libor Zoubek <lzoubek@redhat.com>
Date:   Mon Sep 1 17:45:17 2014 +0200

    Bug 1134367 - 'Red Hat Access' open new case with jdr report throws
    exception if JON is under proxy
    
    Properly return http proxy server url (in global settings we have setting
    for host/IP .. needed to prefix with http://. Also other proxy related
    settings now return null if set to null or empty (our UI sets to "" as unset
    value)
    
    (cherry picked from commit 931f8549fc36abfb0fef93e474bb7e4368a7d146)
    Signed-off-by: Libor Zoubek <lzoubek@redhat.com>

Comment 4 Simeon Pinder 2014-09-17 02:49:03 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=385149

Comment 5 Jeeva Kandasamy 2014-09-23 11:17:42 UTC
Verified with JDR report. 

Version:
JBoss Operations Network
Version : 3.3.0.ER03
Build Number : 4aefe39:44e33a4
GWT Version : 2.5.0
SmartGWT Version : 3.0p