Wildfly管理控制台无法在Linux上打开

问题描述 投票:0回答:2

我安装了wildfly 13 Final,编辑了standalone.xml,添加了用户,但我还是无法在Ubuntu 16上打开管理控制台。我尝试远程访问控制台。

不过,我可以从本地机器连接

sudo curl -i http://localhost:9990/console/index.html
HTTP/1.1 200 OK
Connection: keep-alive
Last-Modified: Thu, 31 May 2018 02:30:23 GMT
X-Frame-Options: SAMEORIGIN
Content-Length: 1241
Content-Type: text/html
Accept-Ranges: bytes
Date: Sun, 01 Jul 2018 20:51:16 GMT

config - / etc / default / wildfly

    #################################################
# General configuration for the init.d scripts, #
# not necessarily for WildFly itself.           #
# default location: /etc/default/wildfly        #
#################################################

## Location of JDK
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre"

## Location of WildFly
JBOSS_HOME="/opt/wildfly"

## The username who should own the process.
JBOSS_USER=wildfly

## The mode WildFly should start, standalone or domain
JBOSS_MODE=standalone

## Configuration for standalone mode
JBOSS_CONFIG=standalone.xml

## Configuration for domain mode
# JBOSS_DOMAIN_CONFIG=domain.xml
# JBOSS_HOST_CONFIG=host-master.xml

## The amount of time to wait for startup
STARTUP_WAIT=60

## The amount of time to wait for shutdown
SHUTDOWN_WAIT=60

## Location to keep the console log
JBOSS_CONSOLE_LOG="/var/log/wildfly/console.log"

## Additionals args to include in startup
# JBOSS_OPTS="--admin-only -b 127.0.0.1"

/opt/wildfly/standalone/configuration/standalone.xml,这里有一些代码

 <interface name="management">
      <inet-address value="${jboss.bind.address.management:0.0.0.0}" />
   </interface>
   <interface name="public">
      <inet-address value="${jboss.bind.address:0.0.0.0}" />
   </interface>
   <interface name="unsecure">
      <inet-address value="${jboss.bind.address.unsecure:0.0.0.0}" />
   </interface>
</interfaces>
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:8443}"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>
</server>

console.log如下:

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/wildfly

  JAVA: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

^[[0m21:07:29,814 INFO  [org.jboss.modules] (main) JBoss Modules version 1.8.5.Final
^[[0m^[[33m21:07:30,307 WARN  [org.jboss.as.server] (main) WFLYSRV0266: Server home is set to '/opt/wildfly/standalone', but server real home is '/opt/wildfly-13.0.0.Final/standalone' - unpredictable results may occur.
^[[0m^[[0m21:07:30,336 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.2.Final
^[[0m^[[0m21:07:30,366 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.2.Final
^[[0m^[[0m21:07:30,606 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 13.0.0.Final (WildFly Core 5.0.0.Final) starting
^[[0m^[[0m21:07:33,368 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
^[[0m^[[0m21:07:33,425 INFO  [org.wildfly.security] (ServerService Thread Pool -- 3) ELY00001: WildFly Elytron version 1.3.3.Final
^[[0m^[[0m21:07:33,481 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 9) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
^[[0m^[[0m21:07:33,607 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
^[[0m^[[0m21:07:33,650 INFO  [org.xnio] (MSC service thread 1-1) XNIO version 3.6.3.Final
^[[0m^[[0m21:07:33,667 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.6.3.Final
^[[0m^[[33m21:07:33,785 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 62) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
^[[0m^[[0m21:07:33,820 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 60) WFLYSEC0002: Activating Security Subsystem
^[[0m^[[0m21:07:33,830 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 54) WFLYNAM0001: Activating Naming Subsystem
^[[0m^[[0m21:07:33,838 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 45) WFLYCLINF0001: Activating Infinispan subsystem.
^[[0m^[[0m21:07:33,875 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 64) WFLYWS0002: Activating WebServices Extension
^[[0m^[[0m21:07:33,913 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 47) WFLYRS0016: RESTEasy version 3.5.1.Final
^[[0m^[[0m21:07:33,990 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 46) WFLYIO001: Worker 'default' has auto-configured to 2 core threads with 16 task threads based on your 1 available processors
^[[0m^[[0m21:07:34,025 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 52) WFLYJSF0007: Activated the following JSF Implementations: [main]
^[[0m^[[0m21:07:34,054 INFO  [org.jboss.as.ee] (ServerService Thread Pool -- 41) WFLYEE0119: The system property 'ee8.preview.mode' is NOT set to 'true'. For provided EE 8 APIs where the EE 8 version of the API differs from what is supported in EE 7, the EE 7 variant of the API will be used. Support for this setting will be removed once all EE 8 APIs are provided and certified.
^[[0m^[[0m21:07:34,061 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 38) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
^[[0m^[[0m21:07:34,257 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0003: Undertow 2.0.9.Final starting
^[[0m^[[0m21:07:34,285 INFO  [org.jboss.as.security] (MSC service thread 1-1) WFLYSEC0001: Current PicketBox version=5.0.2.Final
^[[0m^[[0m21:07:34,478 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 5.0.7.Final
^[[0m^[[0m21:07:34,481 INFO  [org.jboss.as.connector] (MSC service thread 1-1) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.9.Final)
^[[0m^[[0m21:07:34,597 INFO  [org.jboss.as.naming] (MSC service thread 1-1) WFLYNAM0003: Starting Naming Service
^[[0m^[[0m21:07:34,641 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 63) WFLYUT0014: Creating file handler for path '/opt/wildfly/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
^[[0m^[[0m21:07:34,782 INFO  [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 16 (per class), which is derived from thread worker pool sizing.
^[[0m^[[0m21:07:34,783 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = h2
^[[0m^[[0m21:07:34,786 INFO  [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 4 (per class), which is derived from the number of CPUs on this host.
^[[0m^[[0m21:07:34,952 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
^[[0m^[[0m21:07:35,422 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0012: Started server default-server.
^[[0m^[[0m21:07:35,486 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0018: Host default-host starting
^[[0m^[[0m21:07:35,595 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
^[[0m^[[0m21:07:35,612 INFO  [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0493: EJB subsystem suspension complete
^[[0m^[[0m21:07:35,793 INFO  [org.jboss.as.patching] (MSC service thread 1-1) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
^[[0m^[[33m21:07:35,842 WARN  [org.jboss.as.domain.management.security] (MSC service thread 1-1) WFLYDM0111: Keystore /opt/wildfly-13.0.0.Final/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
^[[0m^[[0m21:07:35,849 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory /opt/wildfly-13.0.0.Final/standalone/deployments
^[[0m^[[0m21:07:35,863 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
^[[0m^[[0m21:07:35,993 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
^[[0m^[[0m21:07:36,122 INFO  [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.2.1.Final (Apache CXF 3.2.4.jbossorg-1)
^[[0m^[[0m21:07:36,288 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
^[[0m^[[0m21:07:36,296 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://0.0.0.0:9990/management
^[[0m^[[0m21:07:36,296 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://0.0.0.0:9990
java linux ubuntu jboss wildfly
2个回答
1
投票

出于安全原因,默认情况下,WildFly仅在localhost接口上显示管理控制台。

如果要访问特定接口地址(例如192.168.15.5)上的管理控制台,则必须安排使用以下命令行选项集启动WildFly:

  -bmanagement=192.168.15.5

给定“/ etc / default / wildfly”配置,您可以添加以下内容来完成此操作:

  JBOSS_OPTS="-bmanagement=192.168.15.5"

顺便说一句,你不应该手动编辑standalone.xml文件。此过程容易出错且通常无法重复。

了解如何驱动CLI(完全可编写脚本)或使用管理控制台。


0
投票

在本地,执行本地认证机制。远程登录/密码验证已执行 - 您必须使用add-user.sh添加用户

© www.soinside.com 2019 - 2024. All rights reserved.