我設法運行Wildfly
在域模式下的Ubuntu
,但我在Windows
有麻煩。這裏是我的設置和步驟:蜻蜓 - 如何在Windows上安裝域模式
- 我有兩個Windows服務器(比如,
S1
和S2
)上Wildfly將運行作爲Windows service
- 我有
domain.xml
,host-master.xml
和host-slave.xml
文件。在Linux上,我更新了/etc/default/wildfly
文件,告訴S1服務器它將是master
,而S2將是slave
。主站和從站配置位於host-master.xml
和host-slave.xml
文件中。所以基本上,我告訴S1使用主機主機和S2主機 - 從機。如果我添加S3服務器,我告訴它使用適當配置的主機 - 從機。 - 在Linux上,告訴Wildfly要使用哪個xml文件後,我將它們安裝爲Linux服務。這是我想在Windows上做
- 我cd到
wildfly\bin\service
目錄 - 這是我用於主代碼:
service install /controller S1:9990 /host master /user user /password pass
- 這是奴隸:
service install /controller S1:9990 /host slave /user user /password pass
但你可以猜測,雖然我可以登錄到管理控制檯,但我看不到奴隸。只有主人在場。此外,當我嘗試在S2上登錄到管理控制檯時,仍然可以看到具有主配置的控制檯。
我很想念某件事,但我不知道它是什麼。你能幫忙嗎?
我的主機master.xml文件:
<?xml version='1.0' encoding='UTF-8'?>
<host name="S1" xmlns="urn:jboss:domain:3.0">
<extensions>
<extension module="org.jboss.as.jmx"/>
</extensions>
<management>
<security-realms>
<security-realm name="ManagementRealm">
<authentication>
<local default-user="$local" skip-group-loading="true"/>
<properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
</authentication>
<authorization map-groups-to-roles="false">
<properties path="mgmt-groups.properties" relative-to="jboss.domain.config.dir"/>
</authorization>
</security-realm>
<security-realm name="ApplicationRealm">
<authentication>
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
<properties path="application-users.properties" relative-to="jboss.domain.config.dir"/>
</authentication>
<authorization>
<properties path="application-roles.properties" relative-to="jboss.domain.config.dir"/>
</authorization>
</security-realm>
</security-realms>
<audit-log>
<formatters>
<json-formatter name="json-formatter"/>
</formatters>
<handlers>
<file-handler name="host-file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.domain.data.dir"/>
<file-handler name="server-file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
</handlers>
<logger log-boot="true" log-read-only="false" enabled="false">
<handlers>
<handler name="host-file"/>
</handlers>
</logger>
<server-logger log-boot="true" log-read-only="false" enabled="false">
<handlers>
<handler name="server-file"/>
</handlers>
</server-logger>
</audit-log>
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket interface="management" port="${jboss.management.native.port:9999}"/>
</native-interface>
<http-interface security-realm="ManagementRealm" http-upgrade-enabled="true">
<socket interface="management" port="${jboss.management.http.port:9990}"/>
</http-interface>
</management-interfaces>
</management>
<domain-controller>
<local/>
</domain-controller>
<interfaces>
<interface name="management">
<any-address/>
</interface>
</interfaces>
<jvms>
<jvm name="default">
<heap size="64m" max-size="256m"/>
<permgen size="256m" max-size="256m"/>
<jvm-options>
<option value="-server"/>
</jvm-options>
</jvm>
</jvms>
<servers>
<server name="solr-server" group="solr_server" auto-start="false">
<socket-bindings socket-binding-group="full-sockets" port-offset="983"/>
</server>
<server name="80-8200" group="edys-web-servers" auto-start="false">
<socket-bindings socket-binding-group="full-sockets" port-offset="199"/>
</server>
</servers>
<profile>
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
<expose-resolved-model/>
<expose-expression-model/>
<remoting-connector/>
</subsystem>
</profile>
</host>
我的主機slave.xml文件:
<?xml version='1.0' encoding='UTF-8'?>
<host name="S2" xmlns="urn:jboss:domain:3.0">
<extensions>
<extension module="org.jboss.as.jmx"/>
</extensions>
<management>
<security-realms>
<security-realm name="ManagementRealm">
<server-identities>
<secret value="UGFzc3cwcmQ="/>
</server-identities>
<authentication>
<local default-user="$local" skip-group-loading="true"/>
<properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
</authentication>
<authorization map-groups-to-roles="false">
<properties path="mgmt-groups.properties" relative-to="jboss.domain.config.dir"/>
</authorization>
</security-realm>
<security-realm name="ApplicationRealm">
<authentication>
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
<properties path="application-users.properties" relative-to="jboss.domain.config.dir"/>
</authentication>
<authorization>
<properties path="application-roles.properties" relative-to="jboss.domain.config.dir"/>
</authorization>
</security-realm>
</security-realms>
<audit-log>
<formatters>
<json-formatter name="json-formatter"/>
</formatters>
<handlers>
<file-handler name="host-file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.domain.data.dir"/>
<file-handler name="server-file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
</handlers>
<logger log-boot="true" log-read-only="false" enabled="false">
<handlers>
<handler name="host-file"/>
</handlers>
</logger>
<server-logger log-boot="true" log-read-only="false" enabled="false">
<handlers>
<handler name="server-file"/>
</handlers>
</server-logger>
</audit-log>
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket interface="management" port="${jboss.management.native.port:9999}"/>
</native-interface>
</management-interfaces>
</management>
<domain-controller>
<remote security-realm="ManagementRealm" username="ebys">
<discovery-options>
<static-discovery name="primary" protocol="${jboss.domain.master.protocol:remote}" host="${jboss.domain.master.address:S1}"
port="${jboss.domain.master.port:9999}"/>
</discovery-options>
</remote>
</domain-controller>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:S2}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:S2}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:S2}"/>
</interface>
</interfaces>
<jvms>
<jvm name="default">
<heap size="64m" max-size="256m"/>
<permgen size="256m" max-size="256m"/>
<jvm-options>
<option value="-server"/>
</jvm-options>
</jvm>
</jvms>
<profile>
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
<expose-resolved-model/>
<expose-expression-model/>
<remoting-connector/>
</subsystem>
</profile>
</host>
PS:有是在Windows上的錯誤,我不能停止Wildfly服務。我必須重新啓動服務器(服務處於手動模式),然後卸載該服務。因此,我不能只卸載並安裝該服務,而無需先重新啓動服務器。有關於這個報告的錯誤,但不幸的是,這些建議不適合我。
服務在主服務器上成功安裝,但在重新啓動時停止停止停止 – Haider