<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archives des JBoss - dbi Blog</title>
	<atom:link href="https://www.dbi-services.com/blog/tag/jboss/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbi-services.com/blog/tag/jboss/</link>
	<description></description>
	<lastBuildDate>Wed, 06 Apr 2022 06:26:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2025/05/cropped-favicon_512x512px-min-32x32.png</url>
	<title>Archives des JBoss - dbi Blog</title>
	<link>https://www.dbi-services.com/blog/tag/jboss/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>JBoss EAP 7 – Cluster in Domain mode</title>
		<link>https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-domain-mode/</link>
					<comments>https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-domain-mode/#respond</comments>
		
		<dc:creator><![CDATA[David Diab]]></dc:creator>
		<pubDate>Fri, 31 Dec 2021 15:11:10 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Application Server]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[JBoss EAP]]></category>
		<category><![CDATA[Web Application]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/2021/12/31/jboss-eap-7-cluster-in-domain-mode/</guid>

					<description><![CDATA[<p>It is time to show you how to build a cluster with Domain mode within JBoss EAP 7. Before you read this blog I suggest you to review the following blogs: JBoss terminologies, the Domain architecture understanding, and how to create a Domain. All these bogs will help you to better understand what we will [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-domain-mode/">JBoss EAP 7 – Cluster in Domain mode</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It is time to show you how to build a cluster with Domain mode within JBoss EAP 7. Before you read this blog I suggest you to review the following blogs: <a href="https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/" rel="noopener" target="_blank">JBoss terminologies</a>, <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/" rel="noopener" target="_blank">the Domain architecture understanding</a>, and <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/" rel="noopener" target="_blank">how to create a Domain</a>. All these bogs will help you to better understand what we will do today 😉<br />
<span id="more-490"></span></p>
<h2>Environment Preparation</h1>
<p>The domain will look like the below architecture:<br />
<img decoding="async" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/01/JBoss-cluster-domain-arch.png" alt="Domain Architecture" /></p>
<p>On three VMs:</p>
<ul>
<li>vmjboss: master, hosting the Domain Controller</li>
<li>vmjboss1: slave1</li>
<li>vmjboss2: slave2</li>
</ul>
<p>I already installed JBoss EAP 7.0.0 on these VMs under $JBOSS_HOME, and created the domain according to the above architecture. If you need any help to create the domain please check this <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/" rel="noopener" target="_blank">blog</a>.</p>
<h3>Start the Domain</h3>
<p>I started the domain, I can see that both slaves joined the master:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;Host Controller] 16:53:44,707 INFO  &#x5B;org.jboss.as.domain.controller] (Host Controller Service Threads - 36) WFLYHC0019: Registered remote slave host &quot;slave1&quot;, JBoss JBoss EAP 7.0.0.GA (WildFly 2.1.2.Final-redhat-1)
&#x5B;Host Controller] 16:54:28,710 INFO  &#x5B;org.jboss.as.domain.controller] (Host Controller Service Threads - 37) WFLYHC0019: Registered remote slave host &quot;slave2&quot;, JBoss JBoss EAP 7.0.0.GA (WildFly 2.1.2.Final-redhat-1)
</pre>
<p>On slave1 and slave2, you should see the below in the logs:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;Host Controller] 16:54:26,644 INFO  &#x5B;org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0148: Connected to master host controller at remote://vmjboss:9999
&#x5B;Host Controller] 16:54:26,689 INFO  &#x5B;org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.0.0.GA (WildFly Core 2.1.2.Final-redhat-1) (Host Controller) started in 13192ms - Started 43 of 44 services (13 services are lazy, passive or on-demand)
</pre>
<h3>Create Server Group</h3>
<p>Now, our domain is up and running, we will create the ServerGroup named GroupHA.<br />
You can use the <em>&#8211;command</em> argument to provide a single CLI command to execute. The management CLI will terminate once the commands have completed.</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;jboss@vmjboss ~]$ $JBOSS_HOME/bin/jboss-cli.sh -c --controller=vmjboss:9990 --command=&quot;/server-group=GroupHA:add(profile=ha,socket-binding-group=ha-sockets)&quot;
{
    &quot;outcome&quot; =&gt; &quot;success&quot;,
    &quot;result&quot; =&gt; undefined,
    &quot;server-groups&quot; =&gt; undefined
}
</pre>
<p>To build a cluster the profile should be ha or full-ha where needed subsystems are configured by default:</p>
<ul>
<li><strong>Infinispan</strong>: An architecture used for caching objects and also replicating objects between caches. The Infinispan subsystem provides caching, state replication, and state distribution support.</li>
<li><strong>JGroups</strong>: A framework for nodes to communicate with each other using either UDP or TCP.</li>
</ul>
<p>For more information about profiles read this <a href="https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/" rel="noopener" target="_blank">blog </a> 😉</p>
<h3>Create Servers</h3>
<p>From the master, create the server1 on slave1:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;jboss@vmjboss ~]$ $JBOSS_HOME/bin/jboss-cli.sh -c --controller=vmjboss:9990 --command=&quot;/host=slave1/server-config=server1:add(group=GroupHA,socket-binding-port-offset=100)&quot;
{
    &quot;outcome&quot; =&gt; &quot;success&quot;,
    &quot;result&quot; =&gt; {
        &quot;step-1&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;},
        &quot;step-2&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;},
... 
        &quot;step-255&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;},
        &quot;step-256&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;}
    },
    &quot;server-groups&quot; =&gt; undefined
}
</pre>
<p>The port-offset is set to 100 to avoid port conflict with other instances running on the same VM/IP address.</p>
<p>Create the server2 on slave2:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;jboss@vmjboss ~]$ $JBOSS_HOME/bin/jboss-cli.sh -c --controller=vmjboss:9990 --command=&quot;/host=slave2/server-config=server2:add(group=GroupHA,socket-binding-port-offset=200)&quot;
{
    &quot;outcome&quot; =&gt; &quot;success&quot;,
    &quot;result&quot; =&gt; {
        &quot;step-1&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;},
        &quot;step-2&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;},
... 
        &quot;step-255&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;},
        &quot;step-256&quot; =&gt; {&quot;outcome&quot; =&gt; &quot;success&quot;}
    },
    &quot;server-groups&quot; =&gt; undefined
}
</pre>
<p>Both servers have been assigned to the server group GroupHA created before.</p>
<p>Start both servers:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;jboss@vmjboss ~]$ $JBOSS_HOME/bin/jboss-cli.sh -c --controller=vmjboss:9990 --command=&quot;:start-servers(blocking=true)&quot;

{
    &quot;outcome&quot; =&gt; &quot;success&quot;,
    &quot;result&quot; =&gt; undefined,
    &quot;server-groups&quot; =&gt; undefined
}
</pre>
<p><strong>What <em>blocking=true</em> means?</strong><br />
In fact, if blocking=true is set your command will hang or wait until the operation on the server side returns and tells the CLI that the operation is complete.</p>
<h2>Cluster Creation</h2>
<p>A cluster is a collection of servers that communicate with each other in such a way that they improve the availability of services by providing the following capabilities:</p>
<ul>
<li><strong>High Availability (HA)</strong>: a service has a very high probability of being available.</li>
<li><strong>Scalability</strong>: a service can handle a large number of requests by spreading the workload across multiple servers.</li>
<li><strong>Failover</strong>: if a service fails, the client can continue processing its tasks as another cluster member takes over the client&#8217;s requests.</li>
<li><strong>Fault Tolerance</strong>: a server can guarantee correct behavior even if fail over occurs.</li>
</ul>
<p>The most common way to achieve scalability and high availability is to use the following together:</p>
<ul>
<li><strong>Load balancer</strong>: Often a piece of hardware, or a service like Apache httpd.</li>
<li><strong>Data replication services</strong>: A service such as memcached or a framework (Infinispan)</li>
</ul>
<h3>Application Preparation</h3>
<p>To take advantage of the high availability features of clustered servers, an application first has to be marked as being distributable. To do so, include the  tag in the web.xml for the application. The following is extracted from the web.xml of my cluster.war application:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;web-app ...&gt;
    &lt;distributable/&gt;
  &lt;/web-app&gt;
</pre>
<h3>Application Deployment</h3>
<p>Now, I will deploy the cluster.war application on the Server Group GroupHA, so on all servers assigned to this Server Group.</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;jboss@vmjboss ~]$ $JBOSS_HOME/bin/jboss-cli.sh -c --controller=vmjboss:9990 --commands=&quot;deploy /opt/data/cluster.war --server-groups=GroupHA,deployment-info --name=cluster.war&quot;
NAME        RUNTIME-NAME 
cluster.war cluster.war  

SERVER-GROUP       STATE     
GroupHA            enabled
</pre>
<p>As you can see the output of deployment-info, the cluster.war application has been deployed and enabled on GroupHA, so on server1 and server2.</p>
<p>Go, and check the slave1 and slave2 logs, you should see:<br />
On slave1:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;Server:server1] 17:45:51,095 INFO  &#x5B;org.wildfly.extension.undertow] (ServerService Thread Pool -- 68) WFLYUT0021: Registered web context: /cluster
&#x5B;Server:server1] 17:45:52,662 INFO  &#x5B;org.infinispan.CLUSTER] (remote-thread--p11-t1) ISPN000310: Starting cluster-wide rebalance for cache cluster.war, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)&#x5B;slave1:server1: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)&#x5B;slave1:server1: 40+40, slave2:server2: 40+40]}, unionCH=null, actualMembers=&#x5B;slave1:server1, slave2:server2]}
&#x5B;Server:server1] 17:45:52,681 INFO  &#x5B;org.infinispan.CLUSTER] (remote-thread--p11-t1) ISPN000310: Starting cluster-wide rebalance for cache routing, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)&#x5B;slave1:server1: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)&#x5B;slave1:server1: 40+40, slave2:server2: 40+40]}, unionCH=null, actualMembers=&#x5B;slave1:server1, slave2:server2]}
..
&#x5B;Server:server1] 17:45:55,104 INFO  &#x5B;org.jboss.as.server] (ServerService Thread Pool -- 65) WFLYSRV0010: Deployed &quot;cluster.war&quot; (runtime-name : &quot;cluster.war&quot;)
</pre>
<p>On slave2:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;Server:server2] 17:45:52,454 INFO  &#x5B;org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000094: Received new cluster view for channel hibernate: &#x5B;slave1:server1|1] (2) &#x5B;slave1:server1, slave2:server2]
...
&#x5B;Server:server2] 17:45:53,777 INFO  &#x5B;javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 66) Initializing Mojarra 2.2.12-jbossorg-2  for context '/cluster'
&#x5B;Server:server2] 17:45:55,334 INFO  &#x5B;org.wildfly.extension.undertow] (ServerService Thread Pool -- 66) WFLYUT0021: Registered web context: /cluster
&#x5B;Server:server2] 17:45:55,451 INFO  &#x5B;org.jboss.as.server] (ServerService Thread Pool -- 65) WFLYSRV0010: Deployed &quot;cluster.war&quot; (runtime-name : &quot;cluster.war&quot;)
</pre>
<p>Which means that a cluster has been created once your distributable application has been deployed on servers server1 and server2 (members of the server group GroupHA). </p>
<p>The application is available from server2:<br />
<img decoding="async" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/01/JBoss-cluster-domain-app1.png" alt="Application available on server2" /></p>
<p>The application is also available from server1:<br />
<img decoding="async" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/01/JBoss-cluster-domain-app.png" alt="Application available on server1" /></p>
<p>Now, you can easily create new server(s) and assign it/them to GroupHA, the application cluster.war will be deployed on it and server3 will join the cluster automatically.</p>
<p>Now, data is replicated between the cluster members, but we will better see clustering benefits with a LB on top. That&#8217;s will be the topic of our my next blog, I will show you how to configure JBoss EAP to play as Load Balancer, in the meanwhile don&#8217;t hesitate to ask questions 😉</p>
<p>Take care and stay safe 🙂</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-domain-mode/">JBoss EAP 7 – Cluster in Domain mode</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-domain-mode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>JBoss EAP 7 – Domain Configuration</title>
		<link>https://www.dbi-services.com/blog/jboss-eap-7-domain-configuration/</link>
					<comments>https://www.dbi-services.com/blog/jboss-eap-7-domain-configuration/#respond</comments>
		
		<dc:creator><![CDATA[David Diab]]></dc:creator>
		<pubDate>Sun, 29 Nov 2020 22:33:54 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[JBoss]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/jboss-eap-7-domain-configuration/</guid>

					<description><![CDATA[<p>In a previous blog I talked about the domain creation, we saw at the end that some server groups and servers are created by default which usually are not what we need. Through this blog, I will show you how to clean this unneeded configuration and how to configure your domain according to your defined [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-configuration/">JBoss EAP 7 – Domain Configuration</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In a previous <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/" rel="noopener noreferrer" target="_blank">blog</a> I talked about the domain creation, we saw at the end that some server groups and servers are created by default which usually are not what we need.<br />
Through this blog, I will show you how to clean this unneeded configuration and how to configure your domain according to your defined architecture.<br />
<span id="more-14897"></span></p>
<h2>How this default configuration arrive in my domain?</h2>
<p>As explained before we use the default domain.xml and (host.xml, host-master.xml or host-slave.xml) to create a domain, in fact, the default configuration created is there 😉</p>
<h3>Server groups preconfigured in domain.xml</h3>
<p>In the domain.xml you will find below configuration:</p>
<pre class="brush: xml; title: ; notranslate">
    &lt;server-groups&gt;
        &lt;server-group name=&quot;main-server-group&quot; profile=&quot;full&quot;&gt;
            &lt;jvm name=&quot;default&quot;&gt;
                &lt;heap size=&quot;1000m&quot; max-size=&quot;1000m&quot;/&gt;
            &lt;/jvm&gt;
            &lt;socket-binding-group ref=&quot;full-sockets&quot;/&gt;
        &lt;/server-group&gt;
        &lt;server-group name=&quot;other-server-group&quot; profile=&quot;full-ha&quot;&gt;
            &lt;jvm name=&quot;default&quot;&gt;
                &lt;heap size=&quot;1000m&quot; max-size=&quot;1000m&quot;/&gt;
            &lt;/jvm&gt;
            &lt;socket-binding-group ref=&quot;full-ha-sockets&quot;/&gt;
        &lt;/server-group&gt;
    &lt;/server-groups&gt;
</pre>
<p>This means that two server groups are configured already.</p>
<h3>Servers configured in host*.xml</h3>
<h4>host-master.xml</h4>
<p>No servers defined, which is normal because it is not recommended to have servers on the master host.</p>
<h4>host.xml</h4>
<pre class="brush: xml; title: ; notranslate">
    &lt;servers&gt;
        &lt;server name=&quot;server-one&quot; group=&quot;main-server-group&quot;&gt;
        &lt;/server&gt;
        &lt;server name=&quot;server-two&quot; group=&quot;main-server-group&quot; auto-start=&quot;true&quot;&gt;
            &lt;socket-bindings port-offset=&quot;150&quot;/&gt;
        &lt;/server&gt;
        &lt;server name=&quot;server-three&quot; group=&quot;other-server-group&quot; auto-start=&quot;false&quot;&gt;
        &lt;/server&gt;
    &lt;/servers&gt;
</pre>
<h4>host-slave.xml</h4>
<pre class="brush: xml; title: ; notranslate">
    &lt;servers&gt;
        &lt;server name=&quot;server-one&quot; group=&quot;main-server-group&quot;/&gt;
        &lt;server name=&quot;server-two&quot; group=&quot;other-server-group&quot;&gt;
            &lt;socket-bindings port-offset=&quot;150&quot;/&gt;
        &lt;/server&gt;
    &lt;/servers&gt;
</pre>
<p>So, depending on which preconfigured file is used servers are configured in your domain&#8230;</p>
<h2>How to clean default configuration?</h2>
<p>You have two choices:</p>
<h3>Update xml preconfigured files</h3>
<p>The idea is to update the xml files before you start the domain and remove this default configuration on each host. which means:<br />
Remove all lines between </p>
<pre class="brush: xml; title: ; notranslate">
    &lt;server-groups&gt;
</pre>
<p>  and </p>
<pre class="brush: xml; title: ; notranslate">
    &lt;/server-groups&gt;
</pre>
<p>from domain.xml</p>
<p>Remove all lines between</p>
<pre class="brush: xml; title: ; notranslate">
    &lt;servers&gt;
</pre>
<p>  and </p>
<pre class="brush: xml; title: ; notranslate">
    &lt;servers&gt;
</pre>
<p>from host.xml or host-slave.xml</p>
<p>Be careful, servers are assigned to server groups, so if you remove the server groups you have to remove related servers, if not this will cause issues because server groups will not be found!</p>
<h3>Clean default configuration after domain start </h3>
<p>Start your domain and connect to the CLI:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
[jboss@vmjboss ~]$ $JBOSS_HOME/bin/jboss-cli.sh -c --controller=vmjboss:9990
[domain@vmjboss:9990 /] 
</pre>
<p>You need first to stop servers then remove them:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
[domain@vmjboss:9990 /] /host=slave1/server-config=server-one:stop(blocking=true)
{
    "outcome" =&gt; "success",
    "result" =&gt; "STOPPED"
}
[domain@vmjboss:9990 /] /host=slave1/server-config=server-one:remove             
{
    "outcome" =&gt; "success",
    "result" =&gt; undefined,
    "server-groups" =&gt; undefined
}
</pre>
<p>Repeat the operation on all servers all hosts.</p>
<p>Now, you will be able to remove default server groups:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
[domain@vmjboss:9990 /] /server-group=main-server-group:remove
{
    "outcome" =&gt; "success",
    "result" =&gt; undefined,
    "server-groups" =&gt; undefined
}
</pre>
<p>Repeat the operation to remove all default server groups</p>
<h2>Configure the domain</h2>
<h3>Define server groups</h3>
<p>Server groups already explained in this <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/" rel="noopener noreferrer" target="_blank">blog</a>.</p>
<p>To define a server group you should at least know:<br />
&#8211; Which profile is needed (default, full, full-ha, ha)<br />
&#8211; Which socket-binding-group according to your profile (standard-sockets, full-sockets, full-ha-sockets, ha-sockets)<br />
&#8211; socket-binding-port-offset if needed</p>
<p>You can create a server groups via CLI or console, here the CLI Command to create an HA server groups:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;domain@vmjboss:9990 /] /server-group=HA-GROUP:add(profile=ha,socket-binding-group=ha-sockets)
{
    &quot;outcome&quot; =&gt; &quot;success&quot;,
    &quot;result&quot; =&gt; undefined,
    &quot;server-groups&quot; =&gt; undefined
}
</pre>
<h3>Define servers</h3>
<p>Servers already explained in this <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/" rel="noopener noreferrer" target="_blank">blog</a>.</p>
<p>To create a server you should at least know:<br />
&#8211; On which host?<br />
&#8211; Assigned to which group?</p>
<p>The server is created in a host and assigned to a server groups, below the command line to create a server:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;domain@vmjboss:9990 /] /host=slave1/server-config=server1:add(group=HA-GROUP,socket-binding-port-offset=100,auto-start=true)
{
    &quot;outcome&quot; =&gt; &quot;success&quot;,
    &quot;result&quot; =&gt; undefined,
    &quot;server-groups&quot; =&gt; undefined
}
</pre>
<p>Now you know how to clean default servers and server groups, and how to create yours according to your need. Don&#8217;t hesitate to ask questions 😉</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-configuration/">JBoss EAP 7 – Domain Configuration</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/jboss-eap-7-domain-configuration/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>JBoss EAP 7 &#8211; Domain Architecture Understanding</title>
		<link>https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/</link>
					<comments>https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/#respond</comments>
		
		<dc:creator><![CDATA[David Diab]]></dc:creator>
		<pubDate>Mon, 16 Dec 2019 20:56:27 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[JBoss]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/</guid>

					<description><![CDATA[<p>I already talked about the domain creation in a previous blog, it is nice to start with but of course not enough if you want to understand the domain architecture, its components, and how they are related to each other. To understand JBoss EAP domain architecture we need to understand all components of the below [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/">JBoss EAP 7 &#8211; Domain Architecture Understanding</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I already talked about the domain creation in a <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/" target="_blank" rel="noopener noreferrer">previous blog</a>, it is nice to start with but of course not enough if you want to understand the domain architecture, its components, and how they are related to each other.<br />
<span id="more-13177"></span></p>
<p>To understand JBoss EAP domain architecture we need to understand all components of the below domain example:<br />
<img decoding="async" style="max-width: 650px;max-height: 500px" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/BLOG-Domain-architecture.png" /></p>
<p>In the previous figure, the light gray boxes represent machines, they could be either physical or virtual machines. Now, let&#8217;s try to explain each component:</p>
<h2>Host controller</h2>
<p>It is a process running on each machine involved in the domain, this process relays configuration information, runtime status, and management commands to EAP server instances on that particular machine, it is the entry point on the machine. The host controller interacts with the domain controller (explained below) to ensure each server instance is configured according to the policies of the domain. On the other hand, a host controller doesn&#8217;t perform application servers tasks, this is done exclusively by server instances.</p>
<p>The configuration file for a host controller is <strong>host.xml</strong>, and can be found under $DOMAIN_HOME/configuration. There are important settings in this file, for example, server configurations.</p>
<p>By default, a host controller instance is named as its machine host name, but this can be overridden by using the name attribute in the <em>host</em> top-level element, at the beginning of the host.xml configuration file, for example:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;host name=&quot;slave1&quot; xmlns=&quot;urn:jboss:domain:4.1&quot;&gt;
</pre>
<p><em>This name will be displayed in the Management Console and CLI.<br />
Be careful, when a host is stopped it doesn&#8217;t appear anymore in the Management Console and CLI!</em></p>
<h2>Domain controller</h2>
<p>In a managed domain, one of the host controller instances is configured to act as the central management point, so it act as the domain controller. In the previous figure the host managed by the domain controller does not have any server instances. This is a recommended approach, but it is possible because a domain controller is also a host controller so it could directly manage its own server instances.</p>
<p>To denote that a host controller is a domain controller (master host) add the following to its host.xml configuration file between the <em>managenemt </em>and <em>interfaces </em>elements as shown below:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;host name=&quot;master&quot; xmlns=&quot;urn:jboss:domain:4.1&quot;&gt;
	...
	&lt;/management&gt;
	&lt;domain-controller&gt;
		&lt;local/&gt;
	&lt;/domain-controller&gt;
	&lt;interfaces&gt;
	...
&lt;/host&gt;
</pre>
<p>In fact, the <em>domain-controller</em> element informs a host controller where to find the domain controller. If a host controller is supposed to be the master for its managed domain, use the <em>local</em> element, if not:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;domain-controller&gt;
	&lt;remote security-realm=&quot;ManagementRealm&quot;&gt;
		&lt;discovery-options&gt;
			&lt;static-discovery name=&quot;primary&quot;
			protocol=&quot;${jboss.domain.master.protocol:remote}&quot;
			host=&quot;${jboss.domain.master.address}&quot;
			port=&quot;${jboss.domain.master.port:9999}&quot;/&gt;
		&lt;/discovery-options&gt;
	&lt;/remote&gt;
&lt;/domain-controller&gt;
</pre>
<p>The master address and port can be set in the host.xml configuration file or passed as parameter to start the slave host and override these values. Please note that at the same location of host.xml two other preconfigured files host-master.xml and host-slave.xml can be found.</p>
<p>The white field next to the host controllers, means that any host controller could be configured as a replacement domain controller in case the original one is unavailable, this can&#8217;t be automated and require manual operation and will be detailed and tested in a separated blog. If a domain controller fails, the host controllers simply keep trying to reconnect until the domain controller comes back again. Note that the server instances are NOT affected if a domain controller fails.</p>
<h2>Server Group</h2>
<p>A server group is a collection of servers that are managed and configured as one. It provide a logical grouping that impacts configuration settings, for example:</p>
<ul>
<li>A profile is assigned to a server group, all server instances in this server group will have the same profile.</li>
<li>Applications are deployed and activated only to server groups, applications will be deployed to all server instances in this group.</li>
</ul>
<p>Server groups are defined in the <strong>domain.xml</strong> configuration file of the domain controller! A server group require at least a profile and a socket binding group to be created. Then, servers are assigned to the server group inherits its configuration from the server group. For example, if a server group has the <em>default</em> profile, the servers assigned to this server group can&#8217;t be clustered because this need the <em>ha</em> or <em>full-ha</em> profiles. On the other hand, you can override some server group configuration for a specific server, for example, jvm parameters.</p>
<h2>Server</h2>
<p>A server instance runs inside a dedicated Java Virtual Machine (JVM) and runs only application code not management services, I mean comparing to a standalone instance which runs the Management Console and the Management API under the same JVM that runs applications.</p>
<p>In a managed domain, a server instance should be created on one and only one host, and assigned to one and only one server group. </p>
<h2>Process controller (not shown in the above schema)</h2>
<p>A process running on a host machine that starts host controllers and server instances on that particular machine. In fact, on any one of the machines starting a host controller (with or without domain controller) you should have two processes:<br />
<strong>Process Controller</strong></p>
<pre class="brush: bash; gutter: true; first-line: 1 ">
jboss    10281 10200  2 21:47 pts/0    00:00:00 java -D[Process Controller] -server -Xms64m -Xmx512m -XX:MaxMetaspaceSize=256m 
-Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true 
-Dorg.jboss.boot.log.file=/opt/install/master/log/process-controller.log -Dlogging.configuration=file:/opt/install/master/configuration/logging.properties 
-jar /opt/install/eap-7.0.0/jboss-modules.jar -mp /opt/install/eap-7.0.0/modules org.jboss.as.process-controller ..
</pre>
<p><strong>Host Controller</strong></p>
<pre class="brush: bash; gutter: true; first-line: 1 ">
jboss    10294 10281 18 21:47 pts/0    00:00:04 java -D[Host Controller] -Dorg.jboss.boot.log.file=/opt/install/master/log/host-controller.log 
-Dlogging.configuration=file:/opt/install/master/configuration/logging.properties -server -Xms64m -Xmx512m -XX:MaxMetaspaceSize=256m 
-Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -jar /opt/install/eap-7.0.0/jboss-modules.jar 
-mp /opt/install/eap-7.0.0/modules org.jboss.as.host-controller ...
</pre>
<h2>CLI and Management Console</h2>
<p>The Command Line Interface (CLI) and Management Console are a management tools for a managed domain or standalone server. These tools allow users to connect to the domain controller or a standalone server and execute management operations. I am not going to speak a lot about the management tools, the most important point here is to understand that these tools deal only with the domain controller as shown in the above figure.</p>
<p>Hope that this blog helped you to improve your knowledge on domain architecture in JBoss EAP, in next blogs I will talk more in depth about the domain mode with use cases. Meanwhile, don&#8217;t hesitate to ask if you have any question! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/">JBoss EAP 7 &#8211; Domain Architecture Understanding</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/jboss-eap-7-domain-architecture-understanding/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>JBoss EAP 7 &#8211; Modules, Extensions, Subsystems, and Profiles</title>
		<link>https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/</link>
					<comments>https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/#respond</comments>
		
		<dc:creator><![CDATA[David Diab]]></dc:creator>
		<pubDate>Sun, 08 Dec 2019 18:34:41 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[extention]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[standalone]]></category>
		<category><![CDATA[subsystem]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/</guid>

					<description><![CDATA[<p>The first step in JBoss world is to understand these terms and the relationship between each other: Modules, Extensions, Subsystems, and Profiles. Let&#8217;s say that the definition of these terms is the same between Standalone and Domain mode. I will explain each term separately then I will show you the difference in terms of profiles [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/">JBoss EAP 7 &#8211; Modules, Extensions, Subsystems, and Profiles</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The first step in JBoss world is to understand these terms and the relationship between each other: Modules, Extensions, Subsystems, and Profiles.<br />
Let&#8217;s say that the definition of these terms is the same between Standalone and Domain mode. I will explain each term separately then I will show you the difference in terms of profiles management between Standalone and Domain mode.<br />
<span id="more-13126"></span></p>
<h1>Modules</h1>
<p>A module basically provides code (Java Classes) to be used by EAP services and/or by applications. Modules are loaded into an isolated Classloader, and can only see classes from other modules when explicitly requested. In fact, all code running is run inside modules, I mean by code the code provided by the core and the Application code. </p>
<p>Moreover, an application can see a module that exposes a particular version of an API. So, an application developer may control this manually and it can be very useful. But by default, EAP 7 automatically decides which modules to expose to an application, based on its use of JEE APIs.</p>
<p>All modules available in an EAP 7 installation are folders inside JBOSS_HOME/modules:</p>
<ul>
<li><strong>Modules for EAP 7 Product under</strong>: JBOSS_HOME/modules/system/layers/base folder.</li>
<li><strong>Modules for third-party products under</strong>: JBOSS_HOME/modules/system/layers folder.</li>
<li><strong>Local modules folders added by a system administrator should be under</strong>: JBOSS_HOME/modules.</li>
</ul>
<p>Inside one of the module folders listed above, a module name is used to create a folder tree. For example, the module named:</p>
<ul>
<li><strong>org.wildfly.extension.undertow</strong> is under JBOSS_HOME/modules/system/layers as org/wildfly/extension/undertow.</li>
<li><strong>com.oracle</strong> is under JBOSS_HOME/modules as com/oracle.</li>
</ul>
<h1>Extensions</h1>
<p>A module that provides features and capabilities to the application server is called an extension, or let&#8217;s say that the extension is the reference of a module in .xml configuration files.<br />
For example, the module org.wildfly.extension.undertow is referenced as below in the standalone.xml file:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;server xmlns=&quot;urn:jboss:domain:4.1&quot;&gt;
    &lt;extensions&gt;
		...
		&lt;extension module=&quot;org.wildfly.extension.undertow&quot;/&gt;
		...
	&lt;/extensions&gt;
	...
</pre>
<p>So, Extensions are added to an EAP instance using the &#8220;extension&#8221; element, which appears at the beginning of the EAP main configuration files : standalone.xml or domain.xml.<br />
Adding an extension to the configuration files does not make that extension module loaded and active, it make the extension available for management. For example, clustering configurations can be done if the related extensions are available, but the related modules will only be loaded and activated when an application that requires clustering services is deployed. Which is really a good point for JBoss!</p>
<h1>Subsystems</h1>
<p>An extension management model provides one or more subsystems. When an extension is added to an EAP instance, the capabilities and attributes of the subsystems provided by the extension management model are configured within the &#8220;subsystem&#8221; element in the EAP configuration file.<br />
Most of the time, an extension module provides a single subsystem, but a subsystem use multiple extension modules&#8230; For example:</p>
<ul>
<li><strong>org.wildfly.clustering.web.infinispan</strong> extention module is used by the infinispan subsystem, which use also using org.wildfly.clustering.server:
<pre class="brush: xml; title: ; notranslate">
&lt;subsystem xmlns=&quot;urn:jboss:domain:infinispan:4.0&quot;&gt;
	&lt;cache-container name=&quot;server&quot; aliases=&quot;singleton cluster&quot; default-cache=&quot;default&quot; module=&quot;org.wildfly.clustering.server&quot;&gt;
		...
	&lt;/cache-container&gt;
	&lt;cache-container name=&quot;web&quot; default-cache=&quot;dist&quot; module=&quot;org.wildfly.clustering.web.infinispan&quot;&gt;
		...
	&lt;/cache-container&gt;
	...
</pre>
</li>
<li><strong>org.jboss.as.clustering.jgroups</strong> extension module is used by the jgroups subsystem.</li>
</ul>
<p>In fact, each subsystem has its own XML schema to define what is allowed within its  element. All EAP 7 subsystem schema definitions can be found in the JBOSS_HOME/docs/schema folder:</p>
<pre class="brush: bash; gutter: true; first-line: 1 ">
[jboss@vmjboss ~]$ ls -rtl
total 8312
-rw-rw-r-- 1 jboss jboss   5604 Apr 18  2016 xml.xsd
-rw-rw-r-- 1 jboss jboss  33107 Apr 18  2016 wildfly-undertow_3_1.xsd
-rw-rw-r-- 1 jboss jboss  31295 Apr 18  2016 wildfly-undertow_3_0.xsd
-rw-rw-r-- 1 jboss jboss  26467 Apr 18  2016 wildfly-undertow_2_0.xsd
-rw-rw-r-- 1 jboss jboss  24042 Apr 18  2016 wildfly-undertow_1_2.xsd
-rw-rw-r-- 1 jboss jboss  22155 Apr 18  2016 wildfly-undertow_1_1.xsd
-rw-rw-r-- 1 jboss jboss  20317 Apr 18  2016 wildfly-undertow_1_0.xsd
-rw-rw-r-- 1 jboss jboss  54521 Apr 18  2016 jboss-as-infinispan_4_0.xsd
-rw-rw-r-- 1 jboss jboss  55506 Apr 18  2016 jboss-as-infinispan_3_0.xsd
-rw-rw-r-- 1 jboss jboss  55006 Apr 18  2016 jboss-as-infinispan_2_0.xsd
-rw-rw-r-- 1 jboss jboss  49219 Apr 18  2016 jboss-as-infinispan_1_5.xsd
-rw-rw-r-- 1 jboss jboss  48569 Apr 18  2016 jboss-as-infinispan_1_4.xsd
-rw-rw-r-- 1 jboss jboss  47823 Apr 18  2016 jboss-as-infinispan_1_3.xsd
-rw-rw-r-- 1 jboss jboss  47555 Apr 18  2016 jboss-as-infinispan_1_2.xsd
-rw-rw-r-- 1 jboss jboss  42567 Apr 18  2016 jboss-as-infinispan_1_1.xsd
-rw-rw-r-- 1 jboss jboss  42144 Apr 18  2016 jboss-as-infinispan_1_0.xsd
-rw-rw-r-- 1 jboss jboss  14994 Apr 18  2016 jboss-as-jgroups_4_0.xsd
-rw-rw-r-- 1 jboss jboss  14734 Apr 18  2016 jboss-as-jgroups_3_0.xsd
-rw-rw-r-- 1 jboss jboss   9042 Apr 18  2016 jboss-as-jgroups_2_0.xsd
-rw-rw-r-- 1 jboss jboss   7368 Apr 18  2016 jboss-as-jgroups_1_1.xsd
-rw-rw-r-- 1 jboss jboss   6558 Apr 18  2016 jboss-as-jgroups_1_0.xsd
...
</pre>
<p>All subsystems can be configured using the CLI or the Management Console, I don&#8217;t recommand the manual xml update especially in this case! The management tools will make the update properly when needed.</p>
<h1>Profiles</h1>
<p>A profile is a group of subsystems configurations, by default there are four predefined profiles can be used in Standalone mode and Domain mode:</p>
<ul>
<li><strong>default</strong>: Is the basic subsystem but the most commonly used one, including logging, security, datasources, infinispan, weld, webservices, and ejb3&#8230;
<li><strong>ha</strong>: Contains the exact same subsystems as the default profile, with the addition of clustering capabilities, provided mainly by the jgroups subsystem.
<li><strong>full</strong>: Is similar to the default profile, but notably adds the messaging (messagingactivemq) and a few other less used subsystems.
<li><strong>full-ha</strong>: Is same as the full profile, but with the addition of clustering capabilities.
</ul>
<p>Of course, you can create new profiles, either from scratch or cloned from the ones provided out-of-the-box.</p>
<h2>Standalone vs Domain mode</h2>
<p>As said before, four profiles are configured by default on Standalone and Domain mode, but where the profiles are configured is diffrent:</p>
<p><strong>Standalone</strong><br />
In the JBOSS_HOME/standalone/configuration folder you can find four standalone configuration files:</p>
<ul>
<li><strong>standalone.xml</strong>: which has the default profile configured.</li>
<li><strong>standalone-ha.xml</strong>: which has the ha profile configured.</li>
<li><strong>standalone-full.xml</strong>: which has the full profile configured.</li>
<li><strong>standalone-full-ha.xml</strong>: which has the full-ha profile configured.</li>
</ul>
<p>By default the standalone.sh script will start an instance with default profile so using standalone.xml, if you want to start an instance with another profile you have to give the .xml configuration file as parameter, to use full-ha profile:</p>
<pre class="brush: bash; gutter: true; first-line: 1 ">
$JBOSS_HOME/bin/standalone.sh --server-config=standalone-full-ha.xml
</pre>
<p>So a standalone server instance can easily be started with more or less subsystems available, it is up to you to choose the needed profile.</p>
<p><strong>Domain</strong><br />
In the domain the story is a little bit different, four profiles mentioned before exist in the domain.xml file:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;profiles&gt;
    &lt;profile name=&quot;default&quot;&gt;
		... &lt;!-- Subsystems configuration --&gt;
	&lt;/profile&gt;
    &lt;profile name=&quot;ha&quot;&gt;
		... &lt;!-- Subsystems configuration --&gt;
	&lt;/profile&gt;
    &lt;profile name=&quot;full&quot;&gt;
		... &lt;!-- Subsystems configuration --&gt;
	&lt;/profile&gt;
    &lt;profile name=&quot;full-ha&quot;&gt;
		... &lt;!-- Subsystems configuration --&gt;
	&lt;/profile&gt;
&lt;/profiles&gt;
</pre>
<p>Then when you create a server group you need to specify a profile, which will be the same for all servers in this group.</p>
<p>I hope that this blog will help you to understand the terms evoked (Modules, Extensions, Subsystems, and Profiles) and relationships between them. If any question remain don&#8217;t hesitate to ask <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/">JBoss EAP 7 &#8211; Modules, Extensions, Subsystems, and Profiles</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/jboss-eap-7-modules-extensions-subsystems-and-profiles/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>JBoss EAP 7 – Domain creation</title>
		<link>https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/</link>
					<comments>https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/#respond</comments>
		
		<dc:creator><![CDATA[David Diab]]></dc:creator>
		<pubDate>Wed, 04 Dec 2019 19:31:07 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[JBoss]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/</guid>

					<description><![CDATA[<p>In this blog, I would like to show you how to setup JBoss EAP 7.0.0 in domain mode. It&#8217;s a step to step guide so you can follow the instructions in this blog and build your environment by yourself 😉 Environment preparation In my case I will prepare three hosts, below prerequisites should be verified, [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/">JBoss EAP 7 – Domain creation</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this blog, I would like to show you how to setup JBoss EAP 7.0.0 in domain mode. It&#8217;s a step to step guide so you can follow the instructions in this blog and build your environment by yourself 😉<br />
<span id="more-13143"></span></p>
<h1>Environment preparation</h1>
<p>In my case I will prepare three hosts, below prerequisites should be verified, so make sure that:</p>
<ul>
<li>you have the same JBoss version on three hosts</li>
<li>they are in the same local network</li>
<li>they can access each other via different TCP/UDP ports, sometimes firewall may cause some issues at this level.</li>
</ul>
<p>As said, I will have :<br />
Three hosts:</p>
<ul>
<li>One master : run as domain controller.</li>
<li>Two slaves (slave1, slave2) : will run under the domain management of master.</li>
</ul>
<p>First, I installed JBoss EAP 7 on three VMs under /opt/install/jboss-eap-7, I configured some environment variables to make the blog readable 😉</p>
<h1>Configure and start the Domain</h1>
<h2>Interface configuration</h2>
<p><strong>On Master</strong><br />
Define below environment variables:</p>
<pre class="brush: xml; title: ; notranslate">
JBOSS_HOME=/opt/install/eap-7.0.0
DOMAIN=/opt/install/master
</pre>
<p>Copy the domain folder as below:</p>
<pre class="brush: xml; title: ; notranslate">
cp -rp $JBOSS_HOME/domain $DOMAIN
</pre>
<p>Update the host.xml configuration:</p>
<pre class="brush: xml; title: ; notranslate">
vi $DOMAIN/configuration/host.xml
</pre>
<p>We need to change the address to the management interface so slaves could connect to master. My master&#8217;s host is vmjboss, so I change the config to:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;interfaces&gt;
    &lt;interface name=&quot;management&quot;&gt;
        &lt;inet-address value=&quot;${jboss.bind.address.management:vmjboss}&quot;/&gt;
    &lt;/interface&gt;
    &lt;interface name=&quot;public&quot;&gt;
        &lt;inet-address value=&quot;${jboss.bind.address:vmjboss}&quot;/&gt;
    &lt;/interface&gt;
&lt;/interfaces&gt;
</pre>
<p><strong>On slaves</strong><br />
Steps below for slave1, repeat the same for slave2 🙂</p>
<p>Define below variables environment:</p>
<pre class="brush: xml; title: ; notranslate">
JBOSS_HOME=/opt/install/eap-7.0.0
DOMAIN=/opt/install/slave1
</pre>
<p>Update the host.xml configuration:</p>
<pre class="brush: xml; title: ; notranslate">
vi $DOMAIN/configuration/host.xml
</pre>
<p>First we need to set the hostname, I change the name property as below:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;host xmlns=&quot;urn:jboss:domain:4.1&quot; name=&quot;slave1&quot;&gt;
</pre>
<p>Then we need to modify domain-controller section so slave can connect to master&#8217;s management port:</p>
<pre class="brush: xml; title: ; notranslate">
    &lt;domain-controller&gt;
        &lt;remote protocol=&quot;remote&quot; host=&quot;${jboss.domain.master.address:vmjboss}&quot; port=&quot;${jboss.domain.master.port:9999}&quot; security-realm=&quot;ManagementRealm&quot;/&gt; 
    &lt;/domain-controller&gt;
</pre>
<p><em>As we know, vmjboss is the address of master.</em></p>
<p>Finally, we also need to configure interfaces section and expose the management ports to public address:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;interfaces&gt;
    &lt;interface name=&quot;management&quot;&gt;
        &lt;inet-address value=&quot;${jboss.bind.address.management:vmjboss1}&quot;/&gt;
    &lt;/interface&gt;
    &lt;interface name=&quot;public&quot;&gt;
        &lt;inet-address value=&quot;${jboss.bind.address:vmjboss1}&quot;/&gt;
    &lt;/interface&gt;
&lt;/interfaces&gt;
</pre>
<p>Now, if you start JBoss on master, slave1 and slave2 you will see the slaves cannot be started with following error:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
[Host Controller] 17:44:01,967 WARN  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0001: 
Could not connect to remote domain controller remote://vmjboss:9999 -- java.lang.IllegalStateException: 
WFLYHC0043: Unable to connect due to authentication failure.
</pre>
<p>Because we haven&#8217;t properly set up the authentication between master and slave yet. we need to create the same user/password on master and slaves then use it for domain management authentication, let&#8217;s move to the security configuration.</p>
<h2>Security configuration</h2>
<p>On master and slaves, use the script add-user.sh to create the user as explained below:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;jboss@vmjboss ~]$ $JBOSS_HOME/bin/add-user.sh

What type of user do you wish to add? 
 a) Management User (mgmt-users.properties) 
 b) Application User (application-users.properties)
 (a): a

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : slave
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password : 
Re-enter Password : 
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)&#x5B;  ]: jboss
About to add user 'slave' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'slave' to file '/opt/install/eap-7.0.0/standalone/configuration/mgmt-users.properties'
Added user 'slave' to file '/opt/install/eap-7.0.0/domain/configuration/mgmt-users.properties'
Added user 'slave' with groups jboss to file '/opt/install/eap-7.0.0/standalone/configuration/mgmt-groups.properties'
Added user 'slave' with groups jboss to file '/opt/install/eap-7.0.0/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process? 
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition &lt;secret value=&quot;UGFzc3cwcmQh&quot; /&gt;
</pre>
<p>Notice the four lines <strong>Added user &#8216;slave&#8217;</strong>, you will see that the user has been added to $JBOSS_HOME and note to the $DOMAIN. So we need to override files under $DOMAIN (for master and slaves):</p>
<pre class="brush: xml; title: ; notranslate">
cp -p $JBOSS_HOME/domain/configuration/mgmt* $DOMAIN/configuration/.
</pre>
<p>The user added will be used by the slaves to connect to the master and being registered. So, one further step remain to tell the slaves to use this user, update the $DOMAIN/configuration/host.xml onlz on slaves:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;domain-controller&gt;
    &lt;remote protocol=&quot;remote&quot; host=&quot;${jboss.domain.master.address:vmjboss}&quot; port=&quot;${jboss.domain.master.port:9999}&quot; security-realm=&quot;ManagementRealm&quot; username=&quot;slave&quot;/&gt;
&lt;/domain-controller&gt;
</pre>
<p>And change the security-realms section as following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;management&gt;
    &lt;security-realms&gt;
        &lt;security-realm name=&quot;ManagementRealm&quot;&gt;
            &lt;server-identities&gt;
                    &lt;secret value=&quot;UGFzc3cwcmQh&quot; /&gt;
            &lt;/server-identities&gt;
            &lt;authentication&gt;
			...
</pre>
<p>To confirm the configuration start the domain using the same below command (on master and slaves):</p>
<pre class="brush: xml; title: ; notranslate">
$JBOSS_HOME/bin/domain.sh -Djboss.domain.base.dir=$DOMAIN
</pre>
<p>You should see in the master log:</p>
<pre class="brush: xml; title: ; notranslate">
&#x5B;Host Controller] 18:10:20,554 INFO  &#x5B;org.jboss.as.domain.controller] (Host Controller Service Threads - 35) WFLYHC0019: Registered remote slave host &quot;slave1&quot;, JBoss JBoss EAP 7.0.0.GA (WildFly 2.1.2.Final-redhat-1)
...
&#x5B;Host Controller] 18:12:22,534 INFO  &#x5B;org.jboss.as.domain.controller] (Host Controller Service Threads - 35) WFLYHC0019: Registered remote slave host &quot;slave2&quot;, JBoss JBoss EAP 7.0.0.GA (WildFly 2.1.2.Final-redhat-1)
</pre>
<p>Connect to the domain created:</p>
<p>Using Command Line Interface:</p>
<pre class="brush: bash; gutter: true; first-line: 1 ">
[jboss@vmjboss ~]$ $JBOSS_HOME/bin/jboss-cli.sh -c --controller=vmjboss:9990
[domain@vmjboss:9990 /] 
</pre>
<p>Using the console, url : http://vmjboss:9990/console<br />
<img decoding="async" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/Blog-JBoss-Domain-creation-console.jpg" /></p>
<p>As you can see, some servers (and groups) have been created by default. This should be cleaned to create wanted servers and groups. This will be the topic of my next blog, see you there 😉</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/">JBoss EAP 7 – Domain creation</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/jboss-eap-7-domain-creation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>JBoss EAP 7 &#8211; Cluster in Standalone mode</title>
		<link>https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-standalone-mode/</link>
					<comments>https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-standalone-mode/#respond</comments>
		
		<dc:creator><![CDATA[David Diab]]></dc:creator>
		<pubDate>Tue, 03 Dec 2019 22:43:34 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[JBoss]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-standalone-mode/</guid>

					<description><![CDATA[<p>Usually, when we speak about Standalone mode we imagine that it can&#8217;t be clustered&#8230; In fact, with JBoss it is possible, the clustering functionality is configured by default in the HA-based profiles: standalone-ha.xml and standalone-full-ha.xml. I would like to share with you two cluster scenarios: &#8211; Scenario 1: Two Standalone instances on one VM &#8211; [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-standalone-mode/">JBoss EAP 7 &#8211; Cluster in Standalone mode</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Usually, when we speak about Standalone mode we imagine that it can&#8217;t be clustered&#8230; In fact, with JBoss it is possible, the clustering functionality is configured by default in the HA-based profiles: standalone-ha.xml and standalone-full-ha.xml.<br />
<span id="more-13121"></span><br />
I would like to share with you two cluster scenarios:<br />
	&#8211; Scenario 1: Two Standalone instances on one VM<br />
	&#8211; Scenario 2: Two Standalone instances on two VMs</p>
<p>First of all, you have to install JBoss, I installed the JBoss EAP 7.0.0 on /opt/JBoss-eap-7.</p>
<p>In the JBoss home directory there is a standalone folder, which is the default standalone instance location. So, the below command will start a default standalone instance with a default profile (standalone.xml):</p>
<pre class="brush: bash; gutter: true; first-line: 1">
/opt/install/jboss-eap-7/bin/standalone.sh
</pre>
<p><em>Don&#8217;t execute it, to keep the default folder as it is for future usage.</em></p>
<h1>Scenario 1: Two Standalone instances on one VM</h1>
<p>We will create two copies of standalone folder and rename them as node1 and node2 as shown below:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
cp -rp /opt/install/jboss-eap-7/standalone /opt/install/node1
cp -rp /opt/install/jboss-eap-7/standalone /opt/install/node2
</pre>
<p><em>It is recommended to put instance folder outside the JBoss home directory.</em></p>
<p>Below commands will start both JBoss nodes in a cluster:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
/opt/install/jboss-eap-7/bin/standalone.sh -c standalone-ha.xml -Djboss.server.base.dir=/opt/install/node1 -Djboss.bind.address=vmtestjboss -Djboss.bind.address.management=vmtestjboss -Djboss.node.name=node1 -Djboss.socket.binding.port-offset=1
</pre>
<pre class="brush: bash; gutter: true; first-line: 1">
/opt/install/jboss-eap-7/bin/standalone.sh -c standalone-ha.xml -Djboss.server.base.dir=/opt/install/node2 -Djboss.bind.address=vmtestjboss -Djboss.bind.address.management=vmtestjboss -Djboss.node.name=node2 -Djboss.socket.binding.port-offset=2
</pre>
<p>Where:<br />
-c : is for server configuration file to be used, it could be &#8211;server-config<br />
-Djboss.bind.address and -Djboss.bind.address.management : are for binding address<br />
-Djboss.server.base.dir : is for the path from where node is present<br />
-Djboss.node.name : is the name of the node &#8211; should be different for both nodes<br />
-Djboss.socket.binding.port-offset : is for the port offset foe each node, it should be different for both nodes because they are running on the same host.</p>
<p>We keep the default value of jboss.default.multicast.address (230.0.0.4), change it if you want to have multiple clusters on the same network.</p>
<p>Once both nodes come up properly you would not see in the log any information saying that they are in a cluster until you deploy a clustered application, but what is a clustered application?<br />
In fact, to take advantage of the high availability features of clustered JBoss instances, an application first has to be marked as being distributable. To do so, include the <em>distributable</em>tag in the web.xml, as shown below:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
    &lt;web-app ...&gt;
        &lt;distributable/&gt;
    &lt;/web-app&gt;
...
</pre>
<p>To deploy the application on both instances, use the Command Line Interface (CLI):<br />
For node 1:<br />
Use the port 9991, which is = DEFAULT MANAGEMENT HTTP PORT (9990) + PORT OFFSET (1).</p>
<pre class="brush: bash; gutter: true; first-line: 1">
[jboss@vmtestjboss ~]$ /opt/install/jboss-eap-7/bin/jboss-cli.sh -c --controller=vmtestjboss:9991
[standalone@vmtestjboss:9991 /] deploy /opt/install2/cluster.war
</pre>
<p>Then check the log and notice the below line:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
20:48:59,638 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000094: Received new cluster view for channel server: [node1|0] (1) [node1]
</pre>
<p>For node 2:<br />
Use the port 9992, which is = DEFAULT MANAGEMENT HTTP PORT (9990) + PORT OFFSET (2).</p>
<pre class="brush: bash; gutter: true; first-line: 1">
[jboss@vmtestjboss ~]$ /opt/install/jboss-eap-7/bin/jboss-cli.sh -c --controller=vmtestjboss:9992
[standalone@vmtestjboss:9992 /] deploy /opt/install2/cluster.war
</pre>
<p>Then check the log and notice the below line:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
20:49:59,524 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000094: Received new cluster view for channel ejb: [node1|1] (2) [node1, node2]
</pre>
<p>The application deployed is clustered now.</p>
<h1>Scenario 2: Two Standalone instances on two VMs </h1>
<p>Here I have two VMs (vmtestjboss01 and vmtestjboss02), when JBoss EAP 7 is installed on both VMs, create just a single copies of standalone folder in respective VMs then start the instance:<br />
&#8211; On vmtestjboss01:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
cp -rp /opt/install/jboss-eap-7/standalone /opt/install/node1

/opt/install/jboss-eap-7/bin/standalone.sh -c standalone-ha.xml -Djboss.server.base.dir=/opt/install/node1 -Djboss.bind.address=vmtestjboss01 -Djboss.bind.address.management=vmtestjboss01 -Djboss.node.name=node1 -Djboss.default.multicast.address=230.0.0.5
</pre>
<p>&#8211; On vmtestjboss02:</p>
<pre class="brush: bash; gutter: true; first-line: 1">
cp -rp /opt/install/jboss-eap-7/standalone /opt/install/node2

/opt/install/jboss-eap-7/bin/standalone.sh -c standalone-ha.xml -Djboss.server.base.dir=/opt/install/node2 -Djboss.bind.address=vmtestjboss02 -Djboss.bind.address.management=vmtestjboss02 -Djboss.node.name=node2 -Djboss.default.multicast.address=230.0.0.5
</pre>
<p>-Djboss.socket.binding.port-offset is not needed here because we are working on two VMs, so we will not have port conflict.<br />
-Djboss.default.multicast.address is specified here because I want to isolate this cluster from the one already configured by default (230.0.0.4)</p>
<p>Deploy the clustered application as explained in the first scenario.</p>
<p>When you have JBoss running on two separate machines, you will see the join indications on both machines so you know they are talking. But going to http://vmtestjboss01:8080/cluster and http://vmtestjboss02:8080/cluster shows no indication of session replication between the two machines. It seems like they are completely separate, whereas when you run two nodes both on the same machine it works very well. This will be explained and solved in a next blog related to session replication.</p>
<p>Don&#8217;t hesitate to share your experience with JBoss clusters on standalone instances!</p>
<p>L’article <a href="https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-standalone-mode/">JBoss EAP 7 &#8211; Cluster in Standalone mode</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/jboss-eap-7-cluster-in-standalone-mode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Documentum &#8211; How to really configure the D2 JMS logs starting with JBoss/WildFly</title>
		<link>https://www.dbi-services.com/blog/documentum-how-to-really-configure-the-d2-jms-logs-starting-with-jbosswildfly/</link>
					<comments>https://www.dbi-services.com/blog/documentum-how-to-really-configure-the-d2-jms-logs-starting-with-jbosswildfly/#respond</comments>
		
		<dc:creator><![CDATA[Morgan Patou]]></dc:creator>
		<pubDate>Sun, 01 Jul 2018 18:00:55 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[Enterprise content management]]></category>
		<category><![CDATA[7.1.1]]></category>
		<category><![CDATA[9.0.1]]></category>
		<category><![CDATA[D2]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[WildFly]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/documentum-how-to-really-configure-the-d2-jms-logs-starting-with-jbosswildfly/</guid>

					<description><![CDATA[<p>If you are working with Documentum for quite some time, you are probably familiar with the logback.xml file that can be used to configure the D2 logs. In this blog, I will be talking only about the Content Server side of this configuration. As you probably know, Documentum upgraded the JMS to use JBoss 7.1.1 &#8220;recently&#8221; [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/documentum-how-to-really-configure-the-d2-jms-logs-starting-with-jbosswildfly/">Documentum &#8211; How to really configure the D2 JMS logs starting with JBoss/WildFly</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you are working with Documentum for quite some time, you are probably familiar with the logback.xml file that can be used to configure the D2 logs. In this blog, I will be talking only about the Content Server side of this configuration. As you probably know, Documentum upgraded the JMS to use JBoss 7.1.1 &#8220;recently&#8221; (several years already) and even WildFly9.0.1 with the CS 7.3+. On this blog, I will only use &#8220;JBoss&#8221; but it refers to both JBoss and WildFly versions.  With these recent versions, the logback.xml file stopped working on linux environments (I&#8217;m not sure about Windows, I only work on linux). Therefore you will face an issue: the D2 JMS logs cannot really be configured properly, by default. Of course you will still be able to configure the JBoss and JMS logs properly because that is done through the logging.properties file (for the boot.log), through the standalone.xml file (for the server.log) and through all log4j.properties files for each JMS Applications (ServerApps, ACS, BPM, aso&#8230;). But if you are using D2, then all the D2 JMS logs (previously stored on D2-JMS.log) will also be added to the server.log as well a console output.</p>
<p>Unfortunately for us, the D2 JMS logs are using DEBUG by default for everything so it might represent some big files at the end of the day as soon as you start working more than XXX concurrent users. Worse than that, the D2 JMS logs, which are in DEBUG, are considered as INFO from the JBoss point of view and therefore, if you are using JBoss with INFO log level, it will print all the DEBUG information from the D2 JMS logs. Of course you could still set the JBoss level to WARN so it would remove all the DEBUG but in this case, you will also be missing the INFO from the JBoss as well as the D2 JMS sides which might include some pretty important information like for example the assurance that the D2.Lockbox can be read properly (no problems with the passwords and/or fingerprint).</p>
<p>So what to do about it? Well there is a JVM parameter that can actually be used to force the JBoss Server to read and use a specific logback.xml file. For that, simply update the startMethodServer.sh script as done below. I will use the logback.xml file that is present by default right under ServerApps.ear and that I will customize to get the best out of it.</p>
<p>First of all, I&#8217;m updating the content to add some things. Here is a template for this file:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[dmadmin@content_server_01 ~]$ cd $DOCUMENTUM_SHARED/wildfly9.0.1/server/
[dmadmin@content_server_01 server]$ logback_file="$DOCUMENTUM_SHARED/wildfly9.0.1/server/DctmServer_MethodServer/deployments/ServerApps.ear/logback.xml"
[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ # Here I'm updating the content of the default file to add custom patterns, log level, console output, aso...
[dmadmin@content_server_01 server]$ vi ${logback_file}
[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ cat ${logback_file}
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;configuration scan="true" scanPeriod="60 seconds"&gt;

  &lt;appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="RootFileAppender"&gt;
    &lt;file&gt;/tmp/D2-JMS.log&lt;/file&gt;
    &lt;append&gt;true&lt;/append&gt;
    &lt;filter class="ch.qos.logback.classic.filter.ThresholdFilter"&gt;
      &lt;level&gt;debug&lt;/level&gt;
    &lt;/filter&gt;
    &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
      &lt;fileNamePattern&gt;/tmp/D2-JMS-%d{yyyy-MM-dd}.log.zip&lt;/fileNamePattern&gt;
      &lt;MaxHistory&gt;5&lt;/MaxHistory&gt;
    &lt;/rollingPolicy&gt;
    &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
      &lt;pattern&gt;%d{"yyyy-MM-dd HH:mm:ss,SSS z"} [%-5p] (%t) - %-45(%C{44}) : %m%n&lt;/pattern&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;

  &lt;appender class="ch.qos.logback.core.ConsoleAppender" name="RootConsoleAppender"&gt;
    &lt;layout&gt;
      &lt;pattern&gt;[%-5p] - %-45(%C{44}) : %m%n&lt;/pattern&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;

  &lt;root&gt;
    &lt;level value="${logLevel:-info}"/&gt;
    &lt;appender-ref ref="RootFileAppender"/&gt;
    &lt;appender-ref ref="RootConsoleAppender"/&gt;
  &lt;/root&gt;

&lt;/configuration&gt;
[dmadmin@content_server_01 server]$</pre>
<p>&nbsp;</p>
<p>Then once you have your template logback.xml file, you need to force JBoss to load and use it otherwise it will just be ignored. As mentioned above, here is the JVM parameter to be added:</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: [5,8]">[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ grep "JAVA_OPTS=" startMethodServer.sh
JAVA_OPTS="$USER_MEM_ARGS -Djboss.server.base.dir=$JBOSS_BASE_DIR -Dorg.apache.coyote.http11.Http11Protocol.SERVER=MethodServer"
[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ sed -i 's,^JAVA_OPTS="[^"]*,&amp; -Dlogback.configurationFile=$JBOSS_BASE_DIR/deployments/ServerApps.ear/logback.xml,' startMethodServer.sh
[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ grep "JAVA_OPTS=" startMethodServer.sh
JAVA_OPTS="$USER_MEM_ARGS -Djboss.server.base.dir=$JBOSS_BASE_DIR -Dorg.apache.coyote.http11.Http11Protocol.SERVER=MethodServer -Dlogback.configurationFile=$JBOSS_BASE_DIR/deployments/ServerApps.ear/logback.xml"
[dmadmin@content_server_01 server]$</pre>
<p>&nbsp;</p>
<p>Once done, you can customize some values like the path and name of the log file, the number of files to keep, the log level you want to use, aso. Here are some commands to do just that:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ d2_log="$DOCUMENTUM_SHARED/wildfly9.0.1/server/DctmServer_MethodServer/logs/D2-JMS.log"
[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ # Commands to update some values on this pattern file using the ${d2_log} variable
[dmadmin@content_server_01 server]$ sed -i "s,&lt;file&gt;.*&lt;/file&gt;,&lt;file&gt;${d2_log}&lt;/file&gt;," ${logback_file}
[dmadmin@content_server_01 server]$ sed -i "s,&lt;fileNamePattern&gt;.*&lt;/fileNamePattern&gt;,&lt;fileNamePattern&gt;${d2_log}-%d{yyyy-MM-dd}.zip&lt;/fileNamePattern&gt;," ${logback_file}
[dmadmin@content_server_01 server]$ sed -i "s,&lt;MaxHistory&gt;.*&lt;/MaxHistory&gt;,&lt;MaxHistory&gt;180&lt;/MaxHistory&gt;," ${logback_file}
[dmadmin@content_server_01 server]$ sed -i "s,&lt;level&gt;.*&lt;/level&gt;,&lt;level&gt;info&lt;/level&gt;," ${logback_file}
[dmadmin@content_server_01 server]$</pre>
<p>&nbsp;</p>
<p>With the above done, you can just restart the JMS and afterwards, you will have a new file created D2-JMS.log at the location specified and with the log level specified.</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: [11]">[dmadmin@content_server_01 server]$ $JMS_HOME/server/stopMethodServer.sh
{"outcome" =&gt; "success"}
[dmadmin@content_server_01 server]$
[dmadmin@content_server_01 server]$
[dmadmin@content_server_01 server]$
[dmadmin@content_server_01 server]$ $JMS_HOME/server/startJMS.sh
Starting the JMS...
The JMS process has been started.
[dmadmin@content_server_01 server]$ sleep 30
[dmadmin@content_server_01 server]$ 
[dmadmin@content_server_01 server]$ cat ${d2_log}
2018-06-16 17:16:48,652 UTC [INFO ] (default task-6) - com.emc.d2.api.methods.D2Method               : D2Method Main method com.emc.d2.api.methods.D2SubscriptionMethod arguments: {-user_name=dmadmin, -method_trace_level=0, -dcbase_name=Repo1.Repo1, -class_name=com.emc.d2.api.methods.D2SubscriptionMethod, -job_id=080f123450001612}
2018-06-16 17:16:49,668 UTC [INFO ] (default task-6) - com.emc.d2.api.methods.D2Method               : ==== START ======================================================================
2018-06-16 17:16:49,670 UTC [INFO ] (default task-6) - com.emc.d2.api.methods.D2Method               : D2-API v4.7.0070 build 186
2018-06-16 17:16:49,674 UTC [INFO ] (default task-6) - com.emc.d2.api.methods.D2Method               : DFC version : 7.3.0040.0025
2018-06-16 17:16:49,675 UTC [INFO ] (default task-6) - com.emc.d2.api.methods.D2Method               : file.encoding : ANSI_X3.4-1968
2018-06-16 17:16:49,676 UTC [INFO ] (default task-6) - com.emc.d2.api.methods.D2Method               : Arguments : {-user_name=dmadmin, -method_trace_level=0, -docbase_name=Repo1.Repo1, -class_name=com.emc.d2.api.methods.2SubscriptionMethod, -job_id=080f123450001612}
[dmadmin@content_server_01 server]$</pre>
<p>&nbsp;</p>
<p>Here you have a working D2-JMS.log file with INFO only information and no DEBUG.</p>
<p>&nbsp;</p>
<p>Some tips regarding the logback.xml configuration (I put an example of each in the template configuration file above):</p>
<ul>
<li>If you want to display the full date, time (with milliseconds) and timezone in the logs, you will need to add quotes like that: &lt;pattern&gt;%d{&#8220;yyyy-MM-dd HH:mm:ss,SSS z&#8221;} &#8230;&lt;/pattern&gt;. This is simply because the comma (,) is used normally to separate the timeformat from the timezone you want to display the logs on (E.g.: %d{HH:mm:ss.SSS, UTC}) but it won&#8217;t display the timezone on the logs, in this case. So you if want the seconds to be separated from the milliseconds using a comma, you need to quote the whole string. If you want the current timezone to be displayed on the logs, you can usually do it using the &#8220;z&#8221; (with not too old Java versions)</li>
<li>By default, you cannot use parentheses in the pattern to enclose parameters (like &#8220;%-5p&#8221;, &#8220;%t&#8221;, aso&#8230;). This is because parentheses are used to group parameters together to apply formatting to them as part of a group. If you really want to use parentheses on the output, then you have to escape them</li>
<li>You can define the minimum length of a specific pattern parameter using the &#8220;%-X&#8221; where X is the number of characters. Using that, you can align the logs as you want (E.g.: &#8220;%-5p&#8221; for the log level in 5 chars =&gt; &#8220;DEBUG&#8221;, &#8220;INFO &#8220;, &#8220;WARN &#8220;, &#8220;ERROR&#8221;)</li>
<li>You can also shorten a specific pattern parameter using {X} where X is again the number of characters you would want the output string to be reduced to. It is not an exact value but the logger will do its best to reduce the length to what you want.</li>
<li>You can use different appenders to redirect the logs to different outputs. Usually you will want a file appender to store everything in a file but you can also add a console appender so it gets stored in your default console output (be it your shell, a nohup file or the server.log). If you do not want the console appender so it gets stored only on the D2-JMS.log file, you can just comment the line &#8216;&lt;appender-ref ref=&#8221;RootConsoleAppender&#8221;/&gt;&#8217;</li>
</ul>
<p>&nbsp;</p>
<p>You might be wondering why this JVM parameter is not added by default by the Documentum installer since it is a valid solution for this issue, right? Well, I would simply reply that it&#8217;s Documentum. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>&nbsp;</p>
<p>L’article <a href="https://www.dbi-services.com/blog/documentum-how-to-really-configure-the-d2-jms-logs-starting-with-jbosswildfly/">Documentum &#8211; How to really configure the D2 JMS logs starting with JBoss/WildFly</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/documentum-how-to-really-configure-the-d2-jms-logs-starting-with-jbosswildfly/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Documentum &#8211; Change password &#8211; 5 &#8211; CS/FT &#8211; JBoss Admin</title>
		<link>https://www.dbi-services.com/blog/documentum-change-password-5-csft-jboss-admin/</link>
					<comments>https://www.dbi-services.com/blog/documentum-change-password-5-csft-jboss-admin/#respond</comments>
		
		<dc:creator><![CDATA[Morgan Patou]]></dc:creator>
		<pubDate>Sat, 22 Jul 2017 05:57:49 +0000</pubDate>
				<category><![CDATA[Enterprise content management]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Change Password]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[Documentum]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[Management]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/documentum-change-password-5-csft-jboss-admin/</guid>

					<description><![CDATA[<p>The next password I wanted to blog about is the JBoss Admin password. As you know, there are several JBoss Application Servers in Documentum. The most used being the ones for the Java Method Server (JMS) and for the Full Text Servers (Dsearch/IndexAgent). In this blog, I will only talk about the JBoss Admin password [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/documentum-change-password-5-csft-jboss-admin/">Documentum &#8211; Change password &#8211; 5 &#8211; CS/FT &#8211; JBoss Admin</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The next password I wanted to blog about is the JBoss Admin password. As you know, there are several JBoss Application Servers in Documentum. The most used being the ones for the Java Method Server (JMS) and for the Full Text Servers (Dsearch/IndexAgent). In this blog, I will only talk about the JBoss Admin password of the JMS and IndexAgents simply because I will include the Dsearch JBoss instance in another blog which will talk about the xDB.</p>
<p>&nbsp;</p>
<p>The steps are exactly the same for all JBoss instances, it&#8217;s just a matter of checking/updating the right file. In this blog, I will still separate the steps for JMS and IndexAgents but that&#8217;s because I usually have more than one IndexAgent on the same FT and therefore I&#8217;m also providing a way to update all JBoss instances at the same time using the right commands.</p>
<p>&nbsp;</p>
<p>As always, I will define an environment variable to store the password to avoid using clear text passwords in the shell. The generic steps to change a JBoss Admin password, in Documentum, are pretty simple:</p>
<ol>
<li>Store the password in a variable</li>
<li>Encrypt the password</li>
<li>Backup the old configuration file</li>
<li>Replace the password file with the new encrypted password</li>
<li>Restart the component</li>
<li>Checking the connection with the new password</li>
</ol>
<p>&nbsp;</p>
<p>As you can see above, there is actually nothing in these steps to change the password&#8230; We are just replacing a string inside a file with another string and that&#8217;s done, the password is changed! That&#8217;s really simple but that&#8217;s also a security issue since you do NOT need to know the old password&#8230; That&#8217;s how Documentum works with JBoss&#8230;</p>
<p>&nbsp;</p>
<h3>I. JMS JBoss Admin</h3>
<p>For the JMS JBoss Admin, you obviously need to connect to all Content Servers and then perform the steps. Below are the commands I use to set the variable, encrypt the password and the update the password file with the new encrypted password (I&#8217;m just overwriting it):</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: [5,13,14,15]">[dmadmin@content_server_01 ~]$ read -s -p "Please enter the NEW JBoss admin password: " jboss_admin_pw; echo
Please enter the NEW JBoss admin password:
[dmadmin@content_server_01 ~]$
[dmadmin@content_server_01 ~]$ $JAVA_HOME/bin/java -cp "$DOCUMENTUM_SHARED/dfc/dfc.jar" com.documentum.fc.tools.RegistryPasswordUtils ${jboss_admin_pw}
AAAAENwH4N2fF92dfRajKzaARvrfnIG29fnqf8Kgnd2fWfYKmMd9x
[dmadmin@content_server_01 ~]$
[dmadmin@content_server_01 ~]$ cd $DOCUMENTUM_SHARED/jboss7.1.1/server/DctmServer_MethodServer/configuration/
[dmadmin@content_server_01 ~]$ mv dctm-users.properties dctm-users.properties_bck_$(date "+%Y%m%d")
[dmadmin@content_server_01 ~]$
[dmadmin@content_server_01 ~]$ echo "# users.properties file to use with UsersRolesLoginModule" &gt; dctm-users.properties
[dmadmin@content_server_01 ~]$ echo "admin=AAAAENwH4N2fF92dfRajKzaARvrfnIG29fnqf8Kgnd2fWfYKmMd9x" &gt;&gt; dctm-users.properties
[dmadmin@content_server_01 ~]$
[dmadmin@content_server_01 ~]$ cat dctm-users.properties
# users.properties file to use with UsersRolesLoginModule
admin=AAAAENwH4N2fF92dfRajKzaARvrfnIG29fnqf8Kgnd2fWfYKmMd9x
[dmadmin@content_server_01 ~]$</pre>
<p>&nbsp;</p>
<p>At this point, the new password has been put in the file dctm-users.properties in its encrypted form so you can now restart the component and check the status of the JBoss Application Server. To check that, I will use below a small curl command which is really useful&#8230; If just like me you always restrict the JBoss Administration Console to 127.0.0.1 (localhost only), for security reasons, then this is really awesome since you don&#8217;t need to start a X server and you don&#8217;t need to start a browser and all this stuff, simply put the password when asked and voila!</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: [8,10,17]">[dmadmin@content_server_01 ~]$ cd $DOCUMENTUM_SHARED/jboss7.1.1/server
[dmadmin@content_server_01 ~]$ ./stopMethodServer.sh
[dmadmin@content_server_01 ~]$
[dmadmin@content_server_01 ~]$ nohup ./startMethodServer.sh &gt;&gt; nohup-JMS.out 2&gt;&amp;1 &amp;
[dmadmin@content_server_01 ~]$
[dmadmin@content_server_01 ~]$ sleep 30
[dmadmin@content_server_01 ~]$
[dmadmin@content_server_01 ~]$ curl -g --user admin -D - http://localhost:9085/management --header "Content-Type: application/json" -d '{"operation":"read-attribute","name":"server-state","json.pretty":1}'
Enter host password for user 'admin':
HTTP/1.1 200 OK
Transfer-encoding: chunked
Content-type: application/json
Date: Sat, 15 Jul 2017 11:16:51 GMT

{
    "outcome" : "success",
    "result" : "running"
}
[dmadmin@content_server_01 ~]$</pre>
<p>&nbsp;</p>
<p>If everything has been done properly, you should get a &#8220;HTTP/1.1 200 OK&#8221; status meaning that the JBoss Application Server is up &amp; running and the &#8220;result&#8221; should be &#8220;running&#8221;. This proves that the password provided in the command match the encrypted one from the file dctm-users.properties because the JMS is able to answer your request.</p>
<p>&nbsp;</p>
<h3>II. IndexAgent JBoss Admin</h3>
<p>For the IndexAgent JBoss Admin, you obviously need to connect to all Full Text Servers and then perform the steps again. Below are the commands to do that. These commands are adapted in case you have several IndexAgents installed. Please note that the commands below will set the same Admin password for all JBoss instances (all IndexAgents JBoss Admin). Therefore, if that&#8217;s not what you want, you will have to take the commands from the JMS section but adapt the paths.</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: [5,14,15,16,18,19,20,22,23,24]">[xplore@full_text_server_01 ~]$ read -s -p "Please enter the NEW JBoss admin password: " jboss_admin_pw; echo
Please enter the NEW JBoss admin password:
[xplore@full_text_server_01 ~]$
[xplore@full_text_server_01 ~]$ $JAVA_HOME/bin/java -cp "$XPLORE_HOME/dfc/dfc.jar" com.documentum.fc.tools.RegistryPasswordUtils ${jboss_admin_pw}
AAAAENwH4N2cI25WmDdgRzaARvcIvF3g5gR8Kgnd2fWfYKmMd9x
[xplore@full_text_server_01 ~]$
[xplore@full_text_server_01 ~]$ cd $XPLORE_HOME/jboss7.1.1/server/
[xplore@full_text_server_01 ~]$ for i in `ls -d DctmServer_Indexag*`; do mv ./$i/configuration/dctm-users.properties ./$i/configuration/dctm-users.properties_bck_$(date "+%Y%m%d"); done
[xplore@full_text_server_01 ~]$
[xplore@full_text_server_01 ~]$ for i in `ls -d DctmServer_Indexag*`; do echo "# users.properties file to use with UsersRolesLoginModule" &gt; ./$i/configuration/dctm-users.properties; done
[xplore@full_text_server_01 ~]$ for i in `ls -d DctmServer_Indexag*`; do echo "AAAAENwH4N2cI25WmDdgRzaARvcIvF3g5gR8Kgnd2fWfYKmMd9x" &gt;&gt; ./$i/configuration/dctm-users.properties; done
[xplore@full_text_server_01 ~]$
[xplore@full_text_server_01 ~]$ for i in `ls -d DctmServer_Indexag*`; do echo "--$i:"; cat ./$i/configuration/dctm-users.properties; echo; done
--DctmServer_Indexagent_DocBase1:
# users.properties file to use with UsersRolesLoginModule
AAAAENwH4N2cI25WmDdgRzaARvcIvF3g5gR8Kgnd2fWfYKmMd9x

--DctmServer_Indexagent_DocBase2:
# users.properties file to use with UsersRolesLoginModule
AAAAENwH4N2cI25WmDdgRzaARvcIvF3g5gR8Kgnd2fWfYKmMd9x

--DctmServer_Indexagent_DocBase3:
# users.properties file to use with UsersRolesLoginModule
AAAAENwH4N2cI25WmDdgRzaARvcIvF3g5gR8Kgnd2fWfYKmMd9x

[xplore@full_text_server_01 ~]$</pre>
<p>&nbsp;</p>
<p>At this point, the new password has been put in its encrypted form in the file dctm-users.properties for each IndexAgent. So, the next step is to restart all the components and check the status of the JBoss instances. Just like for the JMS, I will use below the curl command to check the status of a specific IndexAgent:</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: [7,9,16]">[xplore@full_text_server_01 ~]$ for i in `ls stopIndexag*.sh`; do ./$i; done
[xplore@full_text_server_01 ~]$
[xplore@full_text_server_01 ~]$ for i in `ls startIndexag*.sh`; do ia=`echo $i|sed 's,start(.*).sh,1,'`; nohup ./$i &gt;&gt; nohup-$ia.out 2&gt;&amp;1 &amp;; done
[xplore@full_text_server_01 ~]$
[xplore@full_text_server_01 ~]$ sleep 30
[xplore@full_text_server_01 ~]$
[xplore@full_text_server_01 ~]$ curl -g --user admin -D - http://localhost:9205/management --header "Content-Type: application/json" -d '{"operation":"read-attribute","name":"server-state","json.pretty":1}'
Enter host password for user 'admin':
HTTP/1.1 200 OK
Transfer-encoding: chunked
Content-type: application/json
Date: Sat, 15 Jul 2017 12:00:35 GMT

{
    "outcome" : "success",
    "result" : "running"
}
[xplore@full_text_server_01 ~]$</pre>
<p>&nbsp;</p>
<p>If you want to check all IndexAgents at once, you can use this command instead (it&#8217;s a long one I know&#8230;):</p>
<pre class="brush: bash; gutter: true; first-line: 1; highlight: [3,5,13,15,17,25,27,29,37]">[xplore@full_text_server_01 ~]$ for i in `ls -d DctmServer_Indexag*`; do port=`grep '&lt;socket-binding .*name="management-http"' ./$i/configuration/standalone.xml|sed 's,.*http.port:([0-9]*).*,1,'`; echo; echo "  ** Please enter below the password for '$i' ($port)"; curl -g --user admin -D - http://localhost:$port/management --header "Content-Type: application/json" -d '{"operation":"read-attribute","name":"server-state","json.pretty":1}'; done

  ** Please enter below the password for 'DctmServer_Indexagent_DocBase1' (9205)
Enter host password for user 'admin':
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Content-Length: 55
Date: Sat, 15 Jul 2017 12:37:35 GMT

{
    "outcome" : "success",
    "result" : "running"
}
  ** Please enter below the password for 'DctmServer_Indexagent_DocBase2' (9225)
Enter host password for user 'admin':
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Content-Length: 55
Date: Sat, 15 Jul 2017 12:37:42 GMT

{
    "outcome" : "success",
    "result" : "running"
}
  ** Please enter below the password for 'DctmServer_Indexagent_DocBase3' (9245)
Enter host password for user 'admin':
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Content-Length: 55
Date: Sat, 15 Jul 2017 12:37:45 GMT

{
    "outcome" : "success",
    "result" : "running"
}
[xplore@full_text_server_01 ~]$</pre>
<p>&nbsp;</p>
<p>If everything has been done properly, you should get a &#8220;HTTP/1.1 200 OK&#8221; status for all IndexAgents.</p>
<p>&nbsp;</p>
<p>L’article <a href="https://www.dbi-services.com/blog/documentum-change-password-5-csft-jboss-admin/">Documentum &#8211; Change password &#8211; 5 &#8211; CS/FT &#8211; JBoss Admin</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/documentum-change-password-5-csft-jboss-admin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Documentum &#8211; Setup a CPS in HTTPS &#8211; Unable to register it</title>
		<link>https://www.dbi-services.com/blog/documentum-setup-a-cps-in-https-unable-to-register-it/</link>
					<comments>https://www.dbi-services.com/blog/documentum-setup-a-cps-in-https-unable-to-register-it/#respond</comments>
		
		<dc:creator><![CDATA[Morgan Patou]]></dc:creator>
		<pubDate>Mon, 22 May 2017 05:34:22 +0000</pubDate>
				<category><![CDATA[Enterprise content management]]></category>
		<category><![CDATA[CPS]]></category>
		<category><![CDATA[Documentum]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[JBoss]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/documentum-setup-a-cps-in-https-unable-to-register-it/</guid>

					<description><![CDATA[<p>In a previous blog (see this one), I described how to setup a WildFly instance in HTTPS and I quickly mentioned something related to the CPS. When I wrote this previous blog, I was already aware of one specific issue that prevented the CPS to be usable but I didn&#8217;t want to mention it to [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/documentum-setup-a-cps-in-https-unable-to-register-it/">Documentum &#8211; Setup a CPS in HTTPS &#8211; Unable to register it</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In a previous blog (see this <a title="Documentum – Setup WildFly in HTTPS" href="https://www.dbi-services.com/blog/documentum-setup-wildfly-in-https/" target="_blank" rel="noopener">one</a>), I described how to setup a WildFly instance in HTTPS and I quickly mentioned something related to the CPS. When I wrote this previous blog, I was already aware of one specific issue that prevented the CPS to be usable but I didn&#8217;t want to mention it to stay focus on the WildFly specific steps for the HTTPS setup which are common between the JMS and the CPS.</p>
<p>&nbsp;</p>
<p>In this blog, I will NOT talk about the Java cacerts because the commands are exactly the same as in the previous blog and they aren&#8217;t dependent on the JBoss/WildFly version. As described in the previous blog, the setup of the CPS in HTTPS isn&#8217;t described in the official EMC/OTX Documentation (yet). Because of that, I worked with EMC on defining the minimal steps that are required to get one up&amp;running.</p>
<p>&nbsp;</p>
<p>So in this blog and just to compare with the previous blog, I will start with setting up a JBoss 7.1.1 in SSL (without the Java cacerts stuff) without using the ConfigSSL.groovy since it&#8217;s not able to handle the CPS setup. So as before, I&#8217;m starting with defining some environment variables (I&#8217;m using the same CPS name) and then stopping the CPS:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[xplore@full_text_server_01 ~]$ cd /tmp/certs/
[xplore@full_text_server_01 certs]$ read -s -p "  ----&gt; Please enter the JKS password: " jks_pw
[xplore@full_text_server_01 certs]$ 
[xplore@full_text_server_01 certs]$ export server_name="Node2_CPS1"
[xplore@full_text_server_01 certs]$ $JBOSS_HOME/server/stop${server_name}.sh
[xplore@full_text_server_01 certs]$ 
[xplore@full_text_server_01 certs]$ mv /tmp/certs/full_text_server_01.jks $JBOSS_HOME/server/DctmServer_${server_name}/configuration/my.keystore
[xplore@full_text_server_01 certs]$ chmod 600 $JBOSS_HOME/server/DctmServer_${server_name}/configuration/my.keystore</pre>
<p>&nbsp;</p>
<p>In this case with JBoss 7.1.1, the $JBOSS_HOME used above is &#8220;$XPLORE_HOME/jboss7.1.1&#8221;. So now the commands to configure a JBoss 7.1.1 in HTTPS are the following ones:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[xplore@full_text_server_01 certs]$ cd $JBOSS_HOME/server/DctmServer_${server_name}/configuration/
[xplore@full_text_server_01 configuration]$ cp standalone.xml standalone.xml_bck_$(date +%Y%m%d)
[xplore@full_text_server_01 configuration]$ 
[xplore@full_text_server_01 configuration]$ sed -i 's/inet-address value="${jboss.bind.address.management:[^}]*}/inet-address value="${jboss.bind.address.management:127.0.0.1}/' standalone.xml
[xplore@full_text_server_01 configuration]$ sed -i '/&lt;subsystem .*/a             &lt;connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true"&gt;n                &lt;ssl name="https" password="'${jks_pw}'" certificate-key-file="'$JBOSS_HOME'/server/DctmServer_'${server_name}'/configuration/my.keystore" cipher-suite="PUT_HERE_SSL_CIPHERS"/&gt;n            &lt;/connector&gt;' standalone.xml</pre>
<p>&nbsp;</p>
<p>And that&#8217;s all. As you can see, it&#8217;s even easier to setup a JBoss 7.1.1 in SSL that it was with a WildFly 9.0.1. This is a small description of these commands:</p>
<ul>
<li>Line 2: Backup of the standalone.xml file</li>
<li>Line 4: Changing the default IP on which WildFly is listening for the Management Interface (by default 0.0.0.0 which means no restriction) to 127.0.0.1 so it&#8217;s only accessible locally</li>
<li>Line 5: Adding a new connector specific to https and which defines the keystore path, password as well as the SSL Ciphers to be used. Just replace &#8220;PUT_HERE_SSL_CIPHERS&#8221; with a comma separated list of SSL Ciphers that you want to enable</li>
</ul>
<p>&nbsp;</p>
<p>With the above commands, both HTTP and HTTPS will be enabled. If you want to disable all HTTP communications (which I recommend), then you can just remove the http connector:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[xplore@full_text_server_01 configuration]$ sed -i '/&lt;connector .*name="http" .*socket-binding="http"/d' standalone.xml</pre>
<p>&nbsp;</p>
<p>Alright so now JBoss 7.1.1 is setup &amp; enabled in HTTPS only as we did for the WildFly setup. At this point, if you start the CPS again and then access the URL in HTTPS, it will work. Then what is the purpose of this blog? Well the URL will work but the issue I faced is that this CPS is actually unusable.</p>
<p>&nbsp;</p>
<p>When you install a remote CPS, you then need to register it to the PrimaryDsearch so it can be used. If you do not register it, then it just won&#8217;t do much so it&#8217;s kind of useless. Usually when you install a remote CPS, you will want to register it in HTTP directly in the PrimaryDsearch. This is done in the following way (I&#8217;m considering a PrimaryDsearch on the same host with port 9302 in HTTPS):</p>
<ol>
<li>Open the dsearchadmin (E.g.: https://full_text_server_01:9302/dsearchadmin) and login with the JBoss admin account</li>
<li>Navigate to &#8220;Home &gt; Services &gt; Content Processing Service&#8221;</li>
<li>Click on the &#8220;Add&#8221; button</li>
<li>Select the &#8220;remote&#8221; checkbox</li>
<li>Set the URL to: http://full_text_server_01:9400/cps/ContentProcessingService?wsdl</li>
<li>Set the Instance &amp; Usage according to your needs</li>
<li>Click on the &#8220;OK&#8221; button</li>
</ol>
<p>&nbsp;</p>
<p>If you are using a CPS in HTTP as in the URL mentioned (step 5 &#8211; the port might change depending on what you configured), then you will see a pop-up showing that the PrimaryDsearch was able to connect to the CPS and the CPS is now registered. As a side note, for the CPS to be fully usable, you will need to restart the PrimaryDsearch so the status can be changed to green (INITIALIZED).</p>
<p>&nbsp;</p>
<p>So what&#8217;s the difference when using a CPS in HTTPS-only? Well when you are at the step 5, you will need to use the HTTPS URL of the CPS which is therefore: https://full_text_server_01:9402/cps/ContentProcessingService?wsdl. When you click on the &#8220;OK&#8221; button at the last step (7), you will not get a pop-up saying that the PrimaryDsearch was able to connect to the CPS but instead you will see a failure message. The exact error message from the pop-up is:</p>
<pre class="brush: bash; gutter: true; first-line: 1">Fail to connect the remote CPS at https://full_text_server_01:9402/cps/ContentProcessingService?wsdl</pre>
<p>&nbsp;</p>
<p>On this failure pop-up, there is only a OK button and when you click on it, you can see that the CPS hasn&#8217;t been registered at all. On the CPS logs, there are absolutely no information related to this issue and on the Dsearch logs, it&#8217;s not really much better: the only message that is printed is an INFO message with the following information:</p>
<pre class="brush: bash; gutter: true; first-line: 1">2017-05-01 10:59:02,951 UTC INFO [RMI TCP Connection(5)-147.167.175.209] c.e.d.core.fulltext.indexserver.cps.CPSSubmitter - Begin to connect to CPS at (https://full_text_server_01:9402/cps/ContentProcessingService?wsdl)  with connection 16</pre>
<p>&nbsp;</p>
<p>That&#8217;s all, no errors, nothing. Of course you can enable some debug. For example you can add the &#8220;-Djavax.net.debug=ssl&#8221; inside the JAVA_OPTIONS of the PrimaryDsearch and the remote CPS, restart them both and then try again. You should be able (if you followed this blog properly) to see that the Dsearch and the CPS are exchanging properly the Hello requests but then the CPS is still not registered.</p>
<p>&nbsp;</p>
<p>To solve this issue, there is actually just one small thing that need to be done and that&#8217;s updating the web.xml file for the CPS. You just need to add a security-constraint tag inside this file to specify that all pages are now using HTTPS:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[xplore@full_text_server_01 configuration]$ sed -i '/&lt;/web-app&gt;/i \n    &lt;security-constraint&gt;n        &lt;web-resource-collection&gt;n            &lt;web-resource-name&gt;secured pages&lt;/web-resource-name&gt;n            &lt;url-pattern&gt;/*&lt;/url-pattern&gt;n        &lt;/web-resource-collection&gt;n        &lt;user-data-constraint&gt;n            &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;n        &lt;/user-data-constraint&gt;n    &lt;/security-constraint&gt;' ../deployments/cps.war/WEB-INF/web.xml</pre>
<p>&nbsp;</p>
<p>When this has been added, the web.xml file for the CPS should look like that:</p>
<pre class="brush: xml; gutter: true; first-line: 1; highlight: [34,35,36,37,38,39,40,41,42]">[xplore@full_text_server_01 configuration]$ cat ../deployments/cps.war/WEB-INF/web.xml
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app version="2.4"  xmlns_xsi="http://www.w3.org/2001/XMLSchema-instance" xsi_schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
        &lt;listener&gt;
        &lt;listener-class&gt;com.emc.cma.cps.management.CPSContextListener&lt;/listener-class&gt;
    &lt;/listener&gt;
        &lt;listener&gt;
        &lt;listener-class&gt;com.sun.xml.ws.transport.http.servlet.WSServletContextListener&lt;/listener-class&gt;
    &lt;/listener&gt;
    &lt;servlet&gt;
        &lt;servlet-name&gt;AgentService&lt;/servlet-name&gt;
        &lt;servlet-class&gt;com.sun.xml.ws.transport.http.servlet.WSServlet&lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet&gt;
        &lt;servlet-name&gt;ContextRegistryService&lt;/servlet-name&gt;
        &lt;servlet-class&gt;com.sun.xml.ws.transport.http.servlet.WSServlet&lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet&gt;
        &lt;servlet-name&gt;ContentProcessingService&lt;/servlet-name&gt;
        &lt;servlet-class&gt;com.sun.xml.ws.transport.http.servlet.WSServlet&lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;ContentProcessingService&lt;/servlet-name&gt;
        &lt;url-pattern&gt;/ContentProcessingService&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;ContextRegistryService&lt;/servlet-name&gt;
        &lt;url-pattern&gt;/runtime/ContextRegistryService&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;

    &lt;security-constraint&gt;
        &lt;web-resource-collection&gt;
            &lt;web-resource-name&gt;secured pages&lt;/web-resource-name&gt;
            &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
        &lt;/web-resource-collection&gt;
        &lt;user-data-constraint&gt;
            &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;
        &lt;/user-data-constraint&gt;
    &lt;/security-constraint&gt;
&lt;/web-app&gt;
[xplore@full_text_server_01 configuration]$</pre>
<p>&nbsp;</p>
<p>Then simply start/restart the remote CPS and this time, when you register it inside the PrimaryDsearch, you will get the success message!</p>
<p>&nbsp;</p>
<p>L’article <a href="https://www.dbi-services.com/blog/documentum-setup-a-cps-in-https-unable-to-register-it/">Documentum &#8211; Setup a CPS in HTTPS &#8211; Unable to register it</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/documentum-setup-a-cps-in-https-unable-to-register-it/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Configuring the JBoss server to use SSL for Documentum DFS</title>
		<link>https://www.dbi-services.com/blog/configuring-the-jboss-server-to-use-ssl-for-documentum-dfs/</link>
					<comments>https://www.dbi-services.com/blog/configuring-the-jboss-server-to-use-ssl-for-documentum-dfs/#respond</comments>
		
		<dc:creator><![CDATA[Gérard Wisson]]></dc:creator>
		<pubDate>Mon, 10 Jun 2013 00:51:00 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[DFS]]></category>
		<category><![CDATA[Documentum]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[Middleware]]></category>
		<category><![CDATA[SSL]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/configuring-the-jboss-server-to-use-ssl-for-documentum-dfs/</guid>

					<description><![CDATA[<p>To be compliant with the customer&#8217;s security rule, I had to configure SSL for a JBoss application server that holds the Documentum Foundation Services (DFS). I used the following procedure: 1. Generate a keystore Change it to a temporary location, e. g. /var/tmp/SSL: keytool -genkey -dname "cn=dms.test.org, ou=DEV, o=NICE, l=Delemont, s=Switzerland, c=CH" -keyalg "rsa" -validity 730 [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/configuring-the-jboss-server-to-use-ssl-for-documentum-dfs/">Configuring the JBoss server to use SSL for Documentum DFS</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="blog-image aligncenter" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/2e1ax_default_entry_JBoss_by_Red_Hat.jpg" alt="" /></p>
<p>To be compliant with the customer&#8217;s security rule, I had to configure SSL for a JBoss application server that holds the Documentum Foundation Services (DFS). I used the following procedure:</p>
<h3>1. Generate a keystore</h3>
<p>Change it to a temporary location, e. g. /var/tmp/SSL:</p>
<pre class="brush: actionscript3; gutter: true; first-line: 1">keytool -genkey -dname "cn=dms.test.org, ou=DEV, o=NICE, l=Delemont, s=Switzerland, c=CH" -keyalg "rsa" -validity 730 -alias tomcat -keysize 2048 -keystore dfs.keystore
Enter keystore password:  xxxx
Enter key password for 
        (RETURN if same as keystore password): xxxx</pre>
<p>Important:</p>
<ul>
<li>always use tomcat for the alias</li>
<li>enter a validity value, otherwise it will be 90 days</li>
</ul>
<p>Warning: Due the Bugzilla issue 38217, both keystore and key passwords have to be the same!</p>
<h3>2. Create a Certificate request</h3>
<pre class="brush: actionscript3; gutter: true; first-line: 1">keytool -certreq -alias tomcat -file jbossDfs.csr -keystore dfs.keystore
Enter keystore password:  xxxx
Enter key password for xxxx</pre>
<p>&nbsp;</p>
<h3>3. Send the jbossDfs.csr file to the service that will signe the certificate</h3>
<p>In our case, the customer has its own CA system and will return the signed certificate plus the trusted chain composed of root.cer and user.cer.</p>
<h3>4. Import the certificates</h3>
<p>Once all needed certificates are delivered, they can be imported into the keystore. Before importing the signed certificate, import the chain one.</p>
<h4>4.1 Import the root certificate</h4>
<pre class="brush: actionscript3; gutter: true; first-line: 1">keytool -import -alias cert1 -file root.cer -keystore dfs.keystore
Enter keystore password:  xxxx
Owner: CN=....
Issuer: CN=....
Serial number: .....
Valid from: Mon Feb 04 09:23:02 CET 2013 until: Wed Feb 04 09:33:01 CET 2037
Certificate fingerprints:
         MD5:  94:40:.....
         SHA1: D0:10:....Trust this certificate? [no]:  yes
Certificate was added to keystore</pre>
<p>&nbsp;</p>
<h4>4.2 Import the user certificate</h4>
<pre class="brush: actionscript3; gutter: true; first-line: 1">keytool -import -alias cert2 -file user.cer -keystore dfs.keystore
Enter keystore password:  xxxx
Certificate was added to keystore</pre>
<p>&nbsp;</p>
<h4>4.3. Import the signed certificate</h4>
<pre class="brush: actionscript3; gutter: true; first-line: 1">keytool -import -trustcacerts -alias tomcat -file jbossDfs.cer -keystore dfs.keystore
Enter keystore password:  xxxx
Enter key password for xxxx
Certificate reply was installed in keystore</pre>
<p>&nbsp;</p>
<h3>5. Update server.xml to activate SSL</h3>
<pre class="brush: actionscript3; gutter: true; first-line: 1">cd $DOCUMENTUM_SHARED/jboss4.2.0/server/DctmServer_MethodServer/deploy/jboss-web.deployer/</pre>
<p>With vi update server.xml:</p>
<ul>
<li>uncomment the SSL definition</li>
<li>set SSLEnabled from false to true</li>
<li>Change the default password &#8220;changeit&#8221; to the one you used to secure the keystore password:</li>
</ul>
<pre class="brush: actionscript3; gutter: true; first-line: 1">maxThreads="150" scheme="https" secure="true"
keystoreFile="${jboss.server.home.dir}/conf/dfs.keystore" keystorePass="xxxx"
clientAuth="false" sslProtocol="TLS" /&gt;</pre>
<p>&nbsp;</p>
<h3>6. Change the server.xml permission</h3>
<p>If groups and users can read the file, change the file permission to allow only the owner to read/write:</p>
<pre class="brush: actionscript3; gutter: true; first-line: 1">chmod 600 server.xml</pre>
<p>&nbsp;</p>
<h3>7. Copy the keystore to the correct location</h3>
<pre class="brush: actionscript3; gutter: true; first-line: 1">cp
/var/tmp/SSL/dfs.keystore
$DOCUMENTUM_SHARED/jboss4.2.0/server/DctmServer_MethodServer/conf/</pre>
<p>&nbsp;</p>
<h3>8. Restart the JBoss server</h3>
<p>You can check the server.log to see if everything is starting fine.</p>
<h3>9. Test it</h3>
<p>Perform a test using using the URL <a href="http://https//dms.test.org:9082/services/core/ObjectService">https//dms.test.org:9082/services/core/ObjectService</a>.<br />
The JBoss server now should be ready to manage https requests!<br />
Please note that the client part is not covered in this post.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/configuring-the-jboss-server-to-use-ssl-for-documentum-dfs/">Configuring the JBoss server to use SSL for Documentum DFS</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/configuring-the-jboss-server-to-use-ssl-for-documentum-dfs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: www.dbi-services.com @ 2026-04-30 23:04:18 by W3 Total Cache
-->