【问题标题】:Websphere Liberty server.xml featuremanager errorWebsphere Liberty server.xml 功能管理器错误
【发布时间】:2019-08-14 19:26:15
【问题描述】:

在 RAD 中,我们的 Websphere Liberty server.xml 显示一个红色错误,其描述为:

启用的功能需要在服务器配置中定义 keyStore 元素和用户注册表。
使用服务器配置编辑器添加这些项目。

但是,我们确实有这些东西。密码不是真正的密码。这也不是整个 server.xml,只是相关部分。

服务器.xml

<!-- Enable features -->
<featureManager>
    <feature>localConnector-1.0</feature>
    <feature>javaee-8.0</feature>
    <feature>jaxws-2.2</feature>
</featureManager>

<!-- This template enables security. To get the full use of all the capabilities, a keystore and user registry are required. -->

<!-- For the keystore, default keys are generated and stored in a keystore. 
     To provide the keystore password, generate an
     encoded password using bin/securityUtility encode and add it below in 
     the password attribute of the keyStore element. 
     Then uncomment the keyStore element. -->

     <sslDefault outboundSSLRef="alternateSSLSettings"/>

     <ssl id="defaultSSLConfig" keyStoreRef="defaultKeyStore" trustStoreRef="defaultTrustStore"/>

     <keyStore id="defaultKeyStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>

     <keyStore id="defaultTrustStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>

     <ssl id="alternateSSLSettings" keyStoreRef="alternateKeyStore" trustStoreRef="alternateTrustStore"/>

     <keyStore id="alternateKeyStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>

     <keyStore id="alternateTrustStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>


<!--For a user registry configuration, configure your user registry. For 
    example, configure a basic user registry using the
    basicRegistry element. Specify your own user name below in the name 
     attribute of the user element. For the password, 
    generate an encoded password using bin/securityUtility encode and add it 
    in the password attribute of the user element.
    Then uncomment the user element. -->
 <basicRegistry id="basic" realm="BasicRealm">
    <user name="admin" password="zzzzzz"/>
</basicRegistry>


<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>

<!-- Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>

<library id="DB2JCCLib">
    <fileset dir="C:\Program Files\IBM\SQLLIB\java" includes="db2jcc4.jar db2jcc.jar db2jcc_license_cu.jar"/>
</library>

<dataSource id="aroDataSource" jndiName="jdbc/aro" type="javax.sql.DataSource">
    <jdbcDriver libraryRef="DB2JCCLib"/>
    <properties.db2.jcc databaseName="DBNAME" password="zzz" portNumber="60000" serverName="1.2.3.4" user="catsapp"/>
</dataSource>


<applicationMonitor updateTrigger="mbean"/>

<application id="AROEAR" location="AROEAR.ear" type="ear"/>

我在这里错过了什么?

【问题讨论】:

  • 这是作为 Maven 或 Gradle 项目导入的吗?
  • @ScottKurz - 不。我们的安全团队不合理地禁止我们使用 Maven(不要让我开始)。它是带有 RAD 9.6.1 的 Websphere Liberty 19,它甚至在我安装我们的 j2ee 应用程序之前就发生了。
  • 您是否尝试过重新验证?在 Project Explorer 视图中右键单击 server.xml 并选择 Validate。
  • @Erin - 我删除了标记,每次我尝试更改某些内容以满足验证器时,都会清理并重建。我刚刚尝试了您的方法并得到了相同的结果,错误仍然存​​在。我应该指出,如果我关闭验证,服务器实际上运行良好。所以这个错误不会影响真正的运行时,但如果可以的话,我希望验证器不必关闭。
  • 我使用了您包含的小型 sn-p 并创建了一个 server.xml,但无法重现该问题,也无法在代码中看到任何可能导致此问题的明显内容。如果你有一个 server.xml 里面只有那个 sn-p 你还能重现这个问题吗?如果没有,您愿意附加完整的服务器配置吗?

标签: websphere websphere-liberty


【解决方案1】:

当我将下面的行添加到server.xml 时,它为我消除了错误。

<keyStore id="defaultKeyStore" password="keypassword"/>

【讨论】:

  • 欢迎来到 Stack Overflow。我已经编辑了您的答案来解决这个问题,但在未来:该网站会将 XML 视为 HTML。由于浏览器无法识别&lt;keyStore … /&gt;,因此它不会被渲染。您可以通过将其视为代码来解决此问题。最简单的方法是将代码缩进四个空格。此外,请务必在发布之前预览您的答案,以便发现这些类型的错误。
猜你喜欢
  • 1970-01-01
  • 2021-09-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多