{"id":423,"date":"2010-10-02T22:56:14","date_gmt":"2010-10-02T17:56:14","guid":{"rendered":"http:\/\/linuxndme.com\/?p=88"},"modified":"2010-10-02T22:56:14","modified_gmt":"2010-10-02T17:56:14","slug":"jboss-multiple-instance-on-different-ports","status":"publish","type":"post","link":"https:\/\/blog.nixwind.com\/?p=423","title":{"rendered":"Multiple Jboss instance with different ports"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p>Deploying multiple instance of Jboss on a single Jboss server.<\/p>\n<p><strong>Requirements<\/strong><\/p>\n<p>Jboss Installation used\u00a0 :: 4.2.2.GA<\/p>\n<p><strong>Objective<\/strong><\/p>\n<p>Run two Jboss instance on same server, on ports 80 and 8080<\/p>\n<p><strong>Configuration<\/strong><\/p>\n<p><strong>Step1<\/strong><\/p>\n<p>On the Jboss installation server directory , make a copy of <strong><em>default<\/em><\/strong> directory<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> cd \/usr\/local\/jboss\/server<\/strong><br \/>\n<strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> cp -rpf default node01<\/strong><\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>Jboss has 3 set of preconfigured ports for running 3 different instance together. The <strong><em>default <\/em><\/strong>installation will be using the\u00a0 <strong><em>ports-default<\/em><\/strong> set, we can use <strong><em>ports-01<\/em><\/strong> for our <strong><em>node01<\/em><\/strong>.<\/p>\n<p>To use ports-01 uncomment below lines in file \/usr\/local\/jboss\/server\/node01\/conf\/jboss-service.xml<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~#<\/span> vim  \/usr\/local\/jboss\/server\/node01\/conf\/jboss-service.xml <\/strong><\/p>\n<p><em>&lt;mbean code=&#8221;org.jboss.services.binding.ServiceBindingManager&#8221;<br \/>\nname=&#8221;jboss.system:service=ServiceBindingManager&#8221;&gt;<br \/>\n&lt;attribute name=&#8221;ServerName&#8221;&gt;ports-01&lt;\/attribute&gt;<br \/>\n&lt;attribute name=&#8221;StoreURL&#8221;&gt;${jboss.home.url}\/docs\/examples\/binding-manager\/sample-bindings.xml&lt;\/attribute&gt;<br \/>\n&lt;attribute name=&#8221;StoreFactoryClassName&#8221;&gt;<br \/>\norg.jboss.services.binding.XMLServicesStoreFactory<br \/>\n&lt;\/attribute&gt;<br \/>\n&lt;\/mbean&gt;<\/em><\/p>\n<p>Also change serverBindPort from 4446 to 14446 in the same file<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~#<\/span> sed -i\u00a0 &#8220;s\/4446\/14446\/g&#8221; &#8212; \/usr\/local\/jboss\/server\/node01\/conf\/jboss-service.xml<\/strong><\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Change the port from 3873 to 13873\u00a0 in deploy jboss-service.xml<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span>sed -i &#8220;s\/3873\/13873\/&#8221; &#8212; \/usr\/local\/jboss\/server\/node01\/deploy\/ejb3.deployer\/META-INF\/jboss-service.xml<\/strong><\/p>\n<p><strong>Step4 <\/strong><\/p>\n<p>Change the default listening port form the default value ( I had 80 as default ) to a custom value<\/p>\n<p>changing 80 to 8080<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span>sed -i &#8220;s\/80\/8080\/g&#8221; &#8212; \/usr\/local\/jboss\/server\/node01\/deploy\/jboss-web.deployer\/server.xml<\/strong><\/p>\n<p>also change Connector port\u00a0 from 8019 to 8119<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span>sed -i &#8220;s\/8019\/8119g&#8221; &#8212; \/usr\/local\/jboss\/server\/node01\/deploy\/jboss-web.deployer\/server.xml<\/strong><\/p>\n<p><strong>Step5<\/strong><\/p>\n<p>Now, you can run the default instance with<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> \/usr\/local\/jboss\/bin\/run.sh <\/strong><\/p>\n<p>and the new instance on port 8080 with<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> \/usr\/local\/jboss\/bin\/run.sh -c node01 <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Deploying multiple instance of Jboss on a single Jboss server. Requirements Jboss Installation used\u00a0 :: 4.2.2.GA Objective Run two Jboss instance on same server, on ports 80 and 8080 Configuration Step1 On the Jboss installation server directory , make a copy of default directory root@serv:~# cd \/usr\/local\/jboss\/server root@serv:~# cp -rpf default node01 Step 2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[52],"tags":[53],"_links":{"self":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts\/423"}],"collection":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=423"}],"version-history":[{"count":0,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts\/423\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}