<?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>Blog - PonticStar.com &#187; CentOS</title>
	<atom:link href="http://www.ponticstar.com/blog/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ponticstar.com/blog</link>
	<description>Blog about various aspects of programming and web design</description>
	<lastBuildDate>Sun, 14 Aug 2011 23:52:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ultramonkey on CentOS 4 with BlueQuartz (part 2)</title>
		<link>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/</link>
		<comments>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 14:06:43 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuartz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UltraMonkey]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=88</guid>
		<description><![CDATA[I already wrote about additional steps required to install UltraMonkey on CentOS with BlueQuartz. Soon after that I have discovered that there is more to do if you want to get a perfect setup. One of the steps required to configure load-balanced cluster as described here was to create an IP alias on the loopback [...]]]></description>
			<content:encoded><![CDATA[<p>I already wrote about <a href="http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/" class="target-blank">additional steps required to install UltraMonkey on CentOS with BlueQuartz</a>. Soon after that I have discovered that there is more to do if you want to get a perfect setup.</p>
<p>One of the steps required to configure load-balanced cluster as described <a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html" class="target-blank">here</a> was to create an IP alias on the loopback interface. It is needed so that real servers or standby director could see traffic for the virtual IP address.</p>
<p>But when creating a virtual site using BlueQuartz GUI it automatically adds an alias on primary network interface (<code>eth0</code> in our case) in addition to the alias we already created manually.</p>
<p><span id="more-88"></span><div id="attachment_89" class="wp-caption aligncenter" style="width: 550px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/07/ultramonkey-on-centos4-with-bluequartz-fig1.png" alt="Adding a new site using BlueQuartz" title="Adding a new site using BlueQuartz" width="540" height="259" class="size-full wp-image-89" /><p class="wp-caption-text">Adding a new site using BlueQuartz</p></div></p>
<p>Now every server would be configured to respond to packets for virtual IP address <code>192.168.6.240</code>, which could result in unpredictable behavior.</p>
<pre>standby# ip addr sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    <b>inet 192.168.6.240/32 brd 255.255.255.255 scope global lo</b>
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:10:e0:05:20:0d brd ff:ff:ff:ff:ff:ff
    <b>inet 192.168.6.2/24 brd 192.168.6.255 scope global eth0</b>
    inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0:0
</pre>
<p>If you have completed all the steps to set-up a cluster you should already have fallback interface alias defined in <code>/etc/sysconfig/network-scripts/ifcfg-lo:0</code>. We no longer need BlueQuartz to manage virtual IP address for us.</p>
<p>In order to prevent BlueQuartz from doing that the following files have to be modified:</p>
<div class="filename">/usr/sausalito/handlers/base/vsite/change_net_info.pl</div>
<pre class="brush:perl; gutter:true; first-line:60; highlight:[65]">...
# handle ip address change
if ($vsite_new->{ipaddr})
{
    # make sure that there is a network interface for the new ip
#    vsite_add_network_interface($cce, $vsite_new->{ipaddr});

    # delete the old interface, this is a no op if another site is using the old ip still
    vsite_del_network_interface($cce, $vsite_old->{ipaddr});
} # end of ip address change specific
...
</pre>
<div class="filename">/usr/sausalito/handlers/base/vsite/vsite_create.pl</div>
<pre class="brush:perl; gutter:true; first-line:91; highlight:[93]">...
# make sure there is a network interface for this ip
#vsite_add_network_interface($cce, $vsite->{ipaddr});
...
 </pre>
<p>This way when you add or modify a virtual site assigned to virtual IP address BlueQuartz won&#8217;t add its address to one of the network interfaces because we already took care of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/07/03/ultramonkey-on-centos4-with-bluequartz-p2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UltraMonkey on CentOS 4 with BlueQuartz</title>
		<link>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/</link>
		<comments>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:10:23 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuartz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UltraMonkey]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=80</guid>
		<description><![CDATA[CONFIGURATION: Server is configured as director to be a part of high availability and load balancing cluster as described here: http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html CentOS 4 with Bluequartz from Nuonce.net is used as operating system. PROBLEM: As a part of configuration an alias for loopback interface had to be created so server can accept packets for the virtual [...]]]></description>
			<content:encoded><![CDATA[<h3>CONFIGURATION:</h3>
<p>Server is configured as director to be a part of high availability and load balancing cluster as described here:<br />
<a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html">http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html</a></p>
<p>CentOS 4 with Bluequartz from <a href="http://www.nuonce.net">Nuonce.net</a> is used as operating system. <span id="more-80"></span></p>
<h3>PROBLEM:</h3>
<p>As a part of configuration an alias for loopback interface had to be created so server can accept packets for the virtual service:</p>
<div class="filename">/etc/sysconfig/network-scripts/ifcfg-lo:0</div>
<pre>DEVICE=lo:0
IPADDR=192.168.6.240
NETMASK=255.255.255.255
NETWORK=192.168.6.0
BROADCAST=192.168.6.255
ONBOOT=yes
NAME=loopback
</pre>
<p>When <code>heartbeat</code> starts on director, it removes the alias on loopback interface <code>lo</code> and creates virtual IP address on interface <code>eth0</code>.</p>
<p>Here is how all interfaces look like before problem occurs:</p>
<pre>[root@server ~]# ip addr show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:19:db:df:15:12 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.1/24 brd 192.168.6.255 scope global eth0
    <b>inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0</b>
</pre>
<p>However after certain amount of time the alias with virtual IP appears on loopback interface again:</p>
<pre>[root@server ~]# ip addr sh
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    <b>inet 192.168.6.240/32 brd 192.168.6.255 scope global lo:0</b>
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:19:db:df:15:12 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.1/24 brd 192.168.6.255 scope global eth0
    <b>inet 192.168.6.240/24 brd 192.168.6.255 scope global secondary eth0</b>
</pre>
<h3>NOTE:</h3>
<p>This problem only affects servers acting as load balancers / directors. Real servers running on CentOS / Bluequartz are not affected.</p>
<h3>CAUSE:</h3>
<p>It turns out this problem is caused by <code>swatch</code> which is utilized by BlueQuartz. Every 15 minutes it checks the status of all interfaces that have <code>ONBOOT=yes</code> and brings them up if they are down.</p>
<p>See <code>/usr/sausalito/swatch/bin/am_network.sh</code> for more information.</p>
<h3>SOLUTION:</h3>
<p>In order to prevent <code>swatch</code> from manipulating our virtual IP address, you have to turn off <code>ONBOOT</code> parameter since that what it looks for.</p>
<div class="filename">/etc/sysconfig/network-scripts/ifcfg-lo:0</div>
<pre>...
ONBOOT=no
...</pre>
<p>Then disable <code>heartbeat</code> from starting automatically and make sure it is off.</p>
<pre>[root@server ~]# chkconfig heartbeat off
[root@server ~]# chkconfig --list heartbeat | grep heartbeat
heartbeat       0:off   1:off   2:off   3:off   4:off   5:off   6:off
</pre>
<p>Finally bring the alias and <code>heartbeat</code> up in <code>rc.local</code>. This script file is run once, before all other scripts have run but before the logon prompt appears.</p>
<div class="filename">/etc/rc.local</div>
<pre>...
ifup lo:0
/etc/init.d/heartbeat start
</pre>
<h3>LINKS:</h3>
<ol>
<li><a href="http://www.ultramonkey.org/3/topologies/sl-ha-lb-eg.html">Streamline High Availability and Load Balancing</a></li>
<li><a href="http://www.jedi.com/obiwan/technology/ultramonkey-rhel4.html">How to install Ultra Monkey LVS in a 2-Node HA/LB Setup on CentOS/RHEL4</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/06/24/ultramonkey-on-centos4-with-bluequartz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion 8 on CentOS 4 with BlueQuartz</title>
		<link>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/</link>
		<comments>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/#comments</comments>
		<pubDate>Thu, 14 May 2009 15:44:53 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[BlueQuartz]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=62</guid>
		<description><![CDATA[When starting ColdFusion for the first time connector wizard cannot configure web server correctly.
<pre>Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
Running the ColdFusion 8 connector wizard
======================================================================
Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
Running apache connector wizard...
ColdFusion 8 not started, will retry connector 12 more time(s)
ColdFusion 8 not started, will retry connector 11 more time(s)
ColdFusion 8 not started, will retry connector 10 more time(s)
ColdFusion 8 not started, will retry connector 9 more time(s)
ColdFusion 8 not started, will retry connector 8 more time(s)
ColdFusion 8 not started, will retry connector 7 more time(s)
ColdFusion 8 not started, will retry connector 6 more time(s)
ColdFusion 8 not started, will retry connector 5 more time(s)
ColdFusion 8 not started, will retry connector 4 more time(s)
ColdFusion 8 not started, will retry connector 3 more time(s)
ColdFusion 8 not started, will retry connector 2 more time(s)
ColdFusion 8 not started, will retry connector 1 more time(s)
The connector wizard has not been able to contact the local ColdFusion 8, connector installation aborted.
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================
</pre>
]]></description>
			<content:encoded><![CDATA[<h3>PROBLEM:</h3>
<p>When starting ColdFusion for the first time connector wizard cannot configure web server correctly.</p>
<pre>Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
Running the ColdFusion 8 connector wizard
======================================================================
Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
Running apache connector wizard...
ColdFusion 8 not started, will retry connector 12 more time(s)
ColdFusion 8 not started, will retry connector 11 more time(s)
ColdFusion 8 not started, will retry connector 10 more time(s)
ColdFusion 8 not started, will retry connector 9 more time(s)
ColdFusion 8 not started, will retry connector 8 more time(s)
ColdFusion 8 not started, will retry connector 7 more time(s)
ColdFusion 8 not started, will retry connector 6 more time(s)
ColdFusion 8 not started, will retry connector 5 more time(s)
ColdFusion 8 not started, will retry connector 4 more time(s)
ColdFusion 8 not started, will retry connector 3 more time(s)
ColdFusion 8 not started, will retry connector 2 more time(s)
ColdFusion 8 not started, will retry connector 1 more time(s)
The connector wizard has not been able to contact the local ColdFusion 8, connector installation aborted.
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================
</pre>
<div class="filename">/opt/coldfusion8/logs/cfserver.log:</div>
<pre>java.net.UnknownHostException: foo.mydomain.com: foo.mydomain.com</pre>
<div class="filename">/opt/coldfusion8/runtime/lib/wsconfig/wsconfig.log:</div>
<pre>05/06 07:59:07 info Macromedia JRun 4.0 (Build 108487)
05/06 07:59:08 error Could not connect to any JRun/ColdFusion servers on host localhost.
Possible causes:
o Server not running
  -Start Macromedia JRun4 or ColdFusion 8 server
o Server running
  -JNDI listen port in jndi.properties blocked by TCP/IP filtering or firewall
   on server
  -host restriction in security.properties blocking communication with server</pre>
<h3>CAUSE:</h3>
<p>This behavior could be caused by using non-resolvable host name (<code>foo.mydomain.com</code> in our example) along with <code>/etc/hosts</code> file having incorrect permissions.</p>
<pre>[root@foo ~]# ls -la /etc/hosts
-rw-r-----  1 root root 1514 May  4 18:04 /etc/hosts</pre>
<h3>SOLUTION:</h3>
<p>To resolve this issue <code>/etc/hosts</code> has to have <code>0644</code> access permission:</p>
<pre>
[root@foo ~]# chmod 0644 /etc/hosts
[root@foo ~]# ls -la /etc/hosts
-rw-r--r--  1 root root 1514 May  4 18:04 /etc/hosts
</pre>
<p>On distributions with BlueQuartz (<a href="http://www.osoffice.co.uk">Strongbolt</a>, <a href="http://www.blueonyx.it">BlueOnyx</a>, etc) it could be caused by <code>/usr/sausalito/handlers/nuonce/fixhosts/fixhosts</code> script (see <a class="target-blank" href="http://www.nuonce.net/support/viewthread.php?fid=44&amp;tid=1087">this post</a>). To prevent this script from resetting permissions again, add the following line at the end of the script:</p>
<pre>/bin/chmod 0644 /etc/hosts</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/05/14/coldfusion8-on-centos4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

