Bug 1150624
| Summary: | Agent failed to start due to XML validation error | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Operations Network | Reporter: | Viet Nguyen <vnguyen> | ||||||
| Component: | Agent | Assignee: | Stefan Negrea <snegrea> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | JON 3.3.0 | CC: | hrupp, mazz, vnguyen | ||||||
| Target Milestone: | ER05 | ||||||||
| Target Release: | JON 3.3.0 | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-12-17 13:47:46 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: | |||||||||
| Attachments: |
|
||||||||
|
Description
Viet Nguyen
2014-10-08 14:26:50 UTC
Created attachment 945044 [details]
json dump of the container
Created attachment 945046 [details]
agent config xml
This has nothing to do with the agent configuration, but with the preferences node in ~/.java/.pref* Can you please check if that file looks ok and if you can actually read/write it? I see what might the problem. The HOME env is set to / which is a read-only file system. I tried to export HOME=/root to no avail. More troubleshooting. Empty prefs.xml =========== # export RHQ_AGENT_JAVA_OPTS=-Djava.util.prefs.userRoot=/root -Djava.util.prefs.systemRoot=/opt # rhq-agent-wrapper.sh # ls -la /root/.java/.userPrefs/rhq-agent total 16 drwxrwx---. 3 root root 4096 Oct 9 12:46 . drwx------. 3 root root 4096 Oct 9 12:46 .. drwxrwx---. 2 root root 4096 Oct 9 12:46 default -rw-rw----. 1 root root 148 Oct 9 12:46 prefs.xml # cat /root/.java/.userPrefs/rhq-agent/prefs.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd"> <map MAP_XML_VERSION="1.0"/> # cat /root/.java/.userPrefs/rhq-agent/default/prefs.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd"> <map MAP_XML_VERSION="1.0"/> More info: --- java version "1.7.0_65" OpenJDK Runtime Environment (rhel-2.5.1.2.el7_0-x86_64 u65-b17) OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode) I can only think of one of two things - one, Java is trying to validate the .dtd by grabbing it over the network and its failing or two for some reason this Java implementation is not writing out <preferences> element when creating the initial preference node. What if you actually put the real XML in /root/.userPrefs/rhq-agent/default/prefs.xml? I think you might be able to just copy the content of agent-configuraiton.xml right in there and then restart the agent (thus manually pre-populating the agnet config preferences). Do you still get the error? Its a network issue. How to replicate: 1) disconnect your network OR just edit /etc/hosts and put a bogus IP for java.sun.com 2) rm -rf $HOME/.java/.userPrefs/rhq-agent 3) start the agent You get the exception listed in the description of this BZ. This did not happen in RHQ 4.12. Something broke since then. I think it has to do with we now use javax.xml parsing to process the agent config for obfuscating preferences. I don't know why its happening, but that has been one thing that changed in this area and could be why its breaking now. caused by fix to bug #782915 trying to determine how to fix this issue and not break that again assigning to stefan - he's going to take the first stab at fixing this. cherry picked fix to 3.3 branch:
commit 3892942c5d19feb98a38a52546582304983160a3
Author: Stefan Negrea <snegrea>
Date: Fri Oct 10 12:44:38 2014 -0500
[BZ 1150624] Add additional code to prevent attempts to load DTD.
(cherry picked from commit 3064b71e8a10c2987c9c45188975a07e2462caa7)
Signed-off-by: John Mazzitelli <mazz>
commit c1dbfc7ecb33efe108143d0b81165fa7113c1369
Author: Stefan Negrea <snegrea>
Date: Fri Oct 10 12:16:59 2014 -0500
[BZ 1150624] Avoid DTD retrieval even if the DOM has it. Also avoid parsing logic to determine if
(cherry picked from commit e73af2af73f53511bef5752034c383112a553d98)
Signed-off-by: John Mazzitelli <mazz>
Moving to ON_QA as available to test with the latest brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=394734 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |