Bug 536138 (RHQ-520) - Agent fails to export the configuration
Summary: Agent fails to export the configuration
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-520
Product: RHQ Project
Classification: Other
Component: Agent
Version: 1.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact: Wilfred Itte
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-27 13:18 UTC by Heiko W. Rupp
Modified: 2013-12-05 17:15 UTC (History)
0 users

Fixed In Version: 1.0.1
Clone Of:
Environment:
See I-T issue # 177258
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1038728 0 medium CLOSED The agent's config export command produces an invalid XML file 2021-02-22 00:41:40 UTC

Internal Links: 1038728

Description Heiko W. Rupp 2008-05-27 13:18:00 UTC
The agent probably tries to resolve 

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">

Running tcpdump shows that it is connection to http://java.sun.com/  - this seems to fail and make the whole export fail.


sending> config export c:\temp\JON\test.xml
Failed to perform config command; stack trace follows:
java.net.ConnectException: Connection timed out: connect
        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.Socket.connect(Socket.java:520)
        at java.net.Socket.connect(Socket.java:470)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
        at sun.net.www.http.HttpClient.New(HttpClient.java:304)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:97
3)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentSca
nnerImpl.
java:1021)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragm
entScanne
rImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
        at org.rhq.enterprise.agent.promptcmd.ConfigPromptCommand.getPreferencesXml(ConfigPromptCommand.java:13
9)
        at org.rhq.enterprise.agent.promptcmd.ConfigPromptCommand.execute(ConfigPromptCommand.java:86)
        at org.rhq.enterprise.agent.AgentMain.executePromptCommand(AgentMain.java:1694)
        at org.rhq.enterprise.agent.AgentMain$3.run(AgentMain.java:1607)
        at java.lang.Thread.run(Thread.java:595)
sending> config list
Failed to perform config command; stack trace follows:
java.net.ConnectException: Connection timed out: connect
        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.Socket.connect(Socket.java:520)
        at java.net.Socket.connect(Socket.java:470)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
        at sun.net.www.http.HttpClient.New(HttpClient.java:304)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:97
3)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentSca
nnerImpl.
java:1021)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragm
entScanne
rImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
        at org.rhq.enterprise.agent.promptcmd.ConfigPromptCommand.getPreferencesXml(ConfigPromptCommand.java:13
:

Comment 1 Heiko W. Rupp 2008-05-27 15:25:35 UTC
rev875 filters the <!DOCTYPE ...> so that no more network lookups for the systemId are needed.

I would have liked to supply the preferences DTD, but the terms in the preamble seem to forbid to ship them, so we use plan b.

Comment 2 Jeff Weiss 2008-06-11 14:41:10 UTC
This defect was accidentally marked 'qa in progress', pushing back to resolved.

Comment 3 Heiko W. Rupp 2008-06-18 15:33:30 UTC
How to test:

start a jon server + agent.
have the box completely disconnected from the net (or a firewall temporarily blocking outgoing http traffic)

then at the agent prompt type 

config export test-out.xml


This should write something xmly to test-out.xml and not throw an exception.

Comment 4 Wilfred Itte 2008-06-18 16:44:16 UTC
Could not reproduce it

Comment 5 Red Hat Bugzilla 2009-11-10 21:11:00 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-520



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