If an XML file containing a DOCTYPE declaration that references an externally defined DTD is placed under JBOSS_HOME, jdr.sh may hang in an environment without internet connectivity. It is expected that diagnostic tools should not hang under any circumstances.
Thread dump:
"management-handler-thread - 1" #142 prio=5 os_prio=0 tid=0x000055dced591000 nid=0x821b waiting on condition [0x00007f55696fb000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
- locked <0x00000000ed858878> (a java.net.SocksSocketImpl)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at java.net.Socket.connect(Socket.java:556)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:465)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:560)
- locked <0x00000000ed853ab8> (a sun.net.www.http.HttpClient)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:244)
at sun.net.www.http.HttpClient.New(HttpClient.java:341)
at sun.net.www.http.HttpClient.New(HttpClient.java:359)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1243)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1177)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1071)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1005)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
- locked <0x00000000ed8186b8> (a sun.net.www.protocol.http.HttpURLConnection)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)
- locked <0x00000000ed8186b8> (a sun.net.www.protocol.http.HttpURLConnection)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:1033)
at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:941)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:908)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:298)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
at org.jboss.as.jdr.util.XMLSanitizer.sanitize(XMLSanitizer.java:75)
at org.jboss.as.jdr.commands.CollectFiles.execute(CollectFiles.java:109)
at org.jboss.as.jdr.JdrRunner.collect(JdrRunner.java:130)
at org.jboss.as.jdr.JdrReportService.collect(JdrReportService.java:95)
at org.jboss.as.jdr.JdrReportRequestHandler$1.execute(JdrReportRequestHandler.java:74)
Example of a file containing a DOCTYPE declaration:
$ cat jboss-eap-7.4/standalone/configuration/web.xml <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> </web-app>