我刚刚安装了最后一个版本的Keycloak(3.4.3),一切似乎都没问题但由于类型错误而无法启动:
WFLYCTL0085: Failed to parse configuration
我使用keycloak超过一年(版本2.5.1直到现在)我从来没有遇到过这种问题。 此外,我能够毫无问题地升级我的Keycloak,但在这里我进行了全新的安装,我收到了这个错误。
开头的完整日志如下:
Calling "E:\backend\keycloak\bin\standalone.conf.bat"
Setting JAVA property to "E:\backend\jdk\bin\java"
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: "E:\backend\keycloak"
JAVA: "E:\backend\jdk\bin\java"
JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.log.dir=E:\backend\logs\keycloak"
===============================================================================
10:05:11,459 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
10:05:11,656 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.7.SP1
10:05:11,771 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: Keycloak 3.4.3.Final (WildFly Core 3.0.8.Final) starting
10:05:12,619 INFO [org.jboss.as.controller] (Controller Boot Thread) OPVDX002: Failed to pretty print validation error: null
10:05:12,620 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:143) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.server.ServerService.boot(ServerService.java:387) [wildfly-server-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:370) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_102]
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.ejb3
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:154) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.server.parsing.StandaloneXml$DefaultExtensionHandler.parseExtensions(StandaloneXml.java:131) [wildfly-server-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.server.parsing.StandaloneXml_5.readServerElement(StandaloneXml_5.java:219) [wildfly-server-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.server.parsing.StandaloneXml_5.readElement(StandaloneXml_5.java:142) [wildfly-server-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:107) [wildfly-server-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49) [wildfly-server-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:122) [staxmapper-1.3.0.Final.jar:1.3.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:76) [staxmapper-1.3.0.Final.jar:1.3.0.Final]
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:126) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
... 3 more
Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at java.util.concurrent.FutureTask.report(FutureTask.java:122) [rt.jar:1.8.0_102]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) [rt.jar:1.8.0_102]
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:146) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
... 11 more
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:195) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:68) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:126) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:123) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_102]
at org.jboss.threads.JBossThread.run(JBossThread.java:320) [jboss-threads-2.2.1.Final.jar:2.2.1.Final]
Caused by: org.jboss.modules.ModuleLoadException: Error loading module from E:\backend\keycloak\modules\system\layers\base\org\wildfly\discovery\main\module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:204)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:170)
at org.jboss.modules.LocalModuleFinder.lambda$findModule$3(LocalModuleFinder.java:149) [jboss-modules.jar:1.5.1.Final]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_102]
at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:144) [jboss-modules.jar:1.5.1.Final]
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439) [jboss-modules.jar:1.5.1.Final]
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342) [jboss-modules.jar:1.5.1.Final]
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289) [jboss-modules.jar:1.5.1.Final]
at org.jboss.modules.Module.addPaths(Module.java:1078) [jboss-modules.jar:1.5.1.Final]
at org.jboss.modules.Module.link(Module.java:1448) [jboss-modules.jar:1.5.1.Final]
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476) [jboss-modules.jar:1.5.1.Final]
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225) [jboss-modules.jar:1.5.1.Final]
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:177) [wildfly-controller-3.0.8.Final.jar:3.0.8.Final]
... 8 more
Caused by: org.jboss.modules.xml.XmlPullParserException: Unexpected content of type 'element start' named 'properties', text is: '<properties>' (position: START_TAG seen ...n:jboss:module:1.6" name="org.wildfly.discovery">\n <properties>... @26:17)
at org.jboss.modules.xml.ModuleXmlParser.unexpectedContent(ModuleXmlParser.java:257)
at org.jboss.modules.xml.ModuleXmlParser.validateNamespace(ModuleXmlParser.java:310)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:525)
at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
... 21 more
10:05:12,625 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
10:05:12,664 INFO [org.jboss.as] (MSC service thread 1-1) WFLYSRV0050: Keycloak 3.4.3.Final (WildFly Core 3.0.8.Final) stopped in 7ms
Press any key to continue . . .
文件E:\ backend \ keycloak \ modules \ system \ layers \ base \ org \ wildfly \ discovery \ main \ module.xml似乎没问题,即使它说
Unexpected content of type 'element start' named 'properties', text is: '<properties>' (position: START_TAG seen ...n:jboss:module:1.6" name="org.wildfly.discovery">\n <properties>... @26:17)
以下是其确切内容:
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2016, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<module xmlns="urn:jboss:module:1.6" name="org.wildfly.discovery">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="wildfly-discovery-client-1.0.0.Final.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.modules"/>
<module name="org.wildfly.client.config"/>
<module name="org.wildfly.common"/>
</dependencies>
</module>
这让我生气了好几天了。 有人请一个想法吗?
谢谢!
的Seb
答案 0 :(得分:1)
看起来使用的JBoss模块版本太旧,并且不包含1.6的架构。
10:05:11,459 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
1.5.x流JBoss模块中的urn:jboss:module:1.6
不是。你需要至少1.6.0.Final。
当我下载独立的KeyCloak服务器3.4.3并启动时,我获得了JBoss Modules版本的1.6.1.Final。
13:13:32,741 INFO [org.jboss.modules] (main) JBoss Modules version 1.6.1.Final
13:13:32,932 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.7.SP1
13:13:33,032 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: Keycloak 3.4.3.Final (WildFly Core 3.0.8.Final) starting
您可能会尝试将KeyCloak叠加在一个太旧的WildFly版本上。