Bug #58949 DTD resolution during MOS response XML parsing can fail
Submitted: 15 Dec 2010 18:27 Modified: 18 Jan 2011 17:34
Reporter: Marcos Palacios Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version:2.3.1.2046 OS:Any
Assigned to: Josh Sled CPU Architecture:Any

[15 Dec 2010 18:27] Marcos Palacios
Description:
When attempting to poll the My Oracle Support system, we get the following exception. 

2010-12-15 11:27:55,560 DEBUG [em-worker-pool-thread-6:com.mysql.net.com.mysql.etools.monitor.support.MosHttpPoller] checking response with statusCode 200
2010-12-15 11:27:58,362  INFO [http-38080-14:com.mysql.timing.accessLog.action] /WhatsNew.action 32 ms
2010-12-15 11:29:10,643 ERROR [em-worker-pool-thread-6:com.mysql.net.com.mysql.etools.monitor.support.MosHttpPoller] error consuming successful response
java.lang.RuntimeException: java.lang.RuntimeException: parsing xml
	at com.mysql.etools.monitor.support.SrXmlParser$Impl.parse(SrXmlParser.java:157)
	at com.mysql.etools.monitor.support.MosHttpPoller.consumeSuccessfulResponse(MosHttpPoller.java:97)
	at com.mysql.etools.net.AbstractHttpPoller.yayHandleGoodResponse(AbstractHttpPoller.java:442)
	at com.mysql.etools.net.AbstractHttpPoller.innerPoll(AbstractHttpPoller.java:328)
	at com.mysql.etools.net.AbstractHttpPoller.poll(AbstractHttpPoller.java:277)
	at com.mysql.etools.net.AbstractHttpPoller.forcePoll(AbstractHttpPoller.java:233)
	at com.mysql.etools.net.AbstractHttpPoller$2.run(AbstractHttpPoller.java:239)
	at com.mysql.etools.concurrent.LogServiceTaskDecorator$LoggingRunnable.run(LogServiceTaskDecorator.java:72)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.RuntimeException: parsing xml
	at com.mysql.etools.xml.XML.parse(XML.java:58)
	at com.mysql.etools.monitor.support.SrXmlParser$Impl.parse(SrXmlParser.java:47)
	... 15 more
Caused by: java.net.ConnectException: Operation timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
	at java.net.Socket.connect(Socket.java:529)
	at java.net.Socket.connect(Socket.java:478)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
	at sun.net.www.http.HttpClient.New(HttpClient.java:306)
	at sun.net.www.http.HttpClient.New(HttpClient.java:323)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)
	at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1194)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1090)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1003)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
	at com.mysql.etools.xml.XML.parse(XML.java:52)
	... 16 more
2010-12-15 11:29:10,643 DEBUG [em-worker-pool-thread-6:com.mysql.net.com.mysql.etools.monitor.support.MosHttpPoller] recording poll result type SOFT at timestamp 1292434075506, details [java.lang.RuntimeException: parsing xml]

How to repeat:
- setup MEM to access the MOS system
- check the Network log

Suggested fix:
n/a
[18 Jan 2011 17:32] Enterprise Tools JIRA Robot
Josh Sled writes: 
this issue only occurs in a pretty esoteric situation, and not one that I think customers will see.  you have to be in a scenario where you're expecting MOS to work (ie, connected to the internet) but the internet doesn't work.

marcos is seeing it because on oracle vpn, the internet does't work w/o proxy, but the vpn is sufficient to access the MOS systems on the "internet".