Host.xml: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(28 intermediate revisions by the same user not shown)
Line 2: Line 2:
<br>
<br>
<center><font color=red>migrating from https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Host.xml</font></center>
<center><font color=red>migrating from https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Host.xml</font></center>
=Internal=
=Internal=


* [[WildFly Domain#Configuration_Files|WildFly Domain]]
* [[WildFly Configuration#Configuration_Files|WildFly Configuration]]
* [[WildFly Domain Mode Configuration]]
 
=Overview=
 
This file contains configuration details for a specific physical host in a managed domain: the name of the host, network interfaces, socket bindings. This file is not present on standalone servers. The file's location is <tt>$JBOSS_HOME/domain/configuration/host.xml</tt>.
 
=Schema=


The domain.xml configuration syntax is described in $JBOSS_HOME/docs/schema/jboss-as-config_*.xsd


=Host Name=
=Host Name=


The host name specified as <tt><host name="..."></tt> is relevant if when a subordinate host controller connects to a remote domain controller. The host controller will use the host name as "user name" while authenticating against the Management Realm of the domain controller.
The host name specified as <tt><host name="..."></tt> is relevant if when a subordinate host controller connects to a remote domain controller. The host controller will use the host name specified here as "user name" while authenticating against the Management Realm of the domain controller.


The host name can be overridden without modifying the configuration file. To ease administration and allow for the use of the same host configuration file on multiple hosts, the server uses the following precedence in determining the host name:
The host name can be overridden without modifying the configuration file. The server uses the following precedence in determining the host name:


1. If set, the <tt><host><tt> element <tt>name</tt> attribute in the <tt>host.xml</tt> configuration file.
1. If set, the <tt>'''name'''</tt> <tt><host></tt> element attribute in the <tt>host.xml</tt> configuration file.


2. The value of the <tt>jboss.host.name</tt> system property.
2. The value of the <tt>[[WildFly System Properties#jboss.host.name|jboss.host.name]]</tt> system property.


3. The value that follows the final period (".") character in the {{jboss.qualified.host.name}} system property, or the entire value if there is no final period (".") character.
3. The value that follows the final period (".") character in the <tt>[[WildFly System Properties#jboss.qualified.host.name|jboss.qualified.host.name]]</tt> system property, or the entire value if there is no final period (".") character.


4. The value that follows the period (".") character in the {{HOSTNAME}} environment variable for POSIX-based operating systems, the {{COMPUTERNAME}} environment variable for Microsoft Windows, or the entire value if there is no final period (".") character.
4. The value that follows the period (".") character in the <tt>HOSTNAME</tt> environment variable for POSIX-based operating systems, the <tt>COMPUTERNAME</tt> environment variable for Microsoft Windows, or the entire value if there is no final period (".") character.


<font color=red>
<font color=red>
'''TODO, more research needed:'''
The following mechanism (would be preferred if it worked) does not work:
The following mechanism (would be preferred if it worked) does not work:


{{{
<pre>
<host name="${host.id:master}" xmlns="urn:jboss:domain:1.6">
<host name="${host.id:master}" xmlns="urn:jboss:domain:1.6">
     ...
     ...
</host>
</host>
}}}
</pre>


where "{{host.id}}" is defined in the startup script.
where "<tt>host.id</tt>" is defined in the startup script.
</font>
</font>
=Sections=
==<management>==
==<domain-controller>==
==<interfaces>==
<pre>
<host>
  ...
  <interfaces>
      <interface name="management">
          <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
      </interface>
      <interface name="public">
          <inet-address value="${jboss.bind.address:127.0.0.1}"/>
      </interface>
      <interface name="unsecure">
          <!-- Used for IIOP sockets in the standard configuration.
                To secure JacORB you need to setup SSL -->
          <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
      </interface>
    </interfaces>
    ...
</host>
</pre>
==<jvms>==
Example:
<pre>
<host>
    ...
    <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>
  ...
</host>
</pre>
===<jvm>===
====<heap>====
====<permgen>====
====<jvm-options>====
Example of how to configure GC logging: [[WildFly_and_Garbage_Collection_Logging#Server_Node|Enabling GC Logging in Domain Mode - Server Node]].
==<servers>==
Example:
<pre>
<servers>
    <server name="server-one" group="main-server-group">
        <socket-bindings port-offset="0"/>
        <jvm name="default">
              <jvm-options>
                  <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
              </jvm-options>
        </jvm>
    </server>
    <server name="server-two" group="main-server-group" auto-start="true">
        <socket-bindings port-offset="150"/>
    </server>
    <server name="server-three" group="other-server-group" auto-start="false">
        <socket-bindings port-offset="250"/>
    </server>
</servers>
</pre>
==<profile>==

Latest revision as of 21:09, 5 September 2017



migrating from https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Host.xml

Internal

Overview

This file contains configuration details for a specific physical host in a managed domain: the name of the host, network interfaces, socket bindings. This file is not present on standalone servers. The file's location is $JBOSS_HOME/domain/configuration/host.xml.

Schema

The domain.xml configuration syntax is described in $JBOSS_HOME/docs/schema/jboss-as-config_*.xsd

Host Name

The host name specified as <host name="..."> is relevant if when a subordinate host controller connects to a remote domain controller. The host controller will use the host name specified here as "user name" while authenticating against the Management Realm of the domain controller.

The host name can be overridden without modifying the configuration file. The server uses the following precedence in determining the host name:

1. If set, the name <host> element attribute in the host.xml configuration file.

2. The value of the jboss.host.name system property.

3. The value that follows the final period (".") character in the jboss.qualified.host.name system property, or the entire value if there is no final period (".") character.

4. The value that follows the period (".") character in the HOSTNAME environment variable for POSIX-based operating systems, the COMPUTERNAME environment variable for Microsoft Windows, or the entire value if there is no final period (".") character.

TODO, more research needed:

The following mechanism (would be preferred if it worked) does not work:

<host name="${host.id:master}" xmlns="urn:jboss:domain:1.6">
    ...
</host>

where "host.id" is defined in the startup script.

Sections

<management>

<domain-controller>

<interfaces>

<host>
   ...
   <interfaces>
       <interface name="management">
           <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
       </interface>
       <interface name="public">
          <inet-address value="${jboss.bind.address:127.0.0.1}"/>
       </interface>
       <interface name="unsecure">
           <!-- Used for IIOP sockets in the standard configuration.
                To secure JacORB you need to setup SSL -->
           <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
       </interface>
    </interfaces>
    ...
</host>

<jvms>

Example:

<host>
    ...
    <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>
   ...
</host>

<jvm>

<heap>

<permgen>

<jvm-options>

Example of how to configure GC logging: Enabling GC Logging in Domain Mode - Server Node.

<servers>

Example:

<servers>
    <server name="server-one" group="main-server-group">
        <socket-bindings port-offset="0"/>
        <jvm name="default">
              <jvm-options>
                  <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
              </jvm-options>
        </jvm>
    </server>
    <server name="server-two" group="main-server-group" auto-start="true">
        <socket-bindings port-offset="150"/>
    </server>
    <server name="server-three" group="other-server-group" auto-start="false">
        <socket-bindings port-offset="250"/>
    </server>
</servers>

<profile>