tag:blogger.com,1999:blog-66547280239484709782024-03-13T22:12:29.633+01:00Java - JBoss by Red Hat - Weblogic - Open SourceRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.comBlogger53125tag:blogger.com,1999:blog-6654728023948470978.post-26907321523022283052011-03-01T18:08:00.001+01:002011-03-01T18:09:30.453+01:00JBoss and JMS<style type="text/css">
</style><br />
<style type="text/css">
dp { margin-bottom: 0.08in; }tt.cjk { font-family: "WenQuanYi Micro Hei",monospace; }tt.ctl { font-family: "Lohit Devanagari",monospace; }a:link { }
</style> <br />
<div style="margin-bottom: 0in; page-break-before: always;"></div><div style="margin-bottom: 0in; page-break-before: always;">Over the years the JMS providers have changed within JBoss, here an overview:</div><div style="margin-bottom: 0in;"></div><table border="1" cellpadding="4" cellspacing="0" style="page-break-after: auto; page-break-before: auto; page-break-inside: auto;"><col width="57*"></col> <col width="49*"></col> <col width="62*"></col> <col width="87*"></col> <thead>
<tr> <td width="22%"><div align="CENTER"><br />
</div></td> <td bgcolor="#e6e6ff" colspan="3" width="78%"><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JBoss JMS Messaging</b></span></span></span></div></td> </tr>
</thead> <tbody>
<tr> <td bgcolor="#e6e6ff" width="22%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Community project</span></span></span></div><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">(newest on top)</span></span></span></div></td> <td bgcolor="#e6e6ff" width="19%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>Latest</b></span></span></span></div><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>version</b></span></span></span></div></td> <td bgcolor="#e6e6ff" width="24%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>Enterprise</b></span></span></span></div><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JBoss versions</b></span></span></span></div></td> <td bgcolor="#e6e6ff" width="34%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>Latest supported </b></span></span></span> </div><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>enterprise version</b></span></span></span></div></td> </tr>
<tr> <td bgcolor="#e6e6ff" width="22%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JBoss HornetQ</b></span></span></span></div><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;"><b>(standalone)</b></span></span></span></div></td> <td width="19%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: navy;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><span lang="zxx"><u><span style="font-weight: normal;">HornetQ<a href="http://www.jboss.org/hornetq/downloads" linkindex="25">2.1.2</a></span></u></span></span></span></span></div><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">(2010-08-17)</span></span></span></div></td> <td width="24%"><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">EAP 5.2+</span></span></span></div></td> <td width="34%"><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">EAP 5.2 (n/a yet)</span></span></span></div></td> </tr>
<tr> <td bgcolor="#e6e6ff" width="22%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JBoss Messaging</b></span></span></span></div><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;"><b>(standalone)</b></span></span></span></div></td> <td width="19%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: navy;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><span lang="zxx"><u><span style="font-weight: normal;">JBM1.4.5</span></u></span></span></span></span></div><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">(2009-09-30)</span></span></span></div></td> <td width="24%"><div align="CENTER" style="font-weight: normal; margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">EAP4.3 -</span></span></span></div><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">EAP5.1</span></span></span></div></td> <td width="34%"><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">EAP 5.1 (1.4.6.GA-SP1)</span></span></span></div></td> </tr>
<tr> <td bgcolor="#e6e6ff" width="22%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JbossMQ</b></span></span></span></div><div align="CENTER"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;"><b>(only with JBossAS)</b></span></span></span></div></td> <td width="19%"><div align="CENTER" style="margin-bottom: 0in;"><span style="color: navy;"><span style="font-size: x-small;"><span lang="zxx"><u>JBoss<a href="http://www.jboss.org/jbossas/downloads" linkindex="26">4.2</a></u></span></span></span><a href="http://www.jboss.org/jbossas/downloads" linkindex="27"><span style="font-size: x-small;">.3</span></a></div><div align="CENTER"><span style="font-size: xx-small;">(2008-07-18)</span></div></td> <td width="24%"><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Until JbossAS4.0.5</span></span></span></div></td> <td width="34%"><div align="CENTER" style="font-weight: normal; margin-bottom: 0in;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">JbossAS4.0.5</span></span></span></div><div align="CENTER" style="font-weight: normal;"><span style="color: black;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">End of life</span></span></span></div></td> </tr>
</tbody> </table><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Note that all cited versions are compliant to the JMS specification 1.1 !</span></span></tt></span></div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">The enterprise version was renamed in 2006 from JBossAS to EAP ! </span></span></tt></span> <style type="text/css">
p { margin-bottom: 0.08in; }tt.cjk { font-family: "WenQuanYi Micro Hei",monospace; }tt.ctl { font-family: "Lohit Devanagari",monospace; }
</style> </div><div style="margin-bottom: 0in;"><br />
</div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>Clustering JMS :</b></span></span></tt></span></div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">For JBoss Messaging follow http://community.jboss.org/wiki/JBMCluster.</span></span></tt></span></div><div style="margin-bottom: 0in;"></div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JMS redelivery</b></span></span></tt></span> <style type="text/css">
p { margin-bottom: 0.08in; }tt.cjk { font-family: "WenQuanYi Micro Hei",monospace; }tt.ctl { font-family: "Lohit Devanagari",monospace; }
</style> </div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">JBoss transaction exist from JbossMQ on. But the idea of DLQ (Dead Letter Queue) only exist from JBoss Messaging on. The idea is that after a couple of unsuccessful deliveries of a message (meaning that message is non-acknoleged and client session timed out) the message will be put in a special queue (DLQ) and won't be delivered again. You can set the number of tries with the parameter DefaultMaxDeliveryAttempts which defaults to 10. You can also retry to send the message by delaying it with DefaultRedeliveryDelay (defaults to 0).</span></span></tt></span></div><div style="margin-bottom: 0in;"></div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JMS transaction</b></span></span></tt></span> <style type="text/css">
p { margin-bottom: 0.08in; }tt.cjk { font-family: "WenQuanYi Micro Hei",monospace; }tt.ctl { font-family: "Lohit Devanagari",monospace; }
</style> </div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">- local </span></span></tt></span><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">transactions</span></span></tt></span></div><div style="margin-bottom: 0in;"><span style="font-family: Liberation Sans,sans-serif;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">- distributed transactions XA</span></span></tt></span></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.javaworld.com/javaworld/jw-03-2002/images/jw-0315-jms1.gif" imageanchor="1" linkindex="28" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="219" src="http://www.javaworld.com/javaworld/jw-03-2002/images/jw-0315-jms1.gif" width="400" /> </a><a href="http://www.javaworld.com/javaworld/jw-03-2002/images/jw-0315-jms1.gif" imageanchor="1" linkindex="29" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"> </a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
http://www.javaworld.com/javaworld/jw-02-2002/jw-0315-jms.htmlRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-4275364986328006372011-03-01T11:44:00.002+01:002011-03-30T09:47:21.446+02:00Example of inline codehttp://www.commonitman.com/2010/09/how-to-use-syntax-highlighter-3-in.html<br />
<br />
<pre class="brush:java">public class ConditionCheck
{
private GUIInstallData installdata;
private ResourceManager resourceManager;
private RulesEngine rules;
public ConditionCheck(GUIInstallData installdata, ResourceManager resourceManager, RulesEngine rules)
{
this.installdata = installdata;
this.resourceManager = resourceManager;
this.rules = rules;
}
public void check() throws Exception
{
checkJavaVersion();
checkJDKAvailable();
// Check for already running instance
checkLockFile();
checkLangPackAvaible();
}
</pre>sdffdsfdsfssfsdsfRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-86960809563774375472011-02-28T10:46:00.055+01:002011-04-08T15:58:30.402+02:00JVM Performance tuningTo understand that tuning your Java Virtual Machine should not be underestimated, take a look at the various parameter that can be set starting your Java program (dates 28 Aug 2007):<br />
<a href="http://blogs.sun.com/watt/resource/jvm-options-list.html" linkindex="22">http://blogs.sun.com/watt/resource/jvm-options-list.html</a><br />
or the official Oracle list:<br />
<a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html" linkindex="23">http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html</a><br />
and the Tagtraum list: <br />
<a href="http://www.tagtraum.com/gcviewer-vmflags.html" linkindex="24">http://www.tagtraum.com/gcviewer-vmflags.html</a><br />
<br />
Also check out the article "Java Performance Tuning, Profiling, and Memory Management" on Dzone by <span class="submitted">Vikash Ranjan</span>:<br />
<a href="http://java.dzone.com/articles/java-performance-tuning" linkindex="25">http://java.dzone.com/articles/java-performance-tuning</a><br />
<br />
And the last good pointer is the article of Pete Freitag:<br />
<a href="http://www.petefreitag.com/articles/gctuning/" linkindex="26">http://www.petefreitag.com/articles/gctuning/</a><br />
<br />
I also really liked this JVM deck of Simon Ritter :<br />
<a href="http://www.javapassion.com/javase/GC_Performance.pdf">http://www.javapassion.com/javase/GC_Performance.pdf</a><br />
<br />
Ritter points out that:<br />
--> Most new objects will die young<br />
--> <b>Concentrate effort on young generation (Eden)</b><br />
--> Use the right tool for the job (Different GC algorithms for each generation)<br />
<br />
<br />
<b>Howto read gc.log </b><br />
After adding the following JVM options:<br />
<span style="font-size: xx-small;">-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/tmp/gc.log</span><span style="font-size: xx-small;"></span><br />
You will find in the generated /tmp/gc.log something like:<br />
<span style="font-size: xx-small;">[GC 34000 kb -> 21000 kb (0.018 sec] (The GC collects the young generation)<br />
[Full GC 60000 kb -> 12000 kb (0.430 sec] (The Full GC collects the old generation, costs more CPU)</span><br />
<br />
To analyse the /tmp/gc.log open it with the tool <a href="http://www.tagtraum.com/gcviewer-download.html" linkindex="27">GCViewer</a>.<br />
<br />
<b>Choose the Just-In-Time compiler</b><br />
-classic (no JIT)<br />
-client (a lot of JIT compiling)<br />
-server (optimized JIT compiling, for production environment)<br />
<span style="font-size: xx-small;"><i>this JVM option needs to be the first one in the list</i></span><br />
<br />
<b>JVM options to consider </b><br />
<style type="text/css">
td p { margin-bottom: 0in; }p { margin-bottom: 0.08in; }tt.cjk { font-family: "WenQuanYi Micro Hei",monospace; }tt.ctl { font-family: "Lohit Devanagari",monospace; }
</style> <br />
<div style="orphans: 2; widows: 2;"><span style="font-family: Liberation Sans,sans-serif;">For JVM performance tuning you will have to choose the</span></div><div style="orphans: 2; widows: 2;"><span style="font-family: Liberation Sans,sans-serif;">- <span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">Young</span> generation option</span></div><div style="orphans: 2; widows: 2;"><span style="font-family: Liberation Sans,sans-serif;">- <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Old</span> generation option</span><br />
<style type="text/css">
td p { margin-bottom: 0in; }p { margin-bottom: 0.08in; }tt.cjk { font-family: "WenQuanYi Micro Hei",monospace; }tt.ctl { font-family: "Lohit Devanagari",monospace; }
</style> <br />
<div style="margin-bottom: 0in;"> </div><table border="1" cellpadding="4" cellspacing="0" style="page-break-after: auto; page-break-before: auto; page-break-inside: auto; width: 549px;"><col width="77"></col> <col width="73"></col> <col width="145"></col> <col width="220"></col> <tbody>
<tr valign="TOP"> <td bgcolor="#e6e6ff" width="77"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>Generation</b></span></span> <br />
</td> <td bgcolor="#e6e6ff" width="73"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>Collector</b></span></span><br />
</td> <td bgcolor="#e6e6ff" width="145"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>JVM options</b></span></span><br />
</td> <td bgcolor="#e6e6ff" width="220"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><b>Description</b></span></span><br />
</td> </tr>
<tr valign="TOP"> <td bgcolor="#00ff00" width="77"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">Young</span></span></span><br />
</td> <td bgcolor="#00ff00" width="73"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Serial New</span></span><br />
</td> <td width="145"> <div style="margin-bottom: 0.2in;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">-XX:+UseSerialGC</span></span></tt></div><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">(d</span></span></tt><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">efault </span></span><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">until J2EE 1.4)</span></span></tt><br />
</td> <td width="220"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Single-threaded, stop-the-world, copying collector</span></span><br />
</td> </tr>
<tr valign="TOP"> <td bgcolor="#00ff00" width="77"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">Young</span></span></span><br />
</td> <td bgcolor="#00ff00" width="73"> <div style="margin-bottom: 0.2in;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Parallel Scavenge /</span></span></div><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Throughput</span></span></tt><br />
</td> <td width="145"> <div style="margin-bottom: 0.2in;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">-XX:+UseParallelGC</span></span></div><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">(default JEE 5+)</span></span><br />
</td> <td width="220"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Multi-threaded, stop-the-world, copying collector (<b>CAN NOT</b> to be used with CMS). Automatically used when -XX:+AggressiveHeap was specified.</span></span><br />
</td> </tr>
<tr valign="TOP"> <td bgcolor="#00ff00" width="77"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;"><span style="background: none repeat scroll 0% 0% rgb(0, 255, 0);">Young</span></span></span><br />
</td> <td bgcolor="#00ff00" width="73"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Parallel New</span></span><br />
</td> <td width="145"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">-XX:+UseParNewGC</span></span><br />
</td> <td width="220"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Multi-threaded, stop-the-world, copying collector <b>CAN</b> be used along with <span style="font-weight: normal;">CMS</span>. Automatically used when CMS was specified for Old Gen.</span></span><br />
</td> </tr>
<tr valign="TOP"> <td bgcolor="#ffff00" width="77"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Old</span></span><br />
</td> <td bgcolor="#ffff00" width="73"> <div style="margin-bottom: 0.2in;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Serial Old /</span></span></div><div style="margin-bottom: 0.2in;"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Mark Sweep</span></span></div><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Compact</span></span><br />
</td> <td width="145"> <div style="margin-bottom: 0.2in;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">-XX:+UseSerialGC</span></span></tt></div><div style="margin-bottom: 0.2in;"><br />
<br />
</div><br />
<br />
</td> <td width="220"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Single-threaded, stop-the-world, mark-sweep-compact (MSC) collector</span></span><br />
</td> </tr>
<tr valign="TOP"> <td bgcolor="#ffff00" width="77"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Old</span></span><br />
</td> <td bgcolor="#ffff00" width="73"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Parallel Old</span></span><br />
</td> <td width="145"> <div style="margin-bottom: 0.2in;"><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">-XX:+UseParallelOldGC </span></span></tt> </div><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">(JEE 6+)</span></span></tt><br />
</td> <td width="220"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Multi-threaded, stop-the-world, copying collector </span></span> <br />
</td> </tr>
<tr valign="TOP"> <td bgcolor="#ffff00" height="46" width="77"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Old</span></span><br />
</td> <td bgcolor="#ffff00" width="73"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Concurrent Mark-Sweep / </span></span><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Concurrent Low Pause</span></span></tt><br />
</td> <td width="145"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: xx-small;">-XX:+UseConcMarkSweepGC</span></span><br />
</td> <td width="220"> <span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">Concurrent low pause collector that works sharing the application threads.</span></span><br />
</td> </tr>
</tbody></table></div><tt class="western"><span style="font-family: Liberation Sans,sans-serif;"><span style="font-size: x-small;">For example :</span></span></tt><br />
<tt class="western"><span style="font-family: Courier New;"><span style="font-size: xx-small;">-server -Xms2000m -Xmx2000m -Xss512k -XX:+AggressiveHeap -XX:+UseParallelGC -verbose:gc -XX:+PrintGCTimeStamps -XX:+DisableExplicitGC -Xloggc:/tmp/jboss_GC.log</span></span></tt><br />
<br />
<b>Sets the ratio between young and old generation.</b><br />
-XX:NewRatio=3 means that the ratio between the young and old generation is 1:3; in other words, the combined size of eden and the survivor spaces will be one fourth of the heap.<b> </b><br />
<br />
<b>Use cases</b><br />
Q: Which GC to use when I have applications with a very large young generation heaps ?<br />
A: <tt>-XX:+UseParallelGC</tt><br />
<br />
<br />
<b>Monitor your JVM</b><br />
JConsole<br />
VisualVM<br />
JRockit<br />
JMAP<br />
<br />
As you probably still have questions, refer to: <br />
<br />
<a href="http://www.oracle.com/technetwork/java/hotspotfaq-138619.html" linkindex="28">http://www.oracle.com/technetwork/java/hotspotfaq-138619.html</a><span style="font-family: Courier New; font-size: x-small;"> </span>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-78783219126381844002011-02-09T12:12:00.002+01:002011-02-09T12:13:23.654+01:00Fedora yum usage within a VMWhen using a virtual machine with the network sitting behind a host that has a internet connection via a proxy, consider the following steps:<br />
<br />
vi /etc/yum.conf --><br />
add line proxy=http://myproxy:8080/ (replace myproxy with actual IP address to avoid DNS lookup problems)<br />
change line: gpgcheck=1 to gpgcheck=0<br />
<br />
<br />
vi /etc/hosts --> add line:<br />
80.239.156.215 mirrors.fedoraproject.org<br />
<br />
vi /etc/yum.repos.d/fedora.repo --> <br />
- change line: gpgcheck=1 to gpgcheck=0<br />
- uncomment line: baseurl ...<br />
- comment line: #mirrorlist ...<br />
<br />
<br />
Problems you might run into:<br />
[root]# yum update<br />
Loaded plugins: presto, refresh-packagekit<br />
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again<br />
<br />
[root]# yum update<br />
...<br />
[Errno 14] PYCURL ERROR 7 - "" fedoraRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-10357779519197253722011-02-02T17:54:00.004+01:002011-02-27T20:57:22.274+01:00Troubleshooting JON serverAfter having imported elements into your JON server, you might face the problem that some are not available.<br />
If it is a JBoss EAP server that is not available, the JMX credientials might be missing!<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGr5hWCBTn0_M-kHJ3DzBA8OJFUH1eYW5ph0uJwAwpqQOgqPkL-dPeWU7DU_W2BI94gBWs6cybZ8y7Blon7EKBkdnck3mimGDycyuR1Y5LgbzjFgA_W7RE9SYt6PoIq_bcE0DkYjVm2RyF/s1600/2011_02_011_Selection.jpeg" imageanchor="1" linkindex="20" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGr5hWCBTn0_M-kHJ3DzBA8OJFUH1eYW5ph0uJwAwpqQOgqPkL-dPeWU7DU_W2BI94gBWs6cybZ8y7Blon7EKBkdnck3mimGDycyuR1Y5LgbzjFgA_W7RE9SYt6PoIq_bcE0DkYjVm2RyF/s400/2011_02_011_Selection.jpeg" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Solution :<br />
Click on the JBoss server that is having the red 'not available' sign and click on Inventory. Scroll down and click 'Edit' to be able to change the credentials. After having saved the changes the green availability sign should come up.Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-41978911749032456562011-01-24T12:10:00.006+01:002011-02-27T21:07:10.320+01:00Howto recompile and patch JBoss from SVNSummary:<br />
Within this post you will see<br />
1. Howto download JBoss sources<br />
2. Howto compile the downloaded JBoss sources<br />
3. Howto run tests to check the integrity of the code (you might change a class to see the difference)<br />
<br />
<br />
Main post:<br />
<br />
- The first thing to do is to get a user/pw for <a href="https://community.jboss.org/login.jspa">jboss.org</a><br />
- Then you will have to install Subversion (SVN) on your machine<br />
<br />
- Download the current source code with the command line "svn export https://svn.jboss.org/repos/jbossas/trunk /app/my_jboss_dev/" (takes more than an hour)<br />
<br />
- If you want to get an older/specific JBoss.org version browse all version with Firefox:<br />
<a href="https://svn.jboss.org/repos/jbossas/branches/%20" linkindex="162">https://svn.jboss.org/repos/jbossas/branches/</a><br />
and adapt the URL in the command line, for example : <br />
<br />
<span style="font-size: xx-small;">$ svn export https://svn.jboss.org/repos/jbossas/branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-5432 /app/my_jboss_dev/</span><br />
<br />
<div style="margin-bottom: 0in;">- After having downloaded the source files make sure to use the right Java compiler (JEE 5 in my case)</div><div style="margin-bottom: 0in;">$ export JAVA_HOME=/app/java/jdk1.5.0_21/<br />
$ export PATH=$PATH:$JAVA_HOME/bin</div><br />
- Install the right ANT version (in my case 1.6 (not 1.7+). When using Fedora remove the latest ant from your machine via "sudo yum remove ant"<br />
$ export ANT_HOME=/app/middleware/apache-ant-1.6.5<br />
$ export PATH=$PATH:$ANT_HOME/bin<br />
<br />
<div style="margin-bottom: 0in;">- Set the flag to be able to run test cases</div>$ cd <JBoss>/build<br />
$ vi build.properties<br />
(change build.unsecure=true)<br />
<div style="margin-bottom: 0in;"><br />
- Build the server</div>$ cd <JBoss>/build<br />
<div style="margin-bottom: 0in;">$ ./build.sh</div><div style="margin-bottom: 0in;">(output can be found in <JBoss>/build/output) <br />
</div><div style="margin-bottom: 0in;">- Start the server</div>$ cd <JBoss>/build/output/jboss-4.3.0.GA_CP08/bin<br />
$ ./run.sh -c production<br />
<div style="margin-bottom: 0in;"><br />
- Build all the testcase ( choose the right ANT version, here 1.6)</div>$ cd <JBoss>/testsuite<br />
(output can be found in <JBoss>/testsuite/output) <br />
<div style="margin-bottom: 0in;">$ export ANT_HOME=/app/middleware/<wbr></wbr>apache-ant-1.6.5/</div>$ export PATH=$PATH:$ANT_HOME/bin<br />
<div style="margin-bottom: 0in;">$ ./build.sh</div><div style="margin-bottom: 0in;"><br />
</div><div style="margin-bottom: 0in;">- Run the testcases one by one</div><div style="margin-bottom: 0in;"><span style="font-size: xx-small;">$ ./build.sh one-test -Dtest=org.jboss.test.cmp2.optimisticlock.test.</span><wbr></wbr><span style="font-size: xx-small;">OptimisticLockUnitTestCase </span><br />
<span style="font-size: xx-small;">result: [junit] Running org.jboss.test.cmp2.</span><wbr></wbr><span style="font-size: xx-small;">optimisticlock.test.</span><wbr></wbr><span style="font-size: xx-small;">OptimisticLockUnitTestCase <br />
[junit] Tests run: 18, Failures: 0, Errors: 0, Time elapsed: 5.276 sec </span><br />
<span style="font-size: xx-small;">$ ./build.sh one-test -Dtest=org.jboss.test.tm.test.</span><wbr></wbr><span style="font-size: xx-small;">TransactionManagerUnitTestCase </span><br />
<span style="font-size: xx-small;">result: [junit] Running org.jboss.test.tm.test.</span><wbr></wbr><span style="font-size: xx-small;">TransactionManagerUnitTestCase <br />
[junit] Tests run: 28, Failures: 0, Errors: 0, Time elapsed: 0.823 sec </span></div>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-82971748978778434472011-01-10T18:19:00.005+01:002011-01-21T11:50:30.191+01:00Howto install JBoss Tools to EclipseIf you want to use the ESB / BPEL, etc. features of Red Hat JBoss within your Eclipse, just add the following URL to your Eclipse software repositories:<br />
http://download.jboss.org/jbosstools/updates/JBossTools-<span style="color: red;">x.x.x</span>.GA <br />
(check on http://download.jboss.org/jbosstools/updates to find latest stable version)<br />
Help --> Install new software ... Add after "Work with:" the URL above and hit Enter...<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjah8ZWJllagyLRbtQE-6_4FivYl4_wyUs88l3SB6dO4SjhjebjORKfsbQuP_DtbM5XisGTyigpDNp5oZ58b7evmXRHFDedww1h-jklS43pntob7kACP2AnURjRIO8oaa9wbdoK1dsw-oX2/s1600/2011_01_018_Selection.jpeg" imageanchor="1" linkindex="12" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="347" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjah8ZWJllagyLRbtQE-6_4FivYl4_wyUs88l3SB6dO4SjhjebjORKfsbQuP_DtbM5XisGTyigpDNp5oZ58b7evmXRHFDedww1h-jklS43pntob7kACP2AnURjRIO8oaa9wbdoK1dsw-oX2/s400/2011_01_018_Selection.jpeg" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Than you can choose the JBoss developpment tools you want to install.<br />
<br />
To get the nightly build versions of JBoss Tools do the following :<br />
Goto http://download.jboss.org/jbosstools/builds/nightly/trunk/latestBuild.html<br />
--> all --> repo --> copy the URL from your browser --><br />
http://download.jboss.org/jbosstools/builds/nightly/trunk/20xx-xx-xx_xx-xx-xx-xxxxx/all/repo/<br />
Paste it into "Work with:" and you can start installing...Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-25051583879734425842011-01-03T12:24:00.003+01:002011-02-26T16:32:59.290+01:00Howto add JVM options to JBossThere are two useful files to add JVM options to JBoss.<br />
<br />
1. <JBOSS>/bin/<span style="background-color: yellow;">run.sh</span> (when you need to reference the JBoss path)<br />
<span style="font-size: xx-small;">Add this after line 12 <i>GREP="grep"</i> in the run.sh file for JBoss 4.3</span> <br />
<span style="font-size: xx-small;">JAVA_OPTS="-javaagent:$DIRNAME/../server/all/deploy/jboss-aop-jboss5.deployer/pluggable-instrumentor.jar"</span><br />
<span style="font-size: xx-small;">or this for JBoss 5</span><br />
<span style="font-size: xx-small;">JAVA_OPTS="-javaagent:$DIRNAME/../server/all/deployers/jboss-aop-jboss5.deployer/pluggable-instrumentor.jar"</span><br />
In this example I needed to specify the complete path of the JBoss instance using the $DIRNAME variable which points to the directory of the run.sh file. You see in 2. that via the run.conf file you will not be able to do this. <br />
<br />
2. <JBOSS>/bin/<span style="background-color: yellow;">run.conf</span> (when no path is needed)<br />
<span style="font-size: xx-small;"># Add this at the end of the file: Enables the jconsole agent locally<br />
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"</span>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-76482931724086124102010-12-01T14:56:00.001+01:002010-12-09T15:25:15.234+01:00Byteman JBoss scriptingSummary:<br />
When your HA system crashes with JEE application running on JBoss you might want to try <a href="http://www.jboss.org/byteman" linkindex="285">JBoss Byteman</a>, an bytecode injection tool that lets you add logging without touching the application itself.<br />
<br />
Main post:<br />
<br />
The steps to debug an application using<br />
1. Download byteman-1.0.3.CP02 (for JDK5) or byteman-1.3 (for JDK6)<br />
2. Extract the zip into $BYTEMAN_HOME<br />
3. Modify your JBoss startup configuration by adding the following 3 lines at the end of $JBOSS_HOME/jboss-as/bin/run.conf:<br />
<span style="font-family: Times New Roman,Times,serif;"># Adding extra logging to standard output (BYTEMAN_HOME needs to be addapted)<br />
BYTEMAN_HOME="<span style="color: red;">/tmp/byteman-1.x.x</span>"<br />
JAVA_OPTS="$JAVA_OPTS -javaagent:$BYTEMAN_HOME/lib/byteman.jar=script:$BYTEMAN_HOME/script.txt"</span><br />
4. For JDK5 add the file $BYTEMAN_HOME/script.txt :<br />
<span style="font-size: xx-small;">RULE trace RepositoryClassLoader.loadClassImpl entry<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT ENTRY<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") ENTRY in " + Thread.currentThread())<br />
ENDRULE<br />
<br />
RULE trace RepositoryClassLoader.loadClassImpl exit<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT EXIT<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") EXIT in " + Thread.currentThread())<br />
ENDRULE<br />
<br />
RULE trace RepositoryClassLoader.loadClassImpl CALL wait<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT INVOKE Object.wait()<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") CALL wait in " + Thread.currentThread())<br />
ENDRULE<br />
<br />
RULE trace RepositoryClassLoader.loadClassImpl CALL notifyAll<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT INVOKE Object.notifyAll()<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") CALL wait in " + Thread.currentThread())<br />
ENDRULE</span><br />
<br />
5. For JDK6 add the file $BYTEMAN_HOME/script.txt :<br />
<span style="font-size: xx-small;">RULE trace RepositoryClassLoader.loadClassImpl entry<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT ENTRY<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") ENTRY in " + Thread.currentThread())<br />
ENDRULE<br />
<br />
RULE trace RepositoryClassLoader.loadClassImpl exit<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT EXIT<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") EXIT in " + Thread.currentThread())<br />
ENDRULE<br />
<br />
RULE trace RepositoryClassLoader.loadClassImpl CALL wait<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT CALL wait ALL<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") CALL wait in " + Thread.currentThread())<br />
ENDRULE<br />
<br />
RULE trace RepositoryClassLoader.loadClassImpl CALL notifyAll<br />
CLASS RepositoryClassLoader<br />
METHOD loadClassImpl<br />
AT CALL notifyAll ALL<br />
IF TRUE<br />
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3<br />
+ ") CALL wait in " + Thread.currentThread())<br />
ENDRULE</span><br />
<br />
6. After having starting your JBoss you should see in the standard out a lot of logging...<br />
7. That should help you to find memory leaks, deadlocks ...Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-39231215949806511342010-11-15T15:14:00.013+01:002010-11-15T17:00:55.944+01:00Using POJOCache with AOP - TroubleshootingStaring:<br />
<br />
./run.sh -c all -Djboss.service.binding.set=ports-default -Djboss.messaging.ServerPeerID=1<br />
<br />
./run.sh -c all2 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=2<br />
<br />
<br />
./run.sh -c all -g DefaultPartition2 -b localhost -Djboss.service.binding.set=ports-02<br />
<br />
./run.sh -c all -g DefaultPartition2 -b localhost -Djboss.service.binding.set=ports-01<br />
./run.sh -c all -g DefaultPartition2 -b 127.0.0.1 "-Djboss.service.binding.set=ports-01 bind_addr=127.0.0.1"<br />
<br />
-------------------------------------------------------------------------------------<br />
<br />
You might run into an AOP error:<br />
<span class="Apple-style-span" style="font-size: xx-small;">ERROR [Instrumentor] [warn] AOP Instrumentor failed to transform org.richfaces.ui.component.HighlightImpl</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">java.lang.RuntimeException: javassist.NotFoundException: com.uwyn.jhighlight.renderer.Renderer</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.pointcut.FieldMatcher.visit(FieldMatcher.java:113)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.pointcut.ast.ASTField.jjtAccept(ASTField.java:44)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.pointcut.FieldMatcher.visit(FieldMatcher.java:157)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.pointcut.ast.ASTFieldExecution.jjtAccept(ASTFieldExecution.java:37)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:89)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:83)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.pointcut.PointcutExpression.matchesGet(PointcutExpression.java:212)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.instrument.JoinpointClassifier$1.matches(JoinpointClassifier.java:90)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.instrument.JoinpointSimpleClassifier.classifyJoinpoint(JoinpointSimpleClassifier.java:63)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.instrument.JoinpointClassifier.classifyFieldGet(JoinpointClassifier.java:227)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.instrument.FieldAccessTransformer.buildFieldWrappers(FieldAccessTransformer.java:91)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:778)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.transform(GeneratedAdvisorInstrumentor.java:117)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.SuperClassesFirstWeavingStrategy.instrumentClass(SuperClassesFirstWeavingStrategy.java:202)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.SuperClassesFirstWeavingStrategy.translate(SuperClassesFirstWeavingStrategy.java:69)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.AspectManager.translate(AspectManager.java:1077)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.AspectManager.transform(AspectManager.java:1021)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.standalone.AOPTransformer.aspectTransform(AOPTransformer.java:87)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">at org.jboss.aop.standalone.AOPTransformer.transform(AOPTransformer.java:75)</span><br />
<br />
Solution:<br />
Modfiy /jboss-eap-5.1/jboss-as/server/all/conf/bootstrap/aop.xml:<br />
You already changed the value from false to true (otherwise the error wouldn't have appeared)<br />
<property name="enableLoadtimeWeaving">true</property><br />
Now you just have to add exclusion rules (otherwise those classes will try to be aspectized, but they do not have AOP support)<br />
<property name="exclude">org.jboss.,org.richfaces.ui.,com.uwyn.jhighlight.</property><br />
<br />
See also:<br />
https://bmdsc.homeip.net/wiki/index.php/Java:JBoss<br />
<br />
-----------------------------------------------------------<br />
When setting up AOP, JGroups is enabled and will try to send out UDP messages:<br />
<br />
<span class="Apple-style-span" style="font-size: xx-small;">ERROR [UDP] failed sending message to null (76 bytes)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">java.lang.Exception: dest=/230.0.0.4:45688 (79 bytes)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.UDP._send(UDP.java:361)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.UDP.sendToAllMembers(UDP.java:302)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.TP.doSend(TP.java:1478)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.TP.send(TP.java:1468)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.TP.down(TP.java:1186)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.TP$ProtocolAdapter.down(TP.java:2308)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.PING.sendMcastDiscoveryRequest(PING.java:278)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.PING.sendGetMembersRequest(PING.java:259)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.Discovery$PingSenderTask$1.run(Discovery.java:407)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.util.TimeScheduler$RobustRunnable.run(TimeScheduler.java:196)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.lang.Thread.run(Thread.java:636)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;">Caused by: java.io.IOException: Invalid argument</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.net.PlainDatagramSocketImpl.send(Native Method)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at java.net.DatagramSocket.send(DatagramSocket.java:629)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at org.jgroups.protocols.UDP._send(UDP.java:352)</span><br />
<span class="Apple-style-span" style="font-size: xx-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>... 17 more</span><br />
<div><br />
or<br />
ERROR [MPING] failed sending discovery request</div><br />
Solution:<br />
https://jira.jboss.org/browse/JGRP-1161<br />
<span class="Apple-style-span" style="font-family: monospace; white-space: pre;">https://jira.jboss.org/jira/browse/JGRP-777</span><br />
https://jira.jboss.org/browse/JGRP-825<br />
<a href="http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4701650">http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4701650</a><br />
<br />
<br />
You will have to start multiple instances with the following option<br />
jboss-eap-5.1/jboss-as/server/all/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml<br />
<br />
<br />
./run.sh -c all -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=1<br />
./run.sh -c all -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=2<br />
<br />
See also:<br />
JGroups ports and addresses: <a href="http://community.jboss.org/wiki/SystemProps">http://community.jboss.org/wiki/SystemProps</a><br />
<br />
--------------------------------------------------------------------------------------<br />
Starting 2 jboss instances on same machine<br />
<br />
Problem:<br />
<br />
ERROR [AbstractKernelController] Error installing to Start: name=jboss:database=localDB,service=Hypersonic state=Create mode=Manual requiredState=Installed<br />
java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@79409313[file =/home/rbrackma/middleware/jboss-eap-5.1/jboss-as/server/all/data/hypersonic/localDB.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/home/rbrackma/middleware/jboss-eap-5.1/jboss-as/server/all/data/hypersonic/localDB.lck] is presumably locked by another process.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>at org.hsqldb.jdbc.Util.sqlException(Unknown Source)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)</init><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>at org.hsqldb.jdbcDriver.getConnection(Unknown Source)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>at org.hsqldb.jdbcDriver.connect(Unknown Source)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>at java.sql.DriverManager.getConnection(DriverManager.java:620)Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-73053994547067488562010-10-29T12:35:00.005+02:002011-02-27T22:25:06.693+01:00Java vs .Net Video :)<object height="385" width="640"><param name="movie" value="http://www.youtube.com/v/gLDFQ_IhnDc?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/gLDFQ_IhnDc?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-28890032430961559762010-10-21T14:32:00.002+02:002010-10-21T18:38:54.757+02:00Clustering JBoss 5 (porting Weblogic dizzyworld example)Summary:<br />
If you are coming from the Weblogic world you might have done training and seen the dizzyworld example, i.e. the example environment of at least Weblo 9,10 and 11. <br />
In this post I will try to show some<br />
<br />
Main post:<br />
<br />
<br />
Troubleshooting when starting multiple JBoss instances on one machine (one binded to localhost, the other to your_hostname)<br />
WARN [NAKACK] 55200 discarded message from non-member 55200, my view is ...Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-60611884466700578252010-10-20T11:35:00.002+02:002010-12-09T15:35:54.543+01:00Software patents a threat for innovation?Lately many IT companies have been suing competitors for using their patents. Furthermore patent trolls (companies with the business model of buying patents and suing companies -- congratulations!) have been accreting and have been attacking companies.<br />
<br />
<br />
Here some references on that:<br />
http://www.networkworld.com/community/node/66807<br />
http://fosspatents.blogspot.com<br />
http://www.slideshare.net/MissionFuture/jan-wildeboer-open-source-presentation<br />
http://en.wikipedia.org/wiki/Free_and_open_source_softwareRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-108624391005895772010-10-12T14:05:00.003+02:002011-02-26T18:06:22.460+01:00Howto write JBoss Java MBeans to expose to a JMX ClientSummary:<br />
<div>Sometime you will find yourself in the situation of wanting to monitor your application, but no monitoring capability is given. So you will have to write your own Java MBean that will expose information of your JBoss application to a JMX Client.</div><div><br />
</div><div>Main post:</div><div><a href="http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/Using_JMX_as_a_Microkernel-Writing_JBoss_MBean_Services.html">JBoss documentation</a></div><div><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossWorldOfMBeans">JBoss Wiki</a></div><div>Examples: jboss-eap-4.3_CP08/jboss-as/docs/examples/jmx/logging-monitor</div><div><div>From the JBoss SVN you can get sample MBean classes:</div><div>/svn_jboss_org/trunk/varia/src/main/java/org/jboss/jmx/examples/configuration/</div></div><div><br />
</div><div>Have your MBean interface extend the <code class="literal">org.jboss.system.Service and </code><a href="http://www.blogger.com/post-create.do" id="Using_JMX_as_a_Microkernel-Writing_JBoss_MBean_Services"><code class="literal">org.jboss.system.ServiceMBean </code></a>interface.</div><div><code class="literal"></code></div><div><code class="literal">org.jboss.system.Service and </code><a href="http://www.blogger.com/post-create.do" id="Using_JMX_as_a_Microkernel-Writing_JBoss_MBean_Services"><code class="literal">org.jboss.system.ServiceMBean</code></a><code class="literal"> can be found in:</code> </div><div>jboss-eap-4.3_CP08/jboss-as/server/all/deploy/management/console-mgr.sar/web-console.war/applet.jar</div><div><br />
</div><div><br />
<li><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Add the classes</div></li><br />
</div><div><br />
<li><a href="http://www.blogger.com/post-create.do" id="Writing_JBoss_MBean_Services-XMBean_Examples">The ability to add rich descriptions to attribute and operations</a></li><br />
<br />
<li><a href="http://www.blogger.com/post-create.do" id="Writing_JBoss_MBean_Services-XMBean_Examples">The ability to expose notification information </a></li><br />
<br />
<li><a href="http://www.blogger.com/post-create.do" id="Writing_JBoss_MBean_Services-XMBean_Examples">The ability to add persistence of attributes</a></li><br />
<br />
<li><a href="http://www.blogger.com/post-create.do" id="Writing_JBoss_MBean_Services-XMBean_Examples">The ability to add custom interceptors for security and remote access through a typed interface</a></li><br />
</div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglnomc-RW1LDZZWgRB7OhfyK4dSX0nmLvKVwWjnLQvIJmbuySgyP2a3TQqFz6TtsLDWhUDJ5WUsdLVm2R_249znvSxlCztia1MHXwluREbC8tsVHIGYjJnPdJHrVzLsgaCnB11WO9_Cu2A/s1600/C:%5Cfakepath%5C2010_10_037_Selection_mod.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglnomc-RW1LDZZWgRB7OhfyK4dSX0nmLvKVwWjnLQvIJmbuySgyP2a3TQqFz6TtsLDWhUDJ5WUsdLVm2R_249znvSxlCztia1MHXwluREbC8tsVHIGYjJnPdJHrVzLsgaCnB11WO9_Cu2A/s640/C:%5Cfakepath%5C2010_10_037_Selection_mod.jpeg" width="640" /></a></div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div>You can see two MBean that are almost the same (up to the fact that one extends the org.jboss.system.ServiceMBean class)</div><div>1. </div><div><span class="Apple-style-span" style="color: red;">Attributes</span>: JndiName</div><div><span class="Apple-style-span" style="color: red;">Operations</span>: start / stop</div><div>2. </div><div>Extents the class org.jboss.system.ServiceMBean -- you can see that this class gives you out of the </div><div><div><span class="Apple-style-span" style="color: lime;">Attributes</span>: Name / JndiName / StateString / State</div><div><span class="Apple-style-span" style="color: lime;">Operations</span>: destroy / start / stop /create / jbossInternalLifecycle</div></div><div><span class="Apple-style-span" style="color: lime;">Notificaitons</span></div><div><br />
Explanation on standard Java MBean like RuntimeMXBean, ThreadMXBean, MemoryPoolMXBean, ... can be found here: http://download.oracle.com/javase/1.5.0/docs/guide/management/overview.html<br />
<br />
Jacorb to be found in:<br />
eap43CP08/jboss-as/server/all/lib/jacorb.jar<br />
org.jacorb.util.threadpool.ThreadPool.class (here we have to get the information on the thread pool counter.<br />
In class ThreadPool within method createNewThread() the following line:<br />
localThread.setName(this.namePrefix + this.threadCount++);<br />
<div><br />
</div><br />
Jacorb example:<br />
http://www.jpackage.org/browser/rpm.php?jppversion=6.0&id=7709<br />
<br />
Set up environment:<br />
jboss-log4j.xml</div>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-38894055296330986542010-10-11T11:25:00.008+02:002010-12-09T15:34:07.881+01:00Troubleshooting JBoss Portal 4.3Problems that might occure while working with JBoss Portal:<br />
<div><br />
<div>- Admin link is not visible (between Dashboard and Logout)</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-E16xMX-8krQAdX7rWsw39KqbggS68Rj358TqZ0frGcS5uvaoN0aqnTS6a-FpFr8BPTaIrqNg_twKF0gvqoV7LcZe0BpulSc7r61b8Odr-rXpPiEqNr7zY2hvaVuUxoWfp7q5_RggMNPa/s1600/C:%5Cfakepath%5C2010_10_026_Selections.jpeg" imageanchor="1" linkindex="19" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-E16xMX-8krQAdX7rWsw39KqbggS68Rj358TqZ0frGcS5uvaoN0aqnTS6a-FpFr8BPTaIrqNg_twKF0gvqoV7LcZe0BpulSc7r61b8Odr-rXpPiEqNr7zY2hvaVuUxoWfp7q5_RggMNPa/s1600/C:%5Cfakepath%5C2010_10_026_Selections.jpeg" /></a></div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
<br />
</div><div>That occurs when the admin is <b>not in upper case</b> in the LDAP. See the example of two *.ldif files. One works, the other does not.</div><div><span style="color: red;"><b>Does not work:</b></span><br />
<span class="Apple-style-span" style="font-size: x-small;"> dn: cn=<span style="color: red;"><b>a</b></span>dmin,ou=Roles,o=rbrackma,dc=redhat,dc=com<br />
objectClass: top<br />
objectClass: groupOfNames<br />
cn: <span style="color: red;"><b>a</b></span>dmin<br />
description: Administrators<br />
member: uid=admin,ou=People,o=rbrackma,dc=redhat,dc=com</span><br />
<br />
<span style="color: #33cc00;"><b>Works:</b></span><br />
<span class="Apple-style-span" style="font-size: x-small;"> dn: cn=<span style="color: #33cc00;"><b>A</b></span>dmin,ou=Roles,o=rbrackma,dc=redhat,dc=com<br />
objectClass: top<br />
objectClass: groupOfNames<br />
cn: <span style="color: #33cc00;"><b>A</b></span>dmin<br />
description: Administrators<br />
member: uid=admin,ou=People,o=rbrackma,dc=redhat,dc=com</span></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl90XGJfVRcPp3sE4v3SUbnvMGEHWL1bPUUwvMgcyaEuD60M4IsYxFHCWgg1xI7pB3HiVDlFpwPLH1fhTpQ6oBIWW000uewrZTaGceHVRbtjlFtwP76bxkG97gvelNGumi67xFTqoBqPJt/s1600/C:%5Cfakepath%5C2010_10_027_Selections.jpeg" imageanchor="1" linkindex="20" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="79" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl90XGJfVRcPp3sE4v3SUbnvMGEHWL1bPUUwvMgcyaEuD60M4IsYxFHCWgg1xI7pB3HiVDlFpwPLH1fhTpQ6oBIWW000uewrZTaGceHVRbtjlFtwP76bxkG97gvelNGumi67xFTqoBqPJt/s200/C:%5Cfakepath%5C2010_10_027_Selections.jpeg" width="200" /></a></div><div><span class="Apple-style-span" style="font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-small;">In the EPP logs you might also find another error:<br />
</span><br />
<span class="Apple-style-span" style="font-size: x-small;"></span><br />
<span class="Apple-style-span" style="font-size: x-small;">- ERROR [LDAPUserProfileModuleImpl] No such attribute ('title') in entry: uid=admin,ou=People,o=example,dc=jboss,dc=com</span><br />
<div><span class="Apple-style-span" style="font-size: x-small;">LDAP is looking for the attribute title, but does not find it within the RHDS LDAP. Does not cause any problem within the system, but is annoying.</span></div></div>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-31948918202478089522010-10-07T14:02:00.113+02:002010-10-11T11:42:31.889+02:00Howto setup LDAP with Red Hat EPP (JBoss Portal / GateIn)<div>Description:</div>When you first start with Red Hat's Enterprise Portal Platform you will be able to connect to the portal with admin/admin or user/user. The credentials will be checked against the default users within the portals in-memory database HSQL. Mostly you would want the credentials to be checked against your companies LDAP.<br />
<div>This post will cover setting up an LDAP and configuring EPP4.3 to use it.<br />
- Install LDAP<br />
- Start LDAP services<br />
- Setup LDAP<br />
- Install EPP4.3<br />
- Setup EPP4.3 to use LDAP for credentials<br />
<div>- Connect to the portal http://localhost:8080/portal<br />
<br />
</div><div>Main post:<br />
<span class="Apple-style-span" style="font-size: x-large;"><b>Install LDAP</b></span><br />
Before starting be aware that the only <a href="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Portal_Platform/4.3/html/Reference_Guide/ch20s06.html">supported LDAP servers</a> are:<br />
Red Hat Directory Server, OpenDS and OpenLDAP.<br />
<br />
Within this post the open source LDAP server "<i><a href="http://directory.fedoraproject.org/">Red Hat Directory Server</a>" </i>will be used.</div><div><div>Installing it is pretty straight forward.<br />
First install the software :<br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">sudo yum install 389-ds</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">sudo yum install fedora-idm-console</div><br />
Then configure the RHDS with this document:</div><div>http://www.scribd.com/doc/20555511/Fedora-Directory-LDAP-Server-Setup-Configuration-on-Linux-HowTo-v1-0<br />
If the document is not available call the following command line and follow the install instructions which are pretty straight forward<br />
# setup-ds-admin.pl<br />
<br />
At the End you should remember:<br />
Directory Manager: cn=Directory Manager<br />
Password: your_password<your_password></your_password><br />
Admin port: 9830<br />
LDAP port: 389<br />
<br />
<span class="Apple-style-span" style="font-size: x-large;"><b>Start LDAP services</b></span><br />
<br />
sudo service dirsrv start<br />
sudo service dirsrv-admin start<br />
sudo service httpd start<br />
<br />
<span class="Apple-style-span" style="font-size: x-large;"><b>Setup LDAP</b></span><br />
<br />
Run the earlier installed LDAP browser fedora-idm-console (you can use any other LDAP browser)<br />
$ fedora-idm-console<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLL4y92kVxE-aaq3OQsFI0pOrNtUu3MF0YxR-U_Ay4noX0-QKKVNrrwU2FrtEx0mM9oJsVv67d0wgZXh78bWAt1B-VEk1oQ1wfQZYnqfrdJsy-k3mGtFqCrCurIsyKj_rU3rKMDu58L9UD/s1600/2010_10_028_Selection.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLL4y92kVxE-aaq3OQsFI0pOrNtUu3MF0YxR-U_Ay4noX0-QKKVNrrwU2FrtEx0mM9oJsVv67d0wgZXh78bWAt1B-VEk1oQ1wfQZYnqfrdJsy-k3mGtFqCrCurIsyKj_rU3rKMDu58L9UD/s400/2010_10_028_Selection.jpeg" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div>Choose the Directory Server (1) and choose Open (2).<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizBZ9pYDEWttZH-rUJ2uxosKCjnZlhgxb9S1GAG-YL_GO_b_SubjfyLB2_XpIhQa-bRK0RkU31iHEowdPPKIWw4ajKXUcSM3R7nO90_oWLZdt3cdzdvGm8YXXYxP0albexs0m6_Rqdla1X/s1600/2010_10_029_Selection.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizBZ9pYDEWttZH-rUJ2uxosKCjnZlhgxb9S1GAG-YL_GO_b_SubjfyLB2_XpIhQa-bRK0RkU31iHEowdPPKIWw4ajKXUcSM3R7nO90_oWLZdt3cdzdvGm8YXXYxP0albexs0m6_Rqdla1X/s400/2010_10_029_Selection.jpeg" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Then you just have to choose 'Import Databases' and import a *.ldif (save the following text into a test.ldif file). After that you should be able to browse you LDAP tree in the Directory tab...<br />
<br />
<br />
<span class="Apple-style-span" style="font-size: x-small;">dn: o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: dcObject</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: organization</span><br />
<span class="Apple-style-span" style="font-size: x-small;">o: your_host</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dc: your_host</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dn: ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: organizationalUnit</span><br />
<span class="Apple-style-span" style="font-size: x-small;">ou: People</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dn: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: inetOrgPerson</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: person</span><br />
<span class="Apple-style-span" style="font-size: x-small;">uid: admin</span><br />
<span class="Apple-style-span" style="font-size: x-small;">cn: Administrator</span><br />
<span class="Apple-style-span" style="font-size: x-small;">sn: Duke</span><br />
<span class="Apple-style-span" style="font-size: x-small;">userPassword: admin</span><br />
<span class="Apple-style-span" style="font-size: x-small;">mail: admin@your_host.your_domain.com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dn: uid=user,ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: inetOrgPerson</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: person</span><br />
<span class="Apple-style-span" style="font-size: x-small;">uid: user</span><br />
<span class="Apple-style-span" style="font-size: x-small;">cn: User</span><br />
<span class="Apple-style-span" style="font-size: x-small;">sn: Sample</span><br />
<span class="Apple-style-span" style="font-size: x-small;">userPassword: user</span><br />
<span class="Apple-style-span" style="font-size: x-small;">mail: user@your_host.your_domain.com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dn: uid=jduke,ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: inetOrgPerson</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: person</span><br />
<span class="Apple-style-span" style="font-size: x-small;">uid: jduke</span><br />
<span class="Apple-style-span" style="font-size: x-small;">cn: Java</span><br />
<span class="Apple-style-span" style="font-size: x-small;">sn: Duke</span><br />
<span class="Apple-style-span" style="font-size: x-small;">userPassword: theduke</span><br />
<span class="Apple-style-span" style="font-size: x-small;">mail: jduke@your_host.your_domain.com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dn: ou=Roles,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectclass: organizationalUnit</span><br />
<span class="Apple-style-span" style="font-size: x-small;">ou: Roles</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dn: cn=Admin,ou=Roles,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectClass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectClass: groupOfNames</span><br />
<span class="Apple-style-span" style="font-size: x-small;">cn: Admin</span><br />
<span class="Apple-style-span" style="font-size: x-small;">description: Administrators</span><br />
<span class="Apple-style-span" style="font-size: x-small;">member: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">dn: cn=User,ou=Roles,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectClass: top</span><br />
<span class="Apple-style-span" style="font-size: x-small;">objectClass: groupOfNames</span><br />
<span class="Apple-style-span" style="font-size: x-small;">cn: User</span><br />
<span class="Apple-style-span" style="font-size: x-small;">description: Users</span><br />
<span class="Apple-style-span" style="font-size: x-small;">member: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">member: uid=user,ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;">member: uid=jduke,ou=People,o=your_host,dc=your_domain,dc=com</span><br />
<span class="Apple-style-span" style="font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-size: x-large;"><b>Install EPP4.3</b></span><br />
<span class="Apple-style-span" style="font-family: Arial;">The installation of EPP4.3 is extremly simple.</span><br />
<span class="Apple-style-span" style="font-family: Arial;">First download the jboss-epp-4.3.GA_CP0X-src.zip <a href="https://access.redhat.com/jbossnetwork/restricted/listSoftware.html">here</a>. You will need a Red Hat login and a valid subscription to download, if you don't know why: I covered it in an <a href="http://jboss-as.blogspot.com/2010/07/17.html">earlier post</a>.</span><br />
<span class="Apple-style-span" style="font-family: Arial;">Then extract the zip file into the directory </span><span class="Apple-style-span" style="font-family: Arial;">jboss-epp-4.3. That's it.</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><span class="Apple-style-span" style="font-family: 'Times New Roman';"><span class="Apple-style-span" style="font-size: x-large;"><b>Setup EPP4.3 to use LDAP for credentials</b></span></span></span><br />
<span class="Apple-style-span" style="font-family: Arial;"><span class="Apple-style-span" style="font-family: 'Times New Roman';">You will have to change the following files in red to make LDAP work.</span></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTn6bP0xl1X0BS8qS6pzq_mjvEPr_wYaGyq4jiZLtAy6QCdjT52dso7srfTNRz4FmnFLjG0LSZhLezerKm-9Y_dppfC6meIgeAtXWrxfu7iMnnBvfuiTWZ2VYl-QH7ScPNGeSQTTWqGlGB/s1600/2010_10_032_Selection.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTn6bP0xl1X0BS8qS6pzq_mjvEPr_wYaGyq4jiZLtAy6QCdjT52dso7srfTNRz4FmnFLjG0LSZhLezerKm-9Y_dppfC6meIgeAtXWrxfu7iMnnBvfuiTWZ2VYl-QH7ScPNGeSQTTWqGlGB/s400/2010_10_032_Selection.jpeg" width="400" /></a></div><span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;">1. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/META-INF/</span><span class="Apple-style-span" style="font-family: Arial;">jboss-service.xml</span><br />
<span class="Apple-style-span" style="font-family: Arial;">change</span><br />
<span class="Apple-style-span" style="font-family: Arial;"></span><br />
<span class="Apple-style-span" style="font-family: Arial;"> <attribute name="ConfigFile">conf/identity/<span class="Apple-style-span" style="color: red;">identity-config.xml</span></attribute></span><br />
<div><span class="Apple-style-span" style="font-family: Arial;">to</span></div><div><div><span class="Apple-style-span" style="font-family: Arial;"> <attribute name="ConfigFile">conf/identity/<span class="Apple-style-span" style="color: lime;">ldap_identity-config.xml</span></attribute></span></div></div><div><span class="Apple-style-span" style="font-family: Arial;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: Arial;">2. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/identity/ldap_identity-config.xml</span></div><div><span class="Apple-style-span" style="font-family: Arial;">adapt the value tags that are linked to the following tags:</span></div><div><span class="Apple-style-span" style="font-family: Arial;"><name>host</name></span></div><div><span class="Apple-style-span" style="font-family: Arial;"><name>port</name></span></div><div><span class="Apple-style-span" style="font-family: Arial;"><name>adminPassword</name></span></div><div><span class="Apple-style-span" style="font-family: Arial;"><name>userCtxDN</name></span></div><div><span class="Apple-style-span" style="font-family: Arial;"><name>roleCtxDN</name></span></div><div><span class="Apple-style-span" style="font-family: Arial;">(the be sure to choose the right value for </span><span class="Apple-style-span" style="font-family: Arial;">userCtxDN and role</span><span class="Apple-style-span" style="font-family: Arial;">CtxDN</span><span class="Apple-style-span" style="font-family: Arial;"> connect to your LDAP browser and check the values)</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;">3. </span><span class="Apple-style-span" style="font-family: Arial;">Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/identity/standardidentity-config.xml</span><br />
<br />
<div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span" style="font-family: Arial;">adapt the value tags that are linked to the 5 tags seen in the section above.</span></div></div></div><div><span class="Apple-style-span" style="font-family: Arial;"><br />
</span></div><div></div><div><span class="Apple-style-span" style="font-family: Arial;">4. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/login-config.xml</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><span class="Apple-style-span" style="color: red;">comment</span> (do not use)</span></div>login-module code="org.jboss.portal.identity.auth.IdentityLoginModule"<br />
<span class="Apple-style-span" style="font-family: Arial;"><span class="Apple-style-span" style="color: lime;">uncomment</span> (use)</span><br />
login-module code="org.jboss.portal.identity.auth.SynchronizingLDAPExtLoginModule"<br />
<span class="Apple-style-span" style="font-family: Arial;">and adapt the variable to your configuration.</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: x-large;"><b>Connect to the portal</b></span></span><br />
<span class="Apple-style-span" style="font-family: Arial;">Now you should be able to connect to the portal:</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><span class="Apple-style-span" style="font-family: 'Times New Roman';">http://localhost:8080/portal</span></span><br />
<span class="Apple-style-span" style="font-family: Arial;">with the user <i>admin</i> and password <i>admin</i>.</span><br />
<span class="Apple-style-span" style="font-family: Arial;">The default HSQL database users that come with the portal out of the box are </span><i style="font-family: Arial;">admin</i><span class="Apple-style-span" style="font-family: Arial;"> and </span><i style="font-family: Arial;">user</i><span class="Apple-style-span" style="font-family: Arial;">. After migrating to LDAP they will only work if you have configured your portal properly. For example you have the possibility to authenticate users against LDAP + DB or only against LDAP. In this post users are only authenicated against LDAP! And 3 users available are the ones imported into the LDAP with the *.ldif file: admin, user, jduke.</span><br />
<span class="Apple-style-span" style="font-family: Arial;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial;">If you still have problems check out the section "<a href="http://jboss-as.blogspot.com/2010/10/11.html">Troubleshooting JBoss Portal</a>"</span></div></div></div>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-57924781924756537322010-09-16T12:14:00.002+02:002010-09-16T12:20:20.394+02:00Howto resize a partition<b>Command line:</b><br />
[root]# df -m<br />
[root]# lvm<br />
(starts lvm command line)<br />
<b>Within lvm command line:</b><br />
lvm> lvdisplay<br />
<br />
-- resize swap to 1G<br />
lvm> lvresize /dev/vg_f13v1/lv_swap --size 1G<br />
<br />
-- after the operation your LV size is:( LV Size 1.00 GiB)<br />
lvm> lvdisplay<br />
<br />
--now add all remaining free space<br />
lvresize -L +1.6GB /dev/vg_f13v1/lv_root<br />
<br />
--trigger the resizing process<br />
[root@f13-jon jon]# resize2fs -p /dev/vg_f13v1/lv_root<br />
<div><br />
</div>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-90093748127132721892010-09-15T15:50:00.001+02:002010-09-16T15:51:41.094+02:00Installing Fedora 13<a href="http://www.groks.org/installing-fedora.html">http://www.groks.org/installing-fedora.html</a>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-40172774345753469162010-09-06T13:14:00.000+02:002010-09-06T13:14:51.775+02:00sudo package-cleanup --cleandupes<br />
<br />
yum downgrade libvirt\*<br />
<br />
http://qemu-buch.de/d/Speichermedien/_Festplatten-Images_anderer_Virtualisierungssoftware/_VMware_WorkstationRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-65556281854520943872010-09-02T16:44:00.001+02:002010-09-01T16:46:30.470+02:00virt-manager fails to reboot guests (no solution found yet)https://bugzilla.redhat.com/show_bug.cgi?id=496537<br />
https://bugzilla.redhat.com/show_bug.cgi?id=505719<br />
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/368962<br />
<br />
Additional info:<br />
<br />
1. Error persists even if selinux is disabled.<br />
<br />
2. Error message in log :<br />
<br />
tail -F /var/log/messages<br />
<br />
libvirtd: 23:19:34.302: error : this function is not supported by the<br />
hypervisor: virDomainReboot<br />
<br />
tail -F /var/log/libvirt/qemu/guest.log<br />
<br />
Nothing.<br />
<br />
2. Shutdown does nothing , guest still running, no error message.<br />
<br />
3. Force off -> error message / warning -> restart guest is only option.Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-40132780911915092392010-09-01T16:35:00.003+02:002010-09-01T16:44:14.525+02:00Howto debug in FedoraIf you happen to run into any sort of system error, or some application is not working properly within Fedora just check on the aggregated log file with the following command:<br />
tail -F /var/log/messagesRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-34631217746140006402010-08-31T12:04:00.001+02:002010-08-31T12:04:00.982+02:00Easy file transfer<ul><li>SCP<br />
scp /home/xxx/middleware/jon-server/test.txt root@192.168.100.150:/app/jon/bin</li>
</ul><ul><li>KDE - Dolphin</li>
</ul>fish://root@192.168.100.150<br />
fish://root@192.168.100.150/app/jonRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-12999623581570575532010-08-30T10:06:00.003+02:002010-08-30T10:08:26.225+02:00Get a Red Hat red hat<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7r1nnG0om4mYg0arYVNBHaHvW8kMp5bZUE8EQ2I4EW-irfReTeoX9rllhOxigiXNILu8cVe4EsHdh-6M5wU2Phhp-RmxOG2WezhPv6Cz-4DU5MJWk-qVtQsdPnMuqEjHVCpLrqw2LqHoC/s1600/2010_08_023_Selection.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7r1nnG0om4mYg0arYVNBHaHvW8kMp5bZUE8EQ2I4EW-irfReTeoX9rllhOxigiXNILu8cVe4EsHdh-6M5wU2Phhp-RmxOG2WezhPv6Cz-4DU5MJWk-qVtQsdPnMuqEjHVCpLrqw2LqHoC/s320/2010_08_023_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
http://redhat.brandfuelstores.com/index.php?main_page=index&cPath=2_17Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-3161424589023502892010-08-29T16:47:00.014+02:002010-12-21T12:55:31.146+01:00Writing start scripts for services in Fedora linuxHowto manage your services and programs within Fedora<br />
<br />
<div style="background-color: #cfe2f3; color: black;"><span style="color: blue;">1. Make your shell script executable</span></div><div style="background-color: #cfe2f3; color: black;">All shell scripts in /usr/bin/ or /sbin/ can be executed anywhere within the command line</div><div style="background-color: #cfe2f3; color: black;">Add a softlink into /sbin or /usr/bin</div><div style="background-color: #cfe2f3; color: black;"><br />
</div><div style="background-color: #cfe2f3; color: black; margin: 0px;">$ cd /sbin</div><div style="background-color: #cfe2f3; color: black; margin: 0px;">$ ln -s /app/jon/bin/rhq-server.sh jon</div><div style="background-color: #cfe2f3; color: black;">$ jon</div><br />
<br />
<div style="background-color: #cfe2f3; color: black;"><span style="color: blue;">1.5. Start your shell script at startup by modifying</span></div><div style="background-color: #cfe2f3; color: black;"><br />
Example:</div><div style="background-color: #cfe2f3; color: black; margin: 0px;">$ sudo vi /etc/rc.d/rc.local </div><div style="background-color: #cfe2f3; color: black; margin: 0px;">add:<br />
killall -9 knetworkmanager & qdbus org.kde.kded /kded unloadModule networkmanagement && nm-applet &</div><br />
<div style="background-color: #cfe2f3; color: blue;"><span style="font-size: small;">2. Start your program easily via shell script</span></div><div style="background-color: #cfe2f3;">If you have a shell that takes the standard arguments : start / stop / restart</div><div style="background-color: #cfe2f3;">you can it into the repository /etc/init.d/.</div><div style="background-color: #cfe2f3;">All scripts in /etc/init.d/ can be called with</div><div style="background-color: #cfe2f3;"><b>$ service my_script start</b></div><div style="background-color: #cfe2f3;">For convenience use a softlink instead of copying it into /etc/init.d:</div><div style="background-color: #cfe2f3;">$ cd /etc/init.d</div><div style="background-color: #cfe2f3;">$ ln -s /app/jon/bin/rhq-server.sh jon</div><div style="background-color: #cfe2f3;"><b>$ service jon start</b></div><br />
<div style="margin: 0px;"><div style="background-color: #cfe2f3; color: blue;">3. Service registry within Fedora (the startup services)</div><div style="background-color: #cfe2f3;">List all available services (/etc/init.d)</div><div style="background-color: #cfe2f3;"><b>$ chkconfig --list</b></div><div style="background-color: #cfe2f3;">Start / stop the ssh daemon service</div><div style="background-color: #cfe2f3;"><b>$ chkconfig sshd start (or stop)</b></div><div style="background-color: #cfe2f3;">Enable a service</div><div style="background-color: #cfe2f3;"><b><b>$ chkconfig</b> <b>--add ssh</b><i></i></b> </div><div style="background-color: #cfe2f3;"><b><b>$ chkconfig</b> sshd <b>on</b></b></div><div style="background-color: #cfe2f3;">Disable a service</div><div style="background-color: #cfe2f3;"></div><div style="background-color: #cfe2f3;"><b><b>$ chkconfig</b> sshd off</b></div><div style="background-color: #cfe2f3;"><b><b>$ chkconfig</b> sshd --del<b></b></b></div><div style="background-color: #cfe2f3; color: blue;">If you you prefer a graphical interface for the service registry use</div><div style="background-color: #cfe2f3;"><b>$ system-config-services</b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6jRWvZa32mXXl3ngkX7o6qcArLcAcFuKpK9FiL-clrdCmKDP7OsuQyziPe9mGtv6Fm2LAkb6mLVYHnurUwf4JZUlrPh4eBOUnRmZM9si0zB1QlYC8IctyOEUELXDNHxYoX-ANlSqlpvfr/s1600/2010_12_006_Selection.jpeg" imageanchor="1" linkindex="17" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6jRWvZa32mXXl3ngkX7o6qcArLcAcFuKpK9FiL-clrdCmKDP7OsuQyziPe9mGtv6Fm2LAkb6mLVYHnurUwf4JZUlrPh4eBOUnRmZM9si0zB1QlYC8IctyOEUELXDNHxYoX-ANlSqlpvfr/s400/2010_12_006_Selection.jpeg" width="400" /></a></div><b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<b><br />
</b><br />
<div style="background-color: #cfe2f3; color: blue;">4. Making an executable 'servicable'</div><div style="background-color: #cfe2f3;">Create a file <span style="background-color: #cfe2f3;">in /etc/init.d, here an example: shutter </span><br />
<span style="background-color: #cfe2f3;"><span style="font-size: xx-small;">#!/bin/sh<br />
#<br />
# shutter This script starts and stops the shutter daemon<br />
#<br />
# chkconfig: - 78 30<br />
# processname: shutter<br />
# description: shutter is a daemon process<br />
<br />
get_shutter_pid () {<br />
SHUTTERPID=$( ps aux --cols 1024 | grep "perl" | grep "/usr/bin/shutter" | awk '{ print $2 }' | head -n 1 )<br />
} <br />
<br />
PIDFILE=/var/run/shutter.pid<br />
<br />
# By default it's all good<br />
RETVAL=0<br />
<br />
BASE="/usr/bin"<br />
<br />
# See how we were called.<br />
case "$1" in<br />
start)<br />
# Start daemon.<br />
echo -n $"Starting shutter: "<br />
export DISPLAY=:0<br />
nohup ${BASE}/shutter > /dev/null &<br />
sleep 1<br />
get_shutter_pid<br />
echo -n ${SHUTTERPID} > ${PIDFILE}<br />
echo "Start Shutter : pid = ${SHUTTERPID}"<br />
;;<br />
stop)<br />
# Stop daemons.<br />
get_shutter_pid<br />
if ! [ -z "${SHUTTERPID}" ] ; then<br />
echo "Stop Shutter : pid = ${SHUTTERPID}"<br />
kill "${SHUTTERPID}"<br />
fi<br />
;;<br />
restart|force-reload)<br />
$0 stop<br />
sleep 8<br />
$0 start<br />
;;<br />
status)<br />
get_shutter_pid<br />
if [ -z "${SHUTTERPID}" ] ; then<br />
echo "Shutter is stopped"<br />
exit 1<br />
else<br />
echo "Shutter (pid ${SHUTTERPID}) is being executed..."<br />
exit 0<br />
fi<br />
;;<br />
*)<br />
echo "Usage: $0 {start|stop|restart|status}"<br />
RETVAL=1<br />
;;<br />
esac<br />
<br />
exit $RETVAL</span> </span></div></div>Rolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com0tag:blogger.com,1999:blog-6654728023948470978.post-33848593277398834892010-08-27T16:45:00.044+02:002011-02-27T19:03:05.818+01:00Howto use JBoss Operation Network (JON) for your provisioningPost summary:<br />
This post will illustrate how you can set up a Red Hat middleware provisioning environment using Linux (Fedora), KVM (virtualisation), JBoss EAP (application server) and JBoss Operations Network (supervision) and Apache httpd (mod_cluster).<br />
A use case could be : JON detects that the an application deployed on EAP can not handle the charge any more and triggers the creation of a new virtual machine that contains a new JBoss EAP. Via a bundle the application is deployed in EAP who joins the cluster. <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik2LZFzwKzVmpCHlsKpYCrK7xsmx8yMq7x7Eng_J7t_aaSnkN2s6O5k2aYs-43kKvMzBAfQmj1BXCg0TGCJjCafNIo8DMUEZsvhWQQ7NU-Y7OorzxP9v1swzcx0i6MI2iPnzwSblqEVLgW/s1600/2010_08_JBoss_Jon_v4.png" imageanchor="1" linkindex="63" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik2LZFzwKzVmpCHlsKpYCrK7xsmx8yMq7x7Eng_J7t_aaSnkN2s6O5k2aYs-43kKvMzBAfQmj1BXCg0TGCJjCafNIo8DMUEZsvhWQQ7NU-Y7OorzxP9v1swzcx0i6MI2iPnzwSblqEVLgW/s400/2010_08_JBoss_Jon_v4.png" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Main post :<br />
Here I more or less dumped the technical steps to follow without explaining step by steps (as it's a long post use ctrl+F to be happy)<br />
<br />
On host:<br />
<ul><li>sudo service sshd start</li>
</ul>Connect to JON VM:<br />
<ul><li>cd /app/script</li>
<li>./initSshId.sh (removing the file /etc/.ssh/know_hosts might be necessary)</li>
<li>Creation of a soft link for your script from the JON/bin directory to the script directory. As you can see in the next screen shot, this will allow <jboss>JON to discover automatically those scripts (without soft link you would need a plugin)<br />
cd /app/jon/jon-server/bin<br />
ln -s /app/script/virsh-start.sh virsh-start.sh</jboss></li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTueVGuRJNnyRiSjWNf3YLhVeWlBMKL6pzmlJILpEI6vHbYbCWFV1mhVqt4hVglxuryVx1jC9jTjZsLUhDZp_-v8AaNAN3MUWC26ycVr6OqSlnll4W5riMzQN4VEEFsW1a74McjH4jDPMG/s1600/2010_08_022_Selection.jpeg" imageanchor="1" linkindex="64" style="clear: left; display: inline ! important; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTueVGuRJNnyRiSjWNf3YLhVeWlBMKL6pzmlJILpEI6vHbYbCWFV1mhVqt4hVglxuryVx1jC9jTjZsLUhDZp_-v8AaNAN3MUWC26ycVr6OqSlnll4W5riMzQN4VEEFsW1a74McjH4jDPMG/s320/2010_08_022_Selection.jpeg" width="175" /></a></div> <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a name='more'></a><ul><li>Start services<br />
service postgresql restart<br />
service jon restart<br />
service jon-agent restart<br />
service httpd restart<br />
(Apache with mod_cluster installed: http://www.jboss.org/mod_cluster)</li>
</ul><ul><li>Start JON<br />
cd /app/jon/jon-server/bin<br />
./rhq-server.sh stop/start</li>
<li>virsh-start.sh DemoLoad-1</li>
</ul><br />
<b>On Host</b><br />
sudo chkconfig iptables off <br />
sudo service iptables stop<br />
http://192.168.100.150:7080<br />
usr: rhqadmin / rhqadmin<br />
<br />
<b>JON provisioning</b><br />
consists of 2 things:<br />
- bundle (files and spec of your application to be deployed)<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8S7LDUahK0LxdLjwG6H-mnYm7fc0GBQLr903esAKJOagOaSOh80ysp2UXvzezUn5h36ItheMcY1hzkEmRahEu1GSIitRXVu2alokGulUqKWcLV_yx314TwiEAYiwDZ4mT7cSh_VmuWoS-/s1600/2010_09_006_Selection.jpeg" imageanchor="1" linkindex="65" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8S7LDUahK0LxdLjwG6H-mnYm7fc0GBQLr903esAKJOagOaSOh80ysp2UXvzezUn5h36ItheMcY1hzkEmRahEu1GSIitRXVu2alokGulUqKWcLV_yx314TwiEAYiwDZ4mT7cSh_VmuWoS-/s200/2010_09_006_Selection.jpeg" width="200" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
- destination (group and directories)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTZq3Z3o-lRliKcR-823IVKSJMQsYB_kSENqz0TqBbmx1FAy61orpDkl0nVMNycDq16olmKklVj0wZXP2Tt86tqb6T37cYCfaBAqH7jI73XS8sn_OIkW2WlbS6eBdZVjsS1RDMuuK8sJvc/s1600/2010_08_015_Selection.jpeg" imageanchor="1" linkindex="66" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="102" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTZq3Z3o-lRliKcR-823IVKSJMQsYB_kSENqz0TqBbmx1FAy61orpDkl0nVMNycDq16olmKklVj0wZXP2Tt86tqb6T37cYCfaBAqH7jI73XS8sn_OIkW2WlbS6eBdZVjsS1RDMuuK8sJvc/s320/2010_08_015_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8APs8mHWjTGKQcpCFJXp6JE5U1w4ysAuoD66imEcKFv9THh2xuwXib3ey6OI_gNl3YjwMxeAv5RYgvLtlRqywMPssF0T_pCJVoAoA4BIhkPfgn47b0br7DByzto_jRPCLGmYZVoRzpqEB/s1600/2010_08_016_Selection.jpeg" imageanchor="1" linkindex="67" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8APs8mHWjTGKQcpCFJXp6JE5U1w4ysAuoD66imEcKFv9THh2xuwXib3ey6OI_gNl3YjwMxeAv5RYgvLtlRqywMPssF0T_pCJVoAoA4BIhkPfgn47b0br7DByzto_jRPCLGmYZVoRzpqEB/s320/2010_08_016_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Click on execute<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-ObWgblRha47t99d9tERv6Er6Zz2M5wm8wE0yd5CbNS3MOfz8nqcEpxkekpEP7IMjFqXMTMlm4DlHFhfhhqPyNsYnaWkAjsXigwq7ipiTCL2GOq-azCPw7WcET0uCkDVNz6w3TU7yF7GK/s1600/2010_08_019_Selection.jpeg" imageanchor="1" linkindex="68" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-ObWgblRha47t99d9tERv6Er6Zz2M5wm8wE0yd5CbNS3MOfz8nqcEpxkekpEP7IMjFqXMTMlm4DlHFhfhhqPyNsYnaWkAjsXigwq7ipiTCL2GOq-azCPw7WcET0uCkDVNz6w3TU7yF7GK/s320/2010_08_019_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-dD7ilIAF7GeK04mwIeygt1IqAILQPvdn9TLtOi8_8KTOUF5gcwFAmb1570Z3lICV56jMLuQGA_ExphWWWq9l1UNUYWC73EUk9R9max5LPBDkAPRbwDSuKheE11K90EDPOEjOyRCAlXx/s1600/2010_08_020_Selection.jpeg" imageanchor="1" linkindex="69" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-dD7ilIAF7GeK04mwIeygt1IqAILQPvdn9TLtOi8_8KTOUF5gcwFAmb1570Z3lICV56jMLuQGA_ExphWWWq9l1UNUYWC73EUk9R9max5LPBDkAPRbwDSuKheE11K90EDPOEjOyRCAlXx/s320/2010_08_020_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnNxrZ5EV0Y0JEdbr0HdtdhvpjfFfvBm2N52oypj7oApY-zn6k8POZvNPZs_bj2dhxvrYEcg-DtaWlPzzCO7p9ztGLtmfRNahc27lRB7iiTmoH9aNDkkhOx9k4W6UIQerqysaZBG4xfEtk/s1600/2010_08_021_Selection.jpeg" imageanchor="1" linkindex="70" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnNxrZ5EV0Y0JEdbr0HdtdhvpjfFfvBm2N52oypj7oApY-zn6k8POZvNPZs_bj2dhxvrYEcg-DtaWlPzzCO7p9ztGLtmfRNahc27lRB7iiTmoH9aNDkkhOx9k4W6UIQerqysaZBG4xfEtk/s320/2010_08_021_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
To deploy a bundle 5.5. Deploying Bundles to a Platform<br />
<ul><li>Create group<br />
</li>
<li>Click depoy</li>
</ul><b>Correct the httpd plugin within JON</b><br />
<div class="separator" style="clear: both; text-align: center;"></div><ul><li>By default the httpd shows an error (known issue <a href="http://jira.rhq-project.org/browse/RHQ-1177" linkindex="71">http://jira.rhq-project.org/browse/RHQ-1177</a><span class="Apple-style-span"> )</span></li>
<li><span class="Apple-style-span">Set the URL to http://192.168.100.150:80/ as shown in the screen shot<br />
(make sure that you set 'http://' in front of the IP, otherwise you will get error:</span><span class="Apple-style-span" style="font-size: xx-small;">Unable to update this resource's connection properties. org.rhq.core.clientapi.agent.discovery.InvalidPluginConfigurationClientException: Unable to connect to managed resource of type [Apache HTTP Server] using the specified connection properties. Failed to start component for resource Resource[id=10917, type=Apache HTTP Server, key=/etc/httpd, name=/etc/httpd/conf/httpd.conf, parent=f13-jon, version=2.2.15]. at org.rhq.core.pc.inventory.InventoryManager.updatePluginConfiguration(InventoryManager.java:483)</span></li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfOPspTNUWAoedpNOFTp1NYwZMCgtQA0Ig5XW7iap6KcU8s4dORCytafzDo-cJDoWY0s5k-wz7VLKLauE6QHShWDopx-9ar0AGj1cCcmFHMzrY4EM7KVgQVwaGUru_81MaqgVHOdVrd93X/s1600/2010_09_003_Selection.jpeg" imageanchor="1" linkindex="72" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfOPspTNUWAoedpNOFTp1NYwZMCgtQA0Ig5XW7iap6KcU8s4dORCytafzDo-cJDoWY0s5k-wz7VLKLauE6QHShWDopx-9ar0AGj1cCcmFHMzrY4EM7KVgQVwaGUru_81MaqgVHOdVrd93X/s400/2010_09_003_Selection.jpeg" width="400" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfOPspTNUWAoedpNOFTp1NYwZMCgtQA0Ig5XW7iap6KcU8s4dORCytafzDo-cJDoWY0s5k-wz7VLKLauE6QHShWDopx-9ar0AGj1cCcmFHMzrY4EM7KVgQVwaGUru_81MaqgVHOdVrd93X/s1600/2010_09_003_Selection.jpeg" imageanchor="1" linkindex="73" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br />
</a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfOPspTNUWAoedpNOFTp1NYwZMCgtQA0Ig5XW7iap6KcU8s4dORCytafzDo-cJDoWY0s5k-wz7VLKLauE6QHShWDopx-9ar0AGj1cCcmFHMzrY4EM7KVgQVwaGUru_81MaqgVHOdVrd93X/s1600/2010_09_003_Selection.jpeg" imageanchor="1" linkindex="74" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br />
</a></div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
<br />
<br />
<br />
<br />
<br />
</div><ul><li>After this To correct it configure URL with value http://192.168.100.150 and the exclamation mark should disappear</li>
</ul><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTaDnceXffdnwGsmmz58FzW4baHF7Tyy_rfgeK8c_eui6lLQ1uFPuOYqtCI3hIXqBBOaiRN3NAQQpK01zirpg9znA-MYaHmk8amPgfF2wT4QM0sszlkAP8I5ndIWyxKz0xk0dB4DKEf5BM/s1600/2010_09_004_Selection.jpeg" imageanchor="1" linkindex="75" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"> <img border="0" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTaDnceXffdnwGsmmz58FzW4baHF7Tyy_rfgeK8c_eui6lLQ1uFPuOYqtCI3hIXqBBOaiRN3NAQQpK01zirpg9znA-MYaHmk8amPgfF2wT4QM0sszlkAP8I5ndIWyxKz0xk0dB4DKEf5BM/s200/2010_09_004_Selection.jpeg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTaDnceXffdnwGsmmz58FzW4baHF7Tyy_rfgeK8c_eui6lLQ1uFPuOYqtCI3hIXqBBOaiRN3NAQQpK01zirpg9znA-MYaHmk8amPgfF2wT4QM0sszlkAP8I5ndIWyxKz0xk0dB4DKEf5BM/s1600/2010_09_004_Selection.jpeg" imageanchor="1" linkindex="76" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br />
</a></div><div><b><br />
</b></div><div><b><br />
</b></div><div><b><br />
</b></div><div><b><br />
</b></div><div><b><br />
</b></div><div><b><br />
</b></div><div><b><br />
</b></div><b>Howto install a plugin</b><br />
<ul><li>Download jon-plugin-pack-eap-2.4.0.GA.zip<br />
cd /app/jon/jon-plugin-pack-eap-2.4.0.GA<br />
cp <span class="Apple-style-span" style="color: red;">jopr-rhq-server-plugin-3.0.0.GA.jar</span> /app/jon/jon-server/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/</li>
<li>Restart JON<br />
service jon stop<br />
service jon start</li>
<li>Now tell the JON agent to get all new plugins<br />
(in background the plugin-jars will be copied into /app/jon/rhq-agent/plugins/)</li>
</ul><br />
In the Overview choose 'RHQ Agent' --> Operations --> New --> 'Update All Plugins --> scroll down --> hit 'SCHEDULE'<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyMsZD_C3QpN5WDW7TYoOASuMcysOv6ZgKFHV8JC2MhLX3DtK1gkvjVAx3lJESpIwC1GGVtROZa_oK-Ayk6sq7_PZf2bdqHEjODyVlUHOTWBEg1YeXS8fE9oJxsWj3QRrvlQIGoZyVf1n_/s1600/2010_08_026_Selection.jpeg" imageanchor="1" linkindex="77" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyMsZD_C3QpN5WDW7TYoOASuMcysOv6ZgKFHV8JC2MhLX3DtK1gkvjVAx3lJESpIwC1GGVtROZa_oK-Ayk6sq7_PZf2bdqHEjODyVlUHOTWBEg1YeXS8fE9oJxsWj3QRrvlQIGoZyVf1n_/s400/2010_08_026_Selection.jpeg" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Scroll down and add 'plugins' in the command line and hit 'Schedule'<br />
<a href="http://www.redhat.com/docs/en-US/JBoss_ON/2.4/admin/html/agent-config.html#Prompt_Commands" linkindex="78">more commands</a><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQAC6HBRPT72XlJ8juBrlLFopob-kQ66O0ZnAyYTlgA13DceqIl4ePIWrp69qZNPxdw8KkIROcthe0hJ2sw5v2vnaVIZUVkKFMECdAyxH2k-vscyYYVOLi1XgdaijWVApyb72Vbg_IeAmO/s1600/2010_08_028_Selection.jpeg" imageanchor="1" linkindex="79" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQAC6HBRPT72XlJ8juBrlLFopob-kQ66O0ZnAyYTlgA13DceqIl4ePIWrp69qZNPxdw8KkIROcthe0hJ2sw5v2vnaVIZUVkKFMECdAyxH2k-vscyYYVOLi1XgdaijWVApyb72Vbg_IeAmO/s320/2010_08_028_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<ul><li><b>Adding your JBoss AS server to the supervised list</b></li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz-5Nwh3agok5Lq_A1tzdqlAA4GaPSFvmKMuuDhYtMZ1GEjtq70WZdL0CRCktVkkznQ3T7Vx-9YBuhh1ZVhY1AAQYIzvMxg_YPI3liwXgeW2qaLCZchi00mJQ8jIExNL2T4YD8kiY46ryU/s1600/2010_08_030_Selection.jpeg" imageanchor="1" linkindex="80" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz-5Nwh3agok5Lq_A1tzdqlAA4GaPSFvmKMuuDhYtMZ1GEjtq70WZdL0CRCktVkkznQ3T7Vx-9YBuhh1ZVhY1AAQYIzvMxg_YPI3liwXgeW2qaLCZchi00mJQ8jIExNL2T4YD8kiY46ryU/s320/2010_08_030_Selection.jpeg" width="283" /></a></div><div><b><br />
</b></div><div><b><br />
</b></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Naming Provider URL *<br />
jnp://192.168.100.150:2099<br />
<br />
JBoss Home Directory *<br />
/app/jon/jon-server/jbossas<br />
<br />
Server Home Dir *<br />
/app/jon/jon-server/jbossas/server/default<br />
<br />
Bind Address<br />
192.168.100.150<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIc-DZ0_dFjf-Q3uOaRG7uRDBENJ2iBAgXLF-U_LZwqvWEsHYoVY-V8_1t4VtANYsaNYJ5PS_A_jOXcI1QrNdAsLrC7oTVnqlDK54bMJDuH8opqhcnVxU0lCu2-dEhApgVgG5rtYAJQ7gv/s1600/2010_09_001_Selection.jpeg" imageanchor="1" linkindex="81" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIc-DZ0_dFjf-Q3uOaRG7uRDBENJ2iBAgXLF-U_LZwqvWEsHYoVY-V8_1t4VtANYsaNYJ5PS_A_jOXcI1QrNdAsLrC7oTVnqlDK54bMJDuH8opqhcnVxU0lCu2-dEhApgVgG5rtYAJQ7gv/s400/2010_09_001_Selection.jpeg" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Availability Check Period : 60 sec<br />
<br />
After that you should see your JBoss AS Server on the left<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcNW-grygrSzXmJ337LUcsvmI-lji1697Ao7BAUYpljiPaqw8jRY81tjtuURq1p_oyUcWXCwynSpuU5C6hMVwWgl1mQaX8SyUy2FFWVQrPu7IZCV9FZao13lpixVbW3PuejzcRi-bP66pr/s1600/2010_09_005_Selection.jpeg" imageanchor="1" linkindex="82" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcNW-grygrSzXmJ337LUcsvmI-lji1697Ao7BAUYpljiPaqw8jRY81tjtuURq1p_oyUcWXCwynSpuU5C6hMVwWgl1mQaX8SyUy2FFWVQrPu7IZCV9FZao13lpixVbW3PuejzcRi-bP66pr/s200/2010_09_005_Selection.jpeg" width="171" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b>Add DemoLoad-1 server</b><br />
<br />
<div style="margin: 0px;">Naming Provider URL *</div><div style="margin: 0px;">jnp://192.168.100.172:1099</div><div style="margin: 0px;"><br />
</div><div style="margin: 0px;">JBoss Home Directory *</div><div style="margin: 0px;">/app/jboss/jboss</div><div style="margin: 0px;"><br />
</div><div style="margin: 0px;">Server Home Dir *</div><div style="margin: 0px;">/app/jboss/jboss/server/default</div><div style="margin: 0px;"><br />
</div><div style="margin: 0px;">Bind Address</div><div style="margin: 0px;">192.168.100.172</div><br />
-----------------<br />
<br />
<b>Configure JBoss:</b><span class="Apple-style-span" style="font-weight: normal;"> </span><br />
<span class="Apple-style-span" style="font-weight: normal;">/etc/init.d/jboss is pointing to </span><br />
<div><b><div><div style="display: inline ! important;"><div style="display: inline ! important;"><span class="Apple-style-span" style="font-weight: normal;">/app/jboss/jboss/bin/jboss_init_redhat.sh</span></div></div></div><div><div style="display: inline ! important;"><div style="display: inline ! important;"><span class="Apple-style-span" style="font-weight: normal;">modifiy :</span></div></div></div><div><span class="Apple-style-span" style="font-weight: normal;">JAVA_HOME=/app/java/java</span></div><div><span class="Apple-style-span" style="font-weight: normal;">JBOSS_HOME=${JBOSS_HOME:-"/app/jboss/jboss"}</span></div><div><span class="Apple-style-span" style="font-weight: normal;">JBOSS_BIND_ADDRESS=192.168.100.172</span></div><div><span class="Apple-style-span" style="font-weight: normal;"><b><br />
</b></span></div></b></div><b>Configure RHQ agent:</b><span class="Apple-style-span" style="font-weight: normal;"> </span><br />
<span class="Apple-style-span" style="font-weight: normal;">/etc/init.d/jon-agent is pointing to </span><br />
/app/rhq-agent/bin/rhq-agent-wrapper.sh<br />
(nothing to modify)<br />
<br />
Add JAVA HOME to <rhq_agent>/bin/rhq-agent-env.sh:</rhq_agent><br />
RHQ_AGENT_JAVA_HOME="/app/java/java"<br />
<br />
Change startup script<br />
sudo chkconfig --level 3 jon-agent off<br />
(this makes sure that JON agent starts after the JON server!)<br />
<br />
<div style="margin: 0px;"><b>Configure mod_cluster:</b></div><div>Check if the following URLs are available:</div>http://192.168.100.150/mod_cluster-manager<br />
http://192.168.100.150/load-demo/<br />
<br />
<b>Apache httpd configuration</b><br />
1. Mod_cluster<br />
2. SNMP<br />
<br />
Modules: /etc/httpd/modules<br />
<br />
mod_advertise.so<br />
mod_jk.so<br />
mod_manager.so<br />
mod_proxy_cluster.so<br />
mod_slotmem.so<br />
libsnmpcommon.so<br />
libsnmpsubagt.so<br />
libsnmpmonagt.so<br />
<br />
Configuration in /etc/httpd/conf.d<br />
mod_cluster.conf<br />
<br />
<span class="Apple-style-span" style="font-size: x-small;"> Listen 192.168.100.150:6666</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> ServerName 192.168.100.150</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Order deny,allow</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Deny from all</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Allow from 127.0.0.</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Allow from 192.168.100.</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> </span><br />
<span class="Apple-style-span" style="font-size: x-small;"> KeepAliveTimeout 60</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> MaxKeepAliveRequests 0</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> ManagerBalancerName mycluster</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> AdvertiseFrequency 5</span><br />
<br />
<span class="Apple-style-span" style="font-size: x-small;"><location mod_cluster-manager=""></location></span><br />
<span class="Apple-style-span" style="font-size: x-small;"> SetHandler mod_cluster-manager</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Order deny,allow</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Deny from all</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Allow from 127.0.0.1</span><br />
<span class="Apple-style-span" style="font-size: x-small;"> Allow from 192.168.100.</span><br />
<span class="Apple-style-span" style="font-size: x-small;"></span><br />
<br />
<b>Howto setup scripts manage-virt.sh</b><br />
On each virtual machine you have to modify the network file, so that the script manage-virt.sh can govern the different machines via the DHCP name:<br />
/etc/sysconfig/network-scripts/ifcfg-eth0 (or 1)<br />
<br />
Should look like this:<br />
<span style="font-size: x-small;"># Network Interface</span><br />
<span style="font-size: x-small;">DEVICE=eth0</span><br />
<span style="font-size: x-small;">HWADDR=52:54:00:1B:1B:20</span><br />
<span style="font-size: x-small;">ONBOOT=yes</span><br />
<span style="font-size: x-small;">DHCP_HOSTNAME=f13-jon</span><br />
<div><br />
</div><b>Howto setup PostgreSQL database </b><br />
<b></b><br />
<b><br />
<span class="Apple-style-span" style="font-weight: normal;">Change within the file: /var/lib/pgsql/data/postgresql.conf</span><br />
<span class="Apple-style-span" style="font-weight: normal;">listen_addresses='*'</span><br />
<span class="Apple-style-span" style="font-weight: normal;">http://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html</span><br />
<span class="Apple-style-span" style="font-weight: normal;">/var/lib/pgsql/data/pg_hba.conf</span><br />
<span class="Apple-style-span" style="font-weight: normal;">host all all 0.0.0.0/0 trust</span></b><br />
service postgresql restart<br />
<br />
<b>SQL commands can be executed via Web interface</b><br />
http://192.168.100.150:7080/admin/test/sql.jsp<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzTBmWYO0O_0I9KIiHj5vnAF1bd3tpTsNvtXSxqvB7_C72e3huFyI-Sy5aol3wmMDf5_9W4qMJlhlF6Vv5sb0HlpI5RTJjhfQdjZiSkCHkFW_Dr_z6gVpZUwLjuwYTvXJ3mwAXSGTCZdpc/s1600/2010_09_010_Selection.jpeg" imageanchor="1" linkindex="83" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzTBmWYO0O_0I9KIiHj5vnAF1bd3tpTsNvtXSxqvB7_C72e3huFyI-Sy5aol3wmMDf5_9W4qMJlhlF6Vv5sb0HlpI5RTJjhfQdjZiSkCHkFW_Dr_z6gVpZUwLjuwYTvXJ3mwAXSGTCZdpc/s320/2010_09_010_Selection.jpeg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b>Troubleshooting</b><br />
<br />
<i>1. Troubleshooting JON Agent 1</i><span style="font-size: x-small;"><br />
</span><br />
<span style="font-size: x-small;">Failed to start the agent</span><br />
<span style="font-size: x-small;">java.net.BindException: Cannot assign requested address</span><br />
<div><span style="font-size: x-small;">...</span></div><span style="font-size: x-small;"><br />
</span><br />
<span style="font-size: x-small;">Agent will be restarted soon to see if the failure condition cleared up</span><br />
<div><span style="font-size: x-small;"><br />
</span></div><div><span style="font-size: x-small;">./rhq-agent.sh -l</span></div><div><span style="font-size: x-small;">(reconfigure)</span></div><div><br />
</div><i>2. Troubleshooting JON Agent 2</i><br />
<span style="font-size: x-small;">[root@f13-v2 ~]# service jon-agent start</span><br />
<span style="font-size: x-small;">Starting RHQ Agent...</span><br />
<span style="font-size: x-small;">RHQ Agent (pid 1687) is NOT running</span><br />
<span style="font-size: x-small;">Failed to start - make sure the RHQ Agent is fully configured properly</span><br />
<div><span class="Apple-style-span" style="color: red; font-size: x-small;">TODO</span><span style="font-size: x-small;">: add --- RHQ_AGENT_JAVA_HOME="/app/java/java" --- into rhq-agent-env.sh </span></div><div><br />
<i>3. Troubleshooting WARN message</i><br />
<span style="font-size: x-small;"><br />
</span><br />
<span style="font-size: x-small;">WARN [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Unable to check for updated configuration</span><br />
<span style="font-size: x-small;">java.lang.RuntimeException: Configuration management is currently disabled for the ResourceType[id=0, category=Service, name=java.util.logging, plugin=RHQAgent] Resource with key [java.util.logging:type=Logging] - it can be enabled in the Resource's Inventory > Connection tab.</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQOkfmdEIp3EzeHd6MbiKj_ZkJpRgt2OQ4t_ceu6kBSigvmlaOLRkL1skU_tGRo8xxM_hg-kKv-mqRhzb6jzXvTZaRsHUt-pBLyJc2BMVNOF9ShqWhTALhGclFKWLr86UnwUqBl6rUVFXl/s1600/2010_09_011_Selection.jpeg" imageanchor="1" linkindex="84" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQOkfmdEIp3EzeHd6MbiKj_ZkJpRgt2OQ4t_ceu6kBSigvmlaOLRkL1skU_tGRo8xxM_hg-kKv-mqRhzb6jzXvTZaRsHUt-pBLyJc2BMVNOF9ShqWhTALhGclFKWLr86UnwUqBl6rUVFXl/s400/2010_09_011_Selection.jpeg" width="400" /></a></div><div><br />
</div></div><div><br />
</div><div><br />
</div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-size: x-small;">Choose in the inventory tab of the machine : yes / yes</span><br />
<br />
<i>4. Troubleshoot adding a new agent</i><br />
This happens every time another agent connects to JON server --> bug, or other major updates within the system happen, pretty unstable<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvImVlH0lKvM2TUN6UZ37MArYdIN3WkPk_qvqek62A-WkcdPAeRBTF8QWwbM5Sq2m02U4PUO-VVqvXsp2ght29gN7M7yWp43wVXowhT4bz02YnhGvRwIS8gfbUNK0RmmoeAeMvERXEZcbM/s1600/2010_09_012_Selection.jpeg" imageanchor="1" linkindex="85" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="367" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvImVlH0lKvM2TUN6UZ37MArYdIN3WkPk_qvqek62A-WkcdPAeRBTF8QWwbM5Sq2m02U4PUO-VVqvXsp2ght29gN7M7yWp43wVXowhT4bz02YnhGvRwIS8gfbUNK0RmmoeAeMvERXEZcbM/s400/2010_09_012_Selection.jpeg" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b>Alert triggering scripts</b><br />
An interesting use case is that when one ressource is triggering an alert, another ressource can execute an operation.<br />
After having set up an alert you can set up an operation on a alert :<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH3u_wM1yYcjC3uZB7hT3SaiQuLesrUYc33NCCljGPfYr4XwzyGByxgRmSKIhjmuMaeVwCG5yPH_wE8d_SvV50PhHSO2eNpbW5k7u5rXez3ZbUle1Tr5Cw4L9duy7YqnTK0Iii0REiYQmY/s1600/2010_09_014_Selection.jpeg" imageanchor="1" linkindex="86" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH3u_wM1yYcjC3uZB7hT3SaiQuLesrUYc33NCCljGPfYr4XwzyGByxgRmSKIhjmuMaeVwCG5yPH_wE8d_SvV50PhHSO2eNpbW5k7u5rXez3ZbUle1Tr5Cw4L9duy7YqnTK0Iii0REiYQmY/s400/2010_09_014_Selection.jpeg" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b>References</b><br />
http://rhq-project.org/display/RHQ/Bundles+Sprint+Demo<br />
http://rhq-project.org/display/RHQ/Design-Bundle+Ant+Launcher<br />
http://rhq-project.org/display/RHQ/Design-Bundle+Ant+Tasks<br />
<br />
http://mazz.fedorapeople.org/downloads/sample-bundles/<br />
Slide show:<br />
<a href="http://mazz.fedorapeople.org/demos/provisioning_beta/prov-beta.htm" linkindex="87">http://mazz.fedorapeople.org/demos/provisioning_beta/prov-beta.htm</a><br />
Java API of JON:<br />
http://www.redhat.com/docs/en-US/JBoss_ON/2.4/api/domain/index.html?org/rhq/core/domain/contentRolandhttp://www.blogger.com/profile/05855060397190263814noreply@blogger.com2