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

<channel>
	<title>Java Tuning &#187; Operating Systems</title>
	<atom:link href="http://www.javatuning.com/category/operating-systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javatuning.com</link>
	<description>Software Development, Java, and some more.</description>
	<lastBuildDate>Tue, 29 Jun 2010 10:29:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Why is Thread.sleep() inherently inaccurate</title>
		<link>http://www.javatuning.com/why-is-thread-sleep-inherently-inaccurate/</link>
		<comments>http://www.javatuning.com/why-is-thread-sleep-inherently-inaccurate/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 19:06:09 +0000</pubDate>
		<dc:creator>Gili Nachum</dc:creator>
				<category><![CDATA[Multi Threading]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[estimating]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[milliseconds]]></category>
		<category><![CDATA[multithreading]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[time measurment]]></category>
		<category><![CDATA[windows services]]></category>

		<guid isPermaLink="false">http://www.javatuning.com/?p=172</guid>
		<description><![CDATA[Avi Ribchinsky, a friend and a college of mien, is transitioning from C++ to the Java world. He had been playing with Thread.sleep(), when he noticed that the sleep method might oversleep more than ordered, and moreover, it could also under sleep (see Fig 1). Coming from the C++ world, that surely caught him surprised [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.linkedin.com/in/aviribchinsky">Avi Ribchinsky</a>, a friend and a college of mien, is transitioning from C++ to the Java world. He had been playing with Thread.sleep(), when he noticed that the sleep method might oversleep more than ordered, and moreover, it could also <strong>under sleep</strong> (see Fig 1). Coming from the C++ world, that surely caught him surprised <img src='http://www.javatuning.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Fig 1.</p>
<div id="attachment_173" class="wp-caption alignleft" style="width: 594px"><a href="http://www.javatuning.com/wp-content/uploads/2009/08/sleep.JPG"><img class="size-full wp-image-173" title="sleep" src="http://www.javatuning.com/wp-content/uploads/2009/08/sleep.JPG" alt="Thread.sleep() under sleeping" width="584" height="463" /></a><p class="wp-caption-text">Thread.sleep() under sleeping</p></div>
<h2>How is sleep implemented in Java anyway?</h2>
<p>Avi came asking me if I knew anything about it, I was wondering myself how such a common and important method could be faking in the way shown above. Is it the OS? a Bug in the specific JRE version used? Maybe the API doesn&#8217;t guarantee milliseconds precision to begin with?<br />
Thinking about all of these factors, we realized that we don&#8217;t really know how the JVM implements the sleep method functionality, my best guess would have been that the process registers itself in the OS for a wake up call, and the OS wakes the process via a software interrupt. OK, time to search the web.</p>
<p>The <a href="http://www.javamex.com/tutorials/threads/sleep.shtml">following article</a> gives a very detailed answer, explaining that sleep is implemented by a thread giving up its OS scheduling quantum back to the scheduler, on the next execution quantum the thread gets, it has the chance to wake up and continue processing, or again continue sleeping.<br />
Therefore, the accuracy resolution of sleep is directly dependent on the process scheduling resolution of the operating system in usage. Since windows XP process scheduling resolution is roughly 10ms, the sleep mechanism, in the Avi&#8217;s example, might had prefered to under sleep &#8220;a little&#8221; rather than oversleeping &#8220;a lot&#8221;, by waking himself in the current scheduling cycle quantum, rather than in the next, future, quantum.</p>
<p>The article also mentions that the inaccuracies are worsened when a process with a higher scheduling priority, than the sleeping process, is in a runnable state.</p>
<p>I assume that, running on a Hypervisor with course grained process scheduling would also produce greater inaccuracies.</p>
<p><a href="http://www.javatuning.com/wp-content/uploads/2009/08/sleeping.jpeg"><img class="alignleft size-medium wp-image-174" title="sleeping" src="http://www.javatuning.com/wp-content/uploads/2009/08/sleeping-300x229.jpg" alt="sleeping" width="300" height="229" /></a></p>
<h2>Conclusion</h2>
<p>You can&#8217;t rely on the millisecond accuracy of the sleep method. Take a before and after time measurament to find the actual time spent sleeping, in order to avoid ever increasing inacurracies.<br />
Sleep tight <img src='http://www.javatuning.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.javatuning.com/why-is-thread-sleep-inherently-inaccurate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A hand made freeware windows firewall</title>
		<link>http://www.javatuning.com/a-hand-made-freeware-windows-firewall/</link>
		<comments>http://www.javatuning.com/a-hand-made-freeware-windows-firewall/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 15:42:43 +0000</pubDate>
		<dc:creator>Gili Nachum</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[operating system]]></category>

		<guid isPermaLink="false">http://www.javatuning.com/?p=129</guid>
		<description><![CDATA[I have two windows servers that shouldn&#8217;t talk to each other. How do I make sure they don&#8217;t? Right, why not use some firewall? well, because I can&#8217;t just install any software on these servers, company regulations, and windows&#8217; built-in firewall suck big time (only inbound, have to configure ALL exceptions). On Linux this is [...]]]></description>
			<content:encoded><![CDATA[<p>I have two windows servers that shouldn&#8217;t talk to each other. How do I make sure they don&#8217;t?<br/><br />
Right, why not use some firewall? well, because I can&#8217;t just install any software on these servers, company regulations, and windows&#8217; built-in firewall suck big time (only inbound, have to configure ALL exceptions).<br />
On Linux this is quite a trivial IPTables command. Run the following on server#1:</p>
<pre><code>iptables -I INPUT -s server#2 -j DROP
iptables -I OUTPUT -d server#2 -j DROP</code></pre>
<p>Unfortunately there&#8217;s nothing like IPTables built into windows.<br />
Driving inspired from the IPTables concept of routing the packets to the trashcan (&#8220;<code>-j drop</code>&#8220;), I realized that much same could be implemented on windows by twicking the OS routing table causing it to deliver packets for server#2 to no where.<br />
Here&#8217;s my hand tailored, freeware, no software required, windows firewall that sends packets to a vacation in /dev/null:</p>
<pre><code>route ADD 1.1.1.2 MASK 255.255.255.255 1.1.1.0</code></pre>
<p>Where:<br />
    Server#1 IP is 1.1.1.1<br />
    Server#2 IP is 1.1.1.2<br />
    1.1.1.0 isn&#8217;t assigned to anyone &#8211; our /dev/null for the occasion.</p>
<p>Additional blabber:<br />
If you add the route instruction <b>only</b> to server#1, but not to server#2, then server#2 can still send IP packets to server#1, while this breaks TCP completely, server#2 could still send UDP datagrams to server#1.<br />
Make sure the servers are configured with static IP, otherwise your solution would break over time. In order to make the route persistent across server reboots, add the -p flag.<br />
<div id="attachment_132" class="wp-caption alignnone" style="width: 524px"><img src="http://www.javatuning.com/wp-content/uploads/2009/06/wrongway.gif" alt="wrong way! Packet! turn back now!" title="wrong way" width="514" height="494" class="size-full wp-image-132" /><p class="wp-caption-text">wrong way! Packet! turn back now!</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javatuning.com/a-hand-made-freeware-windows-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miniature scale pro-active IT &#8211; Creating windows services dependencies</title>
		<link>http://www.javatuning.com/miniature-scale-pro-active-it-creating-windows-services-dependency/</link>
		<comments>http://www.javatuning.com/miniature-scale-pro-active-it-creating-windows-services-dependency/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 14:21:28 +0000</pubDate>
		<dc:creator>Gili Nachum</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[pro-activity]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[services dependency]]></category>
		<category><![CDATA[system startup]]></category>
		<category><![CDATA[windows services]]></category>

		<guid isPermaLink="false">http://www.javatuning.com/?p=51</guid>
		<description><![CDATA[Yesterday night we had a scheduled power shutdown in the Dev lab. Today morning, the lab manager rose up early to get all servers running before the armies of developers arrive to the office. My work includes interacting with a Lotus Sametime server (IBM&#8217;s Instant Messaging (IM) server), so I run my own private IM [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday night we had a scheduled power shutdown in the Dev lab. Today morning, the lab manager rose up early to get all servers running before the armies of developers arrive to the office. My work includes interacting with a <a href="http://en.wikipedia.org/wiki/IBM_Lotus_Sametime">Lotus Sametime server</a> (IBM&#8217;s <a href="http://en.wikipedia.org/wiki/Instant_messaging">Instant Messaging</a> (IM) server), so I run my own private IM server. starting the day&#8217;s work, I quickly noticed that my IM client fail to log in to the IM server. In fact, all of the developers could not log in to their own private IM servers.<br />
Remembering that during the client log in process the IM server validates the client supplied log in credentials against a <strong>central </strong>LDAP server, the LDAP server became an immediate suspect.</p>
<p>The LDAP server we&#8217;re using is an old IBM ITDS LDAP server running on Win2000. It&#8217;s comprised out of two processes: the ITDS process that parses and execute LDAP queries, and a DB process (DB2) that takes care of data persistency. Both processes are registered as Windows services.</p>
<p>The investigation commenced! Maybe the LDAP server is down? I went a head and checked the ITDS and DB2 services status, both were running. Hmm&#8230; I moved on to inspect the ITDS log, and saw that during its start up stage it failed to create a connection to the DB2, therefore it resorted to starting in a, &#8220;crippled&#8221;, configuration only mode. That means that it just sits there, wasting random CPU cycles, giving the illusion that it&#8217;s there to provide service, but not actually answering any queries.<br />
To remedy the situation I simply re-started the ITDS service. It started up normally and began servicing incoming LDAP queries from the IM servers.<br />
At this point, you&#8217;ll be tempted to announce world wide: &#8220;I fixed it!&#8221;, but before you do that, stop and think about it for a minute; what is it exactly that you fixed? In did, the ITDS began servicing queries, and the client can log in, meaning that the current manifestation of the problem was eliminated, <strong>but did you fix the problem itself</strong>? Part of being <a href="http://en.wiktionary.org/wiki/proactive">pro-active</a> means that you solve future problems before they actually occur. What stops the problem from re-occurring the next time someone decides to restart the server? in order to solve it for good, you first need to understand what was the cause of the problem.</p>
<p>So, what happens during a server start up? The ITDS and DB2 services startup-type is set on Automatic, thus they start when the OS starts. The db connection error message fits a scenario in which the ITDS service started and tried to connect to the DB2 before the DB2 service finished starting up.<br />
We would like to instruct the ITDS service to be less hasty, and wait for the DB2 service to finish starting, before stepping into itself start up process. Educating it can be achieved by defining a service <strong>dependency</strong>, stating that the ITDS service is dependent on the DB2 service.</p>
<p>Implementing it: Dependencies can&#8217;t be created using the windows MMC &#8220;computer manager&#8221; snap-in GUI, so you&#8217;ll have to get your hands dirty with <a href="http://support.microsoft.com/kb/193888">registry mud using the following procedure</a>.</p>
<p>Problem uprooted! You won you pro-activity badge.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javatuning.com/miniature-scale-pro-active-it-creating-windows-services-dependency/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google I/O 2008 &#8211; Josh Bloch talk &#8211; Effective Java 2nd edition</title>
		<link>http://www.javatuning.com/google-io-2008-josh-bloch-talk-effective-java-2nd-edition/</link>
		<comments>http://www.javatuning.com/google-io-2008-josh-bloch-talk-effective-java-2nd-edition/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 16:04:42 +0000</pubDate>
		<dc:creator>Gili Nachum</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[vidoe]]></category>

		<guid isPermaLink="false">http://www.javatuning.com/?p=38</guid>
		<description><![CDATA[Now days, technology eager and innovation craving programmers can find abundant amounts of learning material online, served in an easy to swallow and digest form, such as video casts. One of the most prolific sources of technical info is Google, which now posted video sessions from the &#8220;google I/O&#8221;, may 08, dev gathering. In this [...]]]></description>
			<content:encoded><![CDATA[<p>Now days, technology eager and innovation craving programmers can find abundant amounts of learning material online, served in an easy to swallow and digest form, such as video casts. One of the most prolific sources of technical info is Google, which now posted video sessions from the <a title="google io 2008" href="http://sites.google.com/site/io/">&#8220;google I/O&#8221;, may 08, dev gathering</a>.<br />
In <a title="Josh Bloch - Java Reloaded" href="http://sites.google.com/site/io/effective-java-reloaded">this video Josh Bloch (formally at sun) gives an hour long session about his new second edition of the Effective Java book</a>. I found the session to be only somewhat interesting (Enum sets are not my main point of interest), plus the video quality is not ideal for reading through source code.<br />
The discussed book is a well gathered compilation of 78 Java best-practices (although, to be honest, I&#8217;ve only read about 20% of it). Another great book of his, that I&#8217;ve read and planning to post here about, is Java Puzzlers.</p>
<p>Listed below are other sessions I watched, or plan to watch (sadly, most sessions are about web programming and client side &#8211; not my cup of tee).</p>
<p><a title="What makes google run" href="http://www.youtube.com/watch?v=qsan-GQaeyk&amp;eurl=http://sites.google.com/site/io/underneath-the-covers-at-google-current-systems-and-future-directions">Google I/O 2008 &#8211; Underneath the Covers at Google</a> &#8211; GFS, big table, and the parallelism library MapReduce.<br />
I wonder what similar constructs for parallelism IBM have up their sleeve&#8230;</p>
<p><a href="http://sites.google.com/site/io/best-practices---building-a-production-quality-application-on-google-app-engine" target="_new">Best Practices &#8211; Building a Production Quality Application on Google App Engine</a> (Production stuff &#8211; I like the news from the front)<a href="http://sites.google.com/site/io/dalvik-vm-internals" target="_new"></a></p>
<p><a href="http://sites.google.com/site/io/dalvik-vm-internals" target="_new">Dalvik VM Internals</a> (That&#8217;s Google implementation of Java to avoid paying Sun royalties for JME)</p>
<p><a href="http://sites.google.com/site/io/how-open-source-projects-survive-poisonous-people" target="_new">How Open Source Projects Survive Poisonous People</a> (programmers intrigues always interesting)</p>
<p><a href="http://sites.google.com/site/io/painless-python-for-proficient-programmers-part-i" target="_new">Painless Python for Proficient Programmers</a> (I&#8217;m starting to work my way through Python these days)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javatuning.com/google-io-2008-josh-bloch-talk-effective-java-2nd-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book of the month &#8211; Linux Server Hacks</title>
		<link>http://www.javatuning.com/book-of-the-month-linux-server-hacks/</link>
		<comments>http://www.javatuning.com/book-of-the-month-linux-server-hacks/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 00:39:02 +0000</pubDate>
		<dc:creator>Gili Nachum</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[operating system]]></category>

		<guid isPermaLink="false">http://www.javatuning.com/?p=27</guid>
		<description><![CDATA[I just read through most of O&#8217;Reilly&#8217;s Linux Server Hacks book. I expected another dull Linux how-to book, which goes over the man/info of the most obvious commands, but instead I found an interesting, original, advanced hardcore book, full of Linux goodies to brag about in front of my colleagues. Some note worthy items: A [...]]]></description>
			<content:encoded><![CDATA[<p>I just read through most of O&#8217;Reilly&#8217;s <a href="http://oreilly.com/catalog/9780596004613/">Linux Server Hacks book</a>.<br />
I expected another dull Linux how-to book, which goes over the man/info of the most obvious commands, but instead I found an interesting, original, advanced hardcore book, full of Linux goodies to brag about in front of my colleagues.</p>
<p><a title="toilet fun" href="http://www.javatuning.com/wp-content/uploads/2008/06/linuxtoilet2.jpg"><img src="http://www.javatuning.com/wp-content/uploads/2008/06/linuxtoilet2.jpg" alt="toilet fun" /></a></p>
<p>Some note worthy items:</p>
<ul>
<li>A thought effective usage of SSH, especially as a secure channel for moving bits around the network, between a pair of processes each running on its own host.</li>
<li>How to reset your root password, without a rescue disk, using the LILO boot loader.</li>
<li>I didn&#8217;t knew about ext2/3 chattr and lsattr before reading the book&#8230;</li>
<li>Periodical rsync runs could save a lot wasted scp time.</li>
<li>(#44) burning a CD over the network using a pipe &#8211; cool</li>
<li>(#50) setting up a VPN using IPIP tunneling <img src='http://www.javatuning.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>(#57) lsof &#8211; hey, I&#8217;ve been using it for years.</li>
<li>(#63) loved to learn that the send_arp utility can help me to revoke all of the subnet&#8217;s machine (and router?) IP-&gt;mac mapping. Handy when setting up a two bits IP fail-over system.</li>
<li>(#68) ssh-agent &#8211; now I know what it is &#8211; very useful in the hands of an all mighty admin ruling over hundreds of minions machines.</li>
<li>(#73) loved the one-liners perl scriptlets.</li>
</ul>
<p>To conclude, a must have in your bathroom library.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javatuning.com/book-of-the-month-linux-server-hacks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VMWare: converting a hosted VM to a hypervisor VM &#8211; Linux troubleshooting</title>
		<link>http://www.javatuning.com/vmware-converting-a-hosted-vm-to-a-hypervisor-vm-linux-troubleshooting/</link>
		<comments>http://www.javatuning.com/vmware-converting-a-hosted-vm-to-a-hypervisor-vm-linux-troubleshooting/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 12:48:48 +0000</pubDate>
		<dc:creator>Gili Nachum</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.javatuning.com/?p=26</guid>
		<description><![CDATA[When using the VMWare convertor utility to convert between VmWare player/Workstation/server VM images to an ESX image, if the VM you are converting is Linux you might run into boot problems (&#8220;kernel panic&#8221; message) due to SCSI drivers problems. I found a couple of resources about the problem but none fully worked for me, here [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: left; direction: ltr; unicode-bidi: embed">When using the <a href="http://www.vmware.com/download/converter/download.html">VMWare convertor</a> utility to convert between VmWare player/Workstation/server VM images to an ESX image, if the VM you are converting is Linux you might run into boot problems (&#8220;kernel panic&#8221; message) due to SCSI drivers problems.</p>
<p class="MsoNormal" style="text-align: left; direction: ltr; unicode-bidi: embed">I found a couple of resources about the problem but none fully worked for me, here is my special recipe:<br />
The configuration I used was: RHEL 5.1 VM, and ESX 3.x server.</p>
<ol>
<li>Use the converter to load the image to the ESX</li>
<li>If you will start the converted image on the ESX you will see a kernel panic message</li>
<li>Go to VMWare infrastructure client -&gt; ESX server -&gt; vm props -&gt; hardware -&gt; SCSI controller -&gt; change from buslogic to LSI Logic</li>
<li>Load the vm CD-ROM drive with RHEL5 install disk (also serves as a rescue disk)</li>
<li>Boot the VM from the CD -&gt; when prompted, enter: linux rescue</li>
<li>The rescue disk should identify the linux partition and mounts it on <em>/mnt/sysimage</em></li>
<li>After getting a prompt enter: <em>chroot /mnt/sysimage</em></li>
<li>Backup, and then edit <em>/etc/modules.conf</em>, add this line: <em>alias scsi_hostadapter BusLogic</em></li>
<li>Backup the current ramdisk file: <em>cp /boot/init-[version].img /boot/init-[version].img.bak</em></li>
<li>Rebuild with new module and overwrite existing:  <em>mkinitrd -f -v /boot/initrd-[version]-img [version]</em></li>
<li>Reboot the OS.</li>
<li>Boot from the hard drive &#8211; The system will start normally</li>
</ol>
<p class="MsoNormal" style="text-align: left; direction: ltr; unicode-bidi: embed">
<p class="MsoNormal" style="text-align: left; direction: ltr; unicode-bidi: embed" dir="ltr">Weird that VMWare do not bother with their official proper documentation.<br />
Kudos to the vmware user community!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javatuning.com/vmware-converting-a-hosted-vm-to-a-hypervisor-vm-linux-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m changing the hostname. Deal with it!</title>
		<link>http://www.javatuning.com/im-changing-the-hostname-deal-with-it/</link>
		<comments>http://www.javatuning.com/im-changing-the-hostname-deal-with-it/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 05:36:41 +0000</pubDate>
		<dc:creator>Gili Nachum</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[a call for action]]></category>
		<category><![CDATA[autonomous computing]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[operating system]]></category>

		<guid isPermaLink="false">http://www.javatuning.com/?p=24</guid>
		<description><![CDATA[Lately, I&#8217;ve been crossing paths with too many enterprise-level server products that, once installed, can&#8217;t tolerate any change to the local machine&#8217;s hostname. Don&#8217;t get me wrong, I&#8217;m not spoiled to dare wishing that a hostname change will be handle in run-time, without a restart. I&#8217;m not even suggesting that the change would be automatically [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, I&#8217;ve been crossing paths with too many enterprise-level server products that, once installed, can&#8217;t tolerate any change to the local machine&#8217;s <a href="http://en.wikipedia.org/wiki/Hostname">hostname</a>.<br />
Don&#8217;t get me wrong, I&#8217;m not spoiled to dare wishing that a hostname change will be handle in run-time, without a restart. I&#8217;m not even suggesting that the change would be automatically detected and processed on the next product restart. I much more modest that that, Just having a documented working procedure on how to do that offline would make me a happy man. The current, glum, state of affairs is that some products would have to be completely re-installed if the hostname were to change.</p>
<p><a title="hostname" href="http://www.javatuning.com/wp-content/uploads/2008/06/computer-name.jpg"></a></p>
<p style="text-align: center"><a title="hostname" href="http://www.javatuning.com/wp-content/uploads/2008/06/computer-name.jpg"><img src="http://www.javatuning.com/wp-content/uploads/2008/06/computer-name.jpg" alt="hostname" /></a></p>
<p>Some of the reasons for changing a machine&#8217;s hostname might be:<br />
(1) You want to clone a new server from a, best practiced already installed, server template, each cloned copy should have a unique computer name (very useful in test environments, especially handy when making a vm duplicate of a template virtual machine).<br />
(2) You have an existing server which changed its business role &#8211; you plan to install a  new application module (EAR), but want to keep the existing middleware infrastructure (JEE AS).<br />
(3) You no longer want the server to be reachable by it&#8217;s original name (without making use of DNS administration, and aliases tricks).<br />
(4) You want to implement a new server naming convention in your production environment.</p>
<p>Now Programmers, how hard can it be to live in peace with a dynamic hostname?<br />
(1) If you are sure that the target network resource is the local machine then just use the localhost loopback interface instead of a hostname, when addressing it.<br />
(2) Query the OS when retrieving the machine&#8217;s hostname, instead of relying on static, sometimes binary, stale, configuration files.<br />
(3) Keep all application network resources is a centralized configuration repository. Provide an offline API for the admin to access it.</p>
<p>As a side note:<br />
IBM WAS ND 6.X now has, a long awaited, offline API for updating the hostname of a machine.<br />
If you know and care about other products that support or don&#8217;t support hostname updates, please place your comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javatuning.com/im-changing-the-hostname-deal-with-it/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
