<?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>AlexCline.net</title>
	<atom:link href="http://alexcline.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexcline.net</link>
	<description>The musings of a geek, cyclist, cinephile, yogi, diver, philosopher and gamer.</description>
	<lastBuildDate>Wed, 09 May 2012 13:55:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Why Nginx+Passenger is No-Go in a Secure Environment</title>
		<link>http://alexcline.net/2012/05/09/why-nginxpassenger-is-no-go-in-a-secure-environment/</link>
		<comments>http://alexcline.net/2012/05/09/why-nginxpassenger-is-no-go-in-a-secure-environment/#comments</comments>
		<pubDate>Wed, 09 May 2012 13:53:47 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Interesting Links]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=540</guid>
		<description><![CDATA[I&#8217;ve heard a lot of good things about Nginx. Shawn Wall mentioned how much he likes using it and how easy it is to configure. My experience with it has only been tangential at best. I&#8217;ve heard good things about it (lightweight, performant and scalable) on Hacker News and /r/programming, so when it came time [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve heard a lot of good things about <a href="http://nginx.org">Nginx</a>.  <a href="http://www.shawnwall.com/">Shawn Wall</a> mentioned how much he likes using it and how easy it is to configure.  My experience with it has only been tangential at best.  I&#8217;ve heard good things about it (lightweight, performant and scalable) on <a href="http://news.ycombinator.com/">Hacker News</a> and <a href="http://www.reddit.com/r/programming">/r/programming</a>, so when it came time to deploy a ruby application I&#8217;ve been developing, I thought I would give it a whirl.</p>
<p>There are many competing mantras about how to best deploy a ruby web application into a &#8216;production&#8217; state.  Some people just say, &#8216;start up your framework&#8217;s WEBrick server on 80 and go for it!&#8217;  Others, like myself want more stability and security &#8212; for that we turn to <a href="http://www.modrails.com/">Passenger</a>.  Passenger provides support for Rackable ruby apps on Apache and Nginx.</p>
<p>I&#8217;ve always liked the Apache+Passenger configuration when installing on CentOS &#8212; I can schedule regular yum updates to upgrade Apache and gem updates to upgrade Passenger.  This way, I know that I&#8217;ve got the latest and most secure versions running on my systems.  With monitoring and testing, I know if something breaks and can fix it promptly.</p>
<p>After setting up my fresh CentOS 6 machine, I found the <a href="http://wiki.nginx.org/Install">Nginx yum repos</a> which will happily keep Nginx updated.  Great.  I then went about doing the usual rvm+ruby+gem+passenger dance.  I ran <code>passenger-install-nginx-module</code> to initiate the passenger+nginx config and ran into this:</p>
<pre class="brush: plain; title: ; notranslate">Nginx doesn't support loadable modules such as some other web servers do,
so in order to install Nginx with Passenger support, it must be recompiled.

Do you want this installer to download, compile and install Nginx for you?

 1. Yes: download, compile and install Nginx for me. (recommended)
    The easiest way to get started. A stock Nginx 1.0.15 with Passenger
    support, but with no other additional third party modules, will be
    installed for you to a directory of your choice.

 2. No: I want to customize my Nginx installation. (for advanced users)
    Choose this if you want to compile Nginx with more third party modules
    besides Passenger, or if you need to pass additional options to Nginx's
    'configure' script. This installer will  1) ask you for the location of
    the Nginx source code,  2) run the 'configure' script according to your
    instructions, and  3) run 'make install'.

Whichever you choose, if you already have an existing Nginx configuration file,
then it will be preserved.

Enter your choice (1 or 2) or press Ctrl-C to abort: </pre>
<p><em>&#8216;Doesn&#8217;t support loadable modules&#8217;&#8230; &#8216;stock Nginx 1.0.15&#8242;&#8230; &#8216;compile&#8217;.</em>  <strong>Nope.</strong></p>
<p>So&#8230; I can allow passenger to build itself into an old version of nginx (1.0.15) or I can download the Nginx source and recompile it with Passenger support.  This is where Nginx lost me.</p>
<p>If I want to run a ruby app through Nginx using Passenger (or any other module that integrates Ruby support) I&#8217;ll have to recompile Nginx every time there&#8217;s an update to either system.  Judging by the release frequency of Nginx, that requires recompiling at least once per month.  Or, of course, I could just let my system languish and not upgrade regularly.  That&#8217;ll only leave me open to <a href="http://nginx.org/en/security_advisories.html">vulnerabilities</a> in either system, which is not cool.</p>
<p>So I&#8217;ll return to Apache+Passenger which supports dynamic module loading and independently updating components.  A secure system is a happy system.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/05/09/why-nginxpassenger-is-no-go-in-a-secure-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AtMail Open Authentication Fix</title>
		<link>http://alexcline.net/2012/04/18/atmail-open-authentication-fix/</link>
		<comments>http://alexcline.net/2012/04/18/atmail-open-authentication-fix/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 03:41:40 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[AtMail]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Hostname]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Username]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=537</guid>
		<description><![CDATA[I&#8217;ve been running AtMail Open for my personal email for a while now. I recently upgraded to the latest version 1.05 for the security updates and ran into a bit of a problem after completing the installation. I likely had to fix this when I first installed AtMail way back in the day. When I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running <a href="http://atmail.org">AtMail Open</a> for my personal email for a while now.  I recently upgraded to the latest version 1.05 for the security updates and ran into a bit of a problem after completing the installation.  I likely had to fix this when I first installed AtMail way back in the day.</p>
<p>When I would try to login, it would return an error saying I specified invalid credentials.  Looking at my maillog I saw the connection failing with the username &#8220;user@hostname.tld&#8221;.  My mailserver is configured to use local accounts which means that authentication is done without having to specify the hostname in the address.  Checking my other mail clients confirmed that I only have to specify my username to authenticate.  AtMail uses the combination of username and hostname when it attempts to authenticate.</p>
<p>I dug around the install for a bit and found a little hidden setting in [AtMailHome]/libs/Atmail/Config.php.  To configure AtMail to only send the username to the mailserver for authentication, change this line:</p>
<pre class="brush: plain; title: ; notranslate">'mailserver_auth' =&gt; '1',</pre>
<p> to this
<pre class="brush: plain; title: ; notranslate">'mailserver_auth' =&gt; '0',</pre>
<p>.</p>
<p>A lovely undocumented setting.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/04/18/atmail-open-authentication-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Firewall Manipulation Using Puppet</title>
		<link>http://alexcline.net/2012/03/16/advanced-firewall-manipulation-using-puppet/</link>
		<comments>http://alexcline.net/2012/03/16/advanced-firewall-manipulation-using-puppet/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 19:55:16 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=529</guid>
		<description><![CDATA[When using Puppet for systems configuration management, the new Puppet-Firewall module is really useful for managing iptables rules. Sometimes though, there are some tricks that are required to get the firewall to behave properly. Here are a list of the tricks I&#8217;ve learned so far: Firewall rule numbering: The firewall documentation shows that in order [...]]]></description>
			<content:encoded><![CDATA[<p>When using <a href="http://puppetlabs.com">Puppet</a> for systems configuration management, the new <a href="https://github.com/puppetlabs/puppetlabs-firewall">Puppet-Firewall</a> module is really useful for managing iptables rules.  Sometimes though, there are some tricks that are required to get the firewall to behave properly.</p>
<p>Here are a list of the tricks I&#8217;ve learned so far:</p>
<ol>
<li><strong>Firewall rule numbering:</strong>  The firewall documentation shows that in order to enforce rule ordering, you have to preface your declaration names with a number (e.g. 001, 002, 003, &#8230;, 999, etc).  Since my firewall rules selectively allow a few ports to be open and deny all other requests, it is easier to number the declarations based off the port they declare.
<pre class="brush: plain; title: ; notranslate">firewall { &quot;00000 accept icmp&quot;:
  proto =&gt; &quot;icmp&quot;,
  action =&gt; &quot;accept&quot;
}

firewall { &quot;00001 accept established, related&quot;:
  state  =&gt; ['ESTABLISHED', 'RELATED'],
  proto  =&gt; 'all',
  action =&gt; 'accept',
}

firewall { &quot;00002 accept localhost&quot;:
  source =&gt; '127.0.0.1',
  proto  =&gt; 'all',
  action =&gt; 'accept',
}

firewall { &quot;00080 http on port 80&quot;:
  proto =&gt; &quot;tcp&quot;,
  dport =&gt; &quot;80&quot;,
  action =&gt; &quot;accept&quot;
}

firewall { &quot;65536 drop incoming packets&quot;:
  action =&gt; 'drop'
}</pre>
<p>This way the rules are loaded in port order.  The first rules that setup iptables are loaded in the lowest numbers which are reserved ports and won&#8217;t likely be used by me anyway.  The last rules are numbered after 65535 &#8212; the last port.</li>
<li><strong>Auto-save configuration:</strong>  I&#8217;ve also found it useful to configured every declaration to notify puppet that it should save the iptables configuration.  This way, when one rule gets changed, it automatically saves the new config.
<pre class="brush: plain; title: ; notranslate">firewall { &quot;00080 http on port 80&quot;:
  proto =&gt; &quot;tcp&quot;,
  dport =&gt; &quot;80&quot;,
  action =&gt; &quot;accept&quot;,
  notify =&gt; Exec[&quot;iptables-save&quot;]
}

exec { &quot;iptables-save&quot;:
  command =&gt; $operatingsystem ? {
    &quot;debian&quot; =&gt; &quot;/sbin/iptables-save &gt; /etc/iptables/rules.v4&quot;,
    /(RedHat|CentOS)/ =&gt; &quot;/sbin/iptables-save &gt; /etc/sysconfig/iptables&quot;,
  },
  refreshonly =&gt; true,
  notify =&gt; Service[&quot;iptables&quot;],
}</pre>
</li>
<li><strong>Overriding declared rules:</strong>  Probably the most useful thing I figured out was how to remove firewall rules from the saved ruleset.  For example, by default my httpd rule allows requests from any IP on the Internet.  There is one server that should only allow requests from specific IP addresses.  To configure this, I have to remove the default rule and add in new rules for port 80 in iptables.  This is done using inheritence.
<pre class="brush: plain; title: ; notranslate">class special-http-rules inherits httpd {

  Firewall[&quot;00080 http on port 80&quot;] { ensure =&gt; absent }

  firewall { &quot;00080 http on port 80 from special server (123.45.67.89)&quot;:
    proto =&gt; &quot;tcp&quot;,
    dport =&gt; &quot;80&quot;,
    source =&gt; '123.45.67.89',
    action =&gt; &quot;accept&quot;,
    notify =&gt; Exec[&quot;iptables-save&quot;]
  }
}</pre>
<p>Using the <code>inherits</code> keyword on the parent class, I can call the &#8220;00080 http on port 80&#8243; firewall declaration and ensure that it is <em>absent</em> from the rules applied to the node.  Any server that I assign the &#8220;special-http-rules&#8221; class to will only respond to requests from the special server on port 80.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/03/16/advanced-firewall-manipulation-using-puppet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Input/Output 2012</title>
		<link>http://alexcline.net/2012/03/13/google-inputoutput-2012/</link>
		<comments>http://alexcline.net/2012/03/13/google-inputoutput-2012/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 22:00:32 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Interesting Links]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=522</guid>
		<description><![CDATA[Google just announced their I/O 2012 event which takes place June 27th &#8211; 29th. To demonstrate the cool stuff they&#8217;ll be presenting they released a small Chrome app which allows you to build a Rube Goldberg machine in your browser. I played with it for a while &#8212; it&#8217;s pretty cool. Check out the Input/Output [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://developers.google.com/events/io/input-output/ahNzfmdvb2dsZS1kZXZlbG9wZXJzcg0LEgVCb2FyZBipozgM" title="Alex Cline Input Output Machine"><img src="http://alexcline.net/files/2012/03/alexcline-io-e1331675754850.png" alt="" title="alexcline-io" width="598" height="242" class="aligncenter size-full wp-image-523" /></a></p>
<p>Google just announced their I/O 2012 event which takes place June 27th &#8211; 29th.  To demonstrate the cool stuff they&#8217;ll be presenting they released a small Chrome app which allows you to build a Rube Goldberg machine in your browser.  I played with it for a while &#8212; it&#8217;s pretty cool.  <a href="https://developers.google.com/events/io/input-output/ahNzfmdvb2dsZS1kZXZlbG9wZXJzcg0LEgVCb2FyZBipozgM" title="Alex Cline Input Output Machine">Check out the Input/Output machine I created.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/03/13/google-inputoutput-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expand LVM in CentOS 6 Running on vCenter</title>
		<link>http://alexcline.net/2012/02/29/expand-lvm-in-centos-6-running-on-vcenter/</link>
		<comments>http://alexcline.net/2012/02/29/expand-lvm-in-centos-6-running-on-vcenter/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 22:03:41 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=518</guid>
		<description><![CDATA[This is an update to the post I created back in June of 2011 on how to expand an LVM in CentOS 5.6 running on vCenter. CentOS 6 has made some changes to the way the LVMs are setup so I thought I would update this document accordingly. Using your vSphere client, increase the size [...]]]></description>
			<content:encoded><![CDATA[<p>This is an update to the post I created back in June of 2011 on <a href="http://alexcline.net/2011/06/06/expand-centos-5-6-lvm-running-on-vsphere/" title="Expand CentOS 5.6 LVM running on vSphere.">how to expand an LVM in CentOS 5.6 running on vCenter.</a>  CentOS 6 has made some changes to the way the LVMs are setup so I thought I would update this document accordingly.</p>
<ol>
<li>Using your vSphere client, increase the size of the disk attached to the VM.</li>
<li>Boot into the CentOS 6 installation disk and select &#8216;Rescue Mode&#8217; from the list of options.</li>
<li>When prompted to search for LVM partitions on the disk, select &#8216;Skip&#8217;.</li>
<li>Type the following commands at the prompt.  <em>The following assume you have a standard CentOS LVM configuration.</em>
<pre class="brush: bash; title: ; notranslate">fdisk /dev/sda
p  # Print partition table
n  # New partition
p  # Primary partition
3  # ID = 3
# When prompted, add 1 to the end block value for the sda2 partition and use it as the start of the sda3 partition.
# Use the default for the size which should be the rest of the free space on the disk.
t  # Change partition type
3  # Change partition 3
8e # Type = Linux LVM
p  # Print partition table
w  # Write partition table

# Create a new LVM physical volume from the new partition
lvm pvcreate /dev/sda3
lvm pvdisplay

# Mount the volume group
lvm vgscan
lvm vgchange -ay
# You will see the name of the volume group that is activated.  Usually something like 'vg_hostname'.

# Extend the volume group with the new physical volume.  Be sure to substitute the name of your volume group in the command below.
lvm vgextend /dev/vg_hostname /dev/sda3

# Extend the logical volume to include 100% of the free space on the volume group.
lvm lvextend /dev/vg_hostname/lv_root /dev/sda3

# Mount the volume group
lvm vgscan
lvm vgchange -ay

# Run a filesystem check on the newly expanded disk
e2fsck -f /dev/vg_hostname/lv_root

# Resize the filesystem to use the entire disk
resize2fs /dev/vg_hostname/lv_root</pre>
</li>
<li>After rebooting, you can confirm the final size of your disk using:
<pre class="brush: bash; title: ; notranslate">df -h</pre>
</li>
</ol>
<p><strong>As always, have a backup of your data.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/02/29/expand-lvm-in-centos-6-running-on-vcenter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Monitor SSH on Non-Standard Port in OpenNMS</title>
		<link>http://alexcline.net/2012/02/10/monitor-ssh-on-non-standard-port-in-opennms/</link>
		<comments>http://alexcline.net/2012/02/10/monitor-ssh-on-non-standard-port-in-opennms/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 16:36:50 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=511</guid>
		<description><![CDATA[To enhance security, I run SSH on a non-standard port. When using OpenNMS to monitor systems, it only looks for SSH servers on the standard port (22) so I had to update the configuration to monitor systems running SSH on a different port. Here&#8217;s the configuration I used: Note: I spent a long time trying [...]]]></description>
			<content:encoded><![CDATA[<p>To enhance security, I run SSH on a non-standard port.  When using OpenNMS to monitor systems, it only looks for SSH servers on the standard port (22) so I had to update the configuration to monitor systems running SSH on a different port.  Here&#8217;s the configuration I used:</p>
<p><em>Note: I spent a long time trying to figure this out.  The key is that the &#8216;banner&#8217; property is the String that the monitor daemon looks for to confirm that it&#8217;s communicating with an SSH server.  I erroneously put &#8216;SSH-1920&#8242; which would never match the SSH server&#8217;s response banner.</em></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- capsd-configuration.xml --&gt;
&lt;protocol-plugin protocol=&quot;SSH-1920&quot; class-name=&quot;org.opennms.netmgt.capsd.plugins.SshPlugin&quot; scan=&quot;on&quot;&gt;
  &lt;property key=&quot;banner&quot; value=&quot;SSH&quot; /&gt;
  &lt;property key=&quot;port&quot; value=&quot;1920&quot; /&gt;
  &lt;property key=&quot;timeout&quot; value=&quot;3000&quot; /&gt;
  &lt;property key=&quot;retry&quot; value=&quot;1&quot; /&gt;
&lt;/protocol-plugin&gt;

&lt;!-- poller-configuration.xml --&gt;
&lt;service name=&quot;SSH-1920&quot; interval=&quot;300000&quot; user-defined=&quot;false&quot; status=&quot;on&quot;&gt;
  &lt;parameter key=&quot;retry&quot; value=&quot;1&quot;/&gt;
  &lt;parameter key=&quot;banner&quot; value=&quot;SSH&quot;/&gt;
  &lt;parameter key=&quot;port&quot; value=&quot;1920&quot;/&gt;
  &lt;parameter key=&quot;timeout&quot; value=&quot;3000&quot;/&gt;
  &lt;parameter key=&quot;rrd-repository&quot; value=&quot;/opt/opennms/share/rrd/response&quot;/&gt;
  &lt;parameter key=&quot;rrd-base-name&quot; value=&quot;ssh-1920&quot;/&gt;
  &lt;parameter key=&quot;ds-name&quot; value=&quot;ssh-1920&quot;/&gt;
&lt;/service&gt;

&lt;!-- ... and farther down below ...  --&gt;

&lt;monitor service=&quot;SSH-1920&quot; class-name=&quot;org.opennms.netmgt.poller.monitors.SshMonitor&quot;/&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/02/10/monitor-ssh-on-non-standard-port-in-opennms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Message: dualvar is only available with the XS version of Scalar::Util&#8221; Error in CentOS 5</title>
		<link>http://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error-in-centos-5/</link>
		<comments>http://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error-in-centos-5/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 19:13:32 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=508</guid>
		<description><![CDATA[After upgrading the CentOS 5 system that is running my company&#8217;s internal ticketing system (OTRS), the automated cron jobs for processing tickets started throwing the following error: This error was caused by an upgrade to the Compress::Zlib package. The newer version of the package isn&#8217;t compiled with XS support. I found some information about this [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading the CentOS 5 system that is running my company&#8217;s internal ticketing system (OTRS), the automated cron jobs for processing tickets started throwing the following error:</p>
<pre class="brush: plain; title: ; notranslate">Message: dualvar is only available with the XS version of Scalar::Util at /usr/lib/perl5/vendor_perl/5.8.8/IO/Socket/SSL.pm line 19</pre>
<p>This error was caused by an upgrade to the Compress::Zlib package.  The newer version of the package isn&#8217;t compiled with XS support.  I found some information about this error from this <a href="http://lists.otrs.org/pipermail/otrs/2010-October/033515.html">OTRS mailing list post</a> from 2010 regarding RHEL.  Looks like it takes about a year for RHEL packages to make it downstream to CentOS.</p>
<p>To fix the error, I ran the following from the command line:</p>
<pre class="brush: bash; title: ; notranslate">perl -MCPAN -e &quot;CPAN::Shell-&gt;force(qw(install Scalar::Util));&quot;</pre>
<p>After letting the cronjobs rerun, the error was gone and tickets successfully processed again.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error-in-centos-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sending HTML Email from the Linux Command Line</title>
		<link>http://alexcline.net/2012/01/12/sending-html-email-from-the-linux-command-line/</link>
		<comments>http://alexcline.net/2012/01/12/sending-html-email-from-the-linux-command-line/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 17:27:49 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=503</guid>
		<description><![CDATA[Just a little tip that I found useful for a project I was working on today. I had to send the results of a MySQL query via email. Since the results are printed in a table, the formatting in the email had to use a monospace font. The easiest way to use a monospace font [...]]]></description>
			<content:encoded><![CDATA[<p>Just a little tip that I found useful for a project I was working on today.  I had to send the results of a MySQL query via email.  Since the results are printed in a table, the formatting in the email had to use a monospace font.  The easiest way to use a monospace font in an email is to enable HTML and wrap everything in a &lt;pre> tag.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
mailto=email@awesome.tld
subject=&quot;The awesome subject line of your email message&quot;
(
  echo &quot;Subject: $subject&quot;
  echo &quot;MIME-Version: 1.0&quot;
  echo &quot;Content-Type: text/html&quot;
  echo &quot;Content-Disposition: inline&quot;
  echo &quot;&lt;html&gt;&lt;body&gt;&lt;pre&gt;&quot;
  mysql db -uawesome -pawesomer --table &lt; some-sql-to-run.sql
  echo &quot;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&quot;
) | /usr/sbin/sendmail $mailto
</pre>
<p>The output looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
To: email@email.tld
From: system@awesome.tld
Subject: The awesome subject line of your email message
+----------+----------+----------+
| Column 1 | Column 2 | Column 3 |
+----------+----------+----------+
| Apples   |        2 |    14.00 |
| Oranges  |        2 |   0.5000 |
+----------+----------+----------+</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/01/12/sending-html-email-from-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop PIPA/SOPA!</title>
		<link>http://alexcline.net/2012/01/05/stop-pipasopa/</link>
		<comments>http://alexcline.net/2012/01/05/stop-pipasopa/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 20:51:45 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Interesting Links]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Site updates]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=493</guid>
		<description><![CDATA[Happy New Year everyone! I just got notifications that all my domains were successfully transferred to my new registrar. I&#8217;m now using DynaDot which is a vocal opponent of SOPA. The reason I transferred was partially to promote anti-SOPA messages and also for privacy reasons. Hopefully I&#8217;ll be much happier with my new service. Check [...]]]></description>
			<content:encoded><![CDATA[<p>Happy New Year everyone!</p>
<p>I just got notifications that all my domains were successfully transferred to my new registrar.  I&#8217;m now using DynaDot which is a vocal opponent of SOPA.  The reason I transferred was partially to promote anti-SOPA messages and also for privacy reasons.  Hopefully I&#8217;ll be much happier with my new service.</p>
<p>Check out the video below for information about PIPA/SOPA and why you should join the fight to oppose these proposed laws.</p>
<p><iframe src="http://player.vimeo.com/video/31100268?title=0&#038;byline=0&#038;portrait=0" width="640" height="360" frameborder="0" webkitAllowFullScreen allowFullScreen class="aligncenter"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/01/05/stop-pipasopa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reconfiguring Network Interfaces in CentOS/RHEL Systems Cloned with vCenter</title>
		<link>http://alexcline.net/2011/11/15/reconfiguring-network-interfaces-in-centosrhel-systems-cloned-with-vcenter/</link>
		<comments>http://alexcline.net/2011/11/15/reconfiguring-network-interfaces-in-centosrhel-systems-cloned-with-vcenter/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 17:28:43 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[eth0]]></category>
		<category><![CDATA[mac address]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=482</guid>
		<description><![CDATA[While cloning CentOS VMs in our environment, I ran into a problem where eth0 wouldn&#8217;t start up. When trying to start the networking service, the following error popped up: The reason this error occurs is because networking adapters in cloned VMs are assigned unique MAC addresses, so they don&#8217;t conflict with the parent VM. During [...]]]></description>
			<content:encoded><![CDATA[<p>While cloning CentOS VMs in our environment, I ran into a problem where eth0 wouldn&#8217;t start up.  When trying to start the networking service, the following error popped up:</p>
<pre class="brush: plain; title: ; notranslate">Bringing up interface eth0: Device eth0 does not seem to be preset, delaying initialization.      [FAILED]</pre>
<p>The reason this error occurs is because networking adapters in cloned VMs are assigned unique MAC addresses, so they don&#8217;t conflict with the parent VM.  During OS installation, the installer detects the network adapter and udev configures the mapping between the device eth0 and the MAC address.  When the MAC address changes udev thinks the device is missing.</p>
<p>To fix this, we need to update udev&#8217;s mapping rules to point the eth0 definition to the device with the correct MAC address.  Open the file /etc/udev/rules.d/70-persistent-net.rules.  You should see something similar to what is below:</p>
<pre class="brush: plain; title: ; notranslate"># This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:50:56:9c:00:16&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:50:56:9c:00:18&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;</pre>
<p>As you can see there are two PCI ethernet adapters present.  The original one from the parent VM (MAC: 9c:00:16) and the new one from the current VM (MAC: 9c:00:18).  To fix the issue you need to change the eth0 device definition to have the correct MAC address (9c:00:18) and remove the eth1 device.  Your resulting file will look like so:</p>
<pre class="brush: plain; title: ; notranslate"># This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:50:56:9c:00:18&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;</pre>
<p>You&#8217;ll also want to update the /etc/sysconfig/network-scripts/ifcfg-eth0 file to reflect the correct MAC address.  Then, after a quick system restart your eth0 adapter will be back up.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/11/15/reconfiguring-network-interfaces-in-centosrhel-systems-cloned-with-vcenter/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

