<?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>Eric Mason . net &#187; sysadmin</title>
	<atom:link href="http://ericmason.net/tag/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericmason.net</link>
	<description>Stuff</description>
	<lastBuildDate>Mon, 07 Jun 2010 18:54:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apt-get upgrade wants to replace my compiled packages.</title>
		<link>http://ericmason.net/2009/03/apt-get-upgrade-wants-to-replace-my-compiled-packages/</link>
		<comments>http://ericmason.net/2009/03/apt-get-upgrade-wants-to-replace-my-compiled-packages/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 20:16:40 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[ffmpeg]]></category>

		<guid isPermaLink="false">http://ericmason.net/?p=102</guid>
		<description><![CDATA[I was getting some messages from my daily apt-get upgrade script telling me some of my ffmpeg debs needed to be upgraded.  Since I had recompiled ffmpeg from the source debs with different options, I re-ran apt-get source ffmpeg to get the latest source.   When nothing downloaded, I checked the latest version with apt-cache [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting some messages from my daily apt-get upgrade script telling me some of my ffmpeg debs needed to be upgraded.  <span id="more-102"></span>Since I had recompiled ffmpeg from the source debs with different options, I re-ran <strong>apt-get source ffmpeg</strong> to get the latest source.   When nothing downloaded, I checked the latest version with apt-cache and found it matched the version I have installed.  Off to Google I went and found <a href="http://www.mail-archive.com/deity@lists.debian.org/msg04239.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mail-archive.com');">this thread</a> from 9 years ago saying the bogus upgrade messages are normal and I had to increment the version number. </p>
<p>I still want to be notified when new versions come out (via my daily upgrade script) so I can recompile it, so I updated the version as little as possible by adding an &#8220;a&#8221; to the end of it.  </p>
<p>In the source directory, I edited <strong>debian/changelog </strong>.  The first line said</p>
<p> </p>
<blockquote><p>ffmpeg (3:0.cvs20070307-5ubuntu7.3) hardy-security; urgency=low</p></blockquote>
<div>So I changed it to </div>
<div>
<blockquote>
<div>ffmpeg (3:0.cvs20070307-5ubuntu7.3<strong>a</strong>) hardy-security; urgency=low</div>
</blockquote>
<div>Then I ran <strong>fakeroot debian/rules binary </strong>and installed the resulting packages.  Now apt-get upgrade tells me I have nothing to upgrade.  As long as the ffmpeg package maintainer doesn&#8217;t use 3:0.cvs20070307-5ubuntu7.3a as the new version number, I&#8217;ll still know when a new release comes out. </div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ericmason.net/2009/03/apt-get-upgrade-wants-to-replace-my-compiled-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOAP4R and SSL: unable to get local issuer certificate</title>
		<link>http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/</link>
		<comments>http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 13:16:40 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[soap]]></category>

		<guid isPermaLink="false">http://ericmason.net/?p=55</guid>
		<description><![CDATA[After enabling SSL on a couple of apps, I got an email from one of my cron jobs telling me my SOAP API was no longer working.  (This is why you always want to have an entry in /etc/aliases forwarding root&#8217;s email to an account you will read)
The error message was &#8220;unable to get local [...]]]></description>
			<content:encoded><![CDATA[<p>After enabling SSL on a couple of apps, I got an email from one of my cron jobs telling me my SOAP API was no longer working.  (This is why you always want to have an entry in /etc/aliases forwarding root&#8217;s email to an account you will read)</p>
<p>The error message was &#8220;unable to get local issuer certificate.&#8221;  I thought, no big deal, there must be an easy way to get SOAP4R to find all the root CA certificates.  Unfortunately it took a while searching Google to find the right answer, so I&#8217;m posting it here to make it easier for the next person (which just might be me next week).</p>
<p><span id="more-55"></span></p>
<p>It turns out SOAP4R will read a file called <strong>&#8220;soap/property&#8221;</strong> in your ruby library path (which can usually be the directory your app is in).  You can place certain configuration options in this file to control how SOAP4R behaves.  In this case, I needed to add<br />
<code><br />
client.protocol.http.ssl_config.ca_file=/etc/ssl/certs/ca-certificates.crt<br />
</code></p>
<p>This fixed the &#8220;unable to get local issuer certificate&#8221; error right away.</p>
<p>There was another problem though; it was complaining about the hostname not matching the certificate.  Since I&#8217;m using a wildcard certificate, I assume this means OpenSSL doesn&#8217;t respect wildcard certificates.  I grudgingly added this to soap/property file<br />
<code><br />
client.protocol.http.ssl_config.verify_mode=OpenSSL::SSL::VERIFY_NONE<br />
</code><br />
And it&#8217;s fine now.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericmason.net/2008/10/soap4r-and-ssl-unable-to-get-local-issuer-certificate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multiple virtual hosts using SSL on the same IP and Port</title>
		<link>http://ericmason.net/2008/09/multiple-virtual-hosts-using-ssl-on-the-same-ip-and-port/</link>
		<comments>http://ericmason.net/2008/09/multiple-virtual-hosts-using-ssl-on-the-same-ip-and-port/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 03:08:12 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://ericmason.net/?p=50</guid>
		<description><![CDATA[Tonight I decided to set up SSL on two internal web apps I&#8217;ve been running for a while.  I have a wildcard certificate *.stockpr.com just for this purpose.  Each app was originally running on a separate hostname on a single IP address on port 80.  
After I started setting up SSL, I [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I decided to set up SSL on two internal web apps I&#8217;ve been running for a while.  I have a wildcard certificate *.stockpr.com just for this purpose.  Each app was originally running on a separate hostname on a single IP address on port 80.  </p>
<p>After I started setting up SSL, I realized that I might run into trouble because <a href="http://httpd.apache.org/docs/1.3/vhosts/name-based.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/httpd.apache.org');">Apache has always said</a> you can&#8217;t combine NameVirtualHost and SSL.  The reason for this is that the SSL session is established before the HTTP headers are sent.  Since NameVirtualHost relies on the HTTP Host header, which is unavailable since it hasn&#8217;t yet been sent at the time SSL is being negotiated, Apache can only use a single SSL cert per combination of IP and port.<br />
<span id="more-50"></span><br />
So my thought was this should technically not be a problem since both of my hostnames are under the same domain and I have that fancy wildcard certificate for <strong>both</strong> virtual hosts.  I thought Apache just might be cool enough to send the first certificate it finds, but still respect the HTTP Host header and send the request to the right virtual host.  </p>
<p>Guess what&#8230; Apache is indeed that cool.  I now have x.stockpr.com and y.stockpr.com on the same IP and port with two different virtual hosts, sharing the same certificate.  </p>
<p>Won&#8217;t exactly revolutionize web hosting, but it definitely made my <del datetime="2008-10-01T02:54:20+00:00">day</del> night go a little easier.  (Of course if you read my <a href="http://ericmason.net/2008/09/amazon-ec2-and-4gb-seg-fixup/" >last post</a>, something else more than made up for it)</p>
]]></content:encoded>
			<wfw:commentRss>http://ericmason.net/2008/09/multiple-virtual-hosts-using-ssl-on-the-same-ip-and-port/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazon EC2 and &#8220;4gb seg fixup&#8221;</title>
		<link>http://ericmason.net/2008/09/amazon-ec2-and-4gb-seg-fixup/</link>
		<comments>http://ericmason.net/2008/09/amazon-ec2-and-4gb-seg-fixup/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 02:49:52 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://ericmason.net/?p=48</guid>
		<description><![CDATA[Tonight I spent two hours banging on an EC2 instance that suddenly went awry.  I was adding SSL to a couple of internal applications we host on this instance when my &#8220;apache2ctl configtest&#8221; command hung.  I tried all sorts of things and finally noticed there were tons of entries in /var/log/messages referencing &#8220;4gb [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I spent two hours banging on an EC2 instance that suddenly went awry.  I was adding SSL to a couple of internal applications we host on this instance when my &#8220;apache2ctl configtest&#8221; command hung.  I tried all sorts of things and finally noticed there were tons of entries in /var/log/messages referencing &#8220;4gb seg fixup&#8221; like this:<br />
<span id="more-48"></span><br />
<code>kernel: printk: 16 messages suppressed.<br />
kernel: 4gb seg fixup, process sh (pid 21236), cs:ip 73:00a7b240<br />
last message repeated 8 times<br />
kernel: printk: 353387 messages suppressed.</code></p>
<p>Google revealed that I&#8217;m not the first to run into this problem with an EC2 instance.  Several posts said to install the Xen version of libc<br />
<code><br />
apt-get install libc6-xen <br />
</code><br />
and do this:<br />
<code><br />
echo "hwcap 0 nosegneg" &gt; /etc/ld.so.conf.d/libc6-xen.conf; ldconfig<br />
</code><br />
And then reboot.</p>
<p>This seems to have fixed it, but I&#8217;m wondering why this was either not included in the Ubuntu AMI I&#8217;m using or somehow got undone.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericmason.net/2008/09/amazon-ec2-and-4gb-seg-fixup/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bundling EC2 Instances and EBS</title>
		<link>http://ericmason.net/2008/09/bundling-ec2-instances-and-ebs/</link>
		<comments>http://ericmason.net/2008/09/bundling-ec2-instances-and-ebs/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 14:52:36 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[amazon aws]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://ericmason.net/?p=41</guid>
		<description><![CDATA[As I mentioned in the last post, I&#8217;m working on hosting email accounts on Amazon EC2. I am experimenting with mounting /var on an EBS volume so my database, logs, etc. will survive the failure of an instance.  The idea is to be able to start a new instance, attach the EBS volume containing the /var [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in the last post, I&#8217;m working on hosting email accounts on <a href="http://aws.amazon.com/ec2" onclick="javascript:pageTracker._trackPageview('/outbound/article/aws.amazon.com');">Amazon EC2</a>. I am experimenting with mounting /var on an <a href="http://aws.amazon.com/ebs" onclick="javascript:pageTracker._trackPageview('/outbound/article/aws.amazon.com');">EBS</a> volume so my database, logs, etc. will survive the failure of an instance.  The idea is to be able to start a new instance, attach the EBS volume containing the /var partition, and keep going where the previous instance left off.  </p>
<p>The first time I tried to bundle the volume I noticed it was taking a very long time.  I had incorrectly assumed that ec2-bundle-vol would automatically exclude any EBS volumes.  Instead, it only excludes a static list of directories, so I had to add the EBS volume (/mail) to the exclusion list.  </p>
<p><span id="more-41"></span></p>
<p>Here are the commands I used to bundle the volume:</p>
<p><code>ec2-bundle-vol -k /mnt/aws-config/pk-xxxxx.pem   \<br />
-c /mnt/aws-config/cert-xxxx.pem  \<br />
-u xxxx-xxxx-xxxx -d /mnt/bundle \<br />
-p image-name-20080924<br />
-e /mail </code></p>
<p><code> </code></p>
<p><code>ec2-upload-bundle -b ae-ami \<br />
-m /mnt/bundle/image-name-20080924.manifest.xml \<br />
-a xxxx -s xxxx</code></p>
<p><code>ec2reg bucket-name/image-name-20080924.manifest.xml</p>
<p></code></p>
<p> </p>
<p> </p>
<p>The next step will be to figure out how to set up the AMI so it will have a swap partition when it boots up in a new instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericmason.net/2008/09/bundling-ec2-instances-and-ebs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon EBS Snapshot Backups with LVM and XFS</title>
		<link>http://ericmason.net/2008/09/amazon-ebs-snapshot-backups-with-lvm-and-xfs/</link>
		<comments>http://ericmason.net/2008/09/amazon-ebs-snapshot-backups-with-lvm-and-xfs/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 13:53:21 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon aws]]></category>
		<category><![CDATA[ebs]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://ericmason.net/?p=32</guid>
		<description><![CDATA[I&#8217;m working on setting up a server to host email accounts on Amazon EC2 using the newly released Elastic Block Storage.  My benchmarking has shown XFS to be better than ReiserFS for this task &#8211; and presumably EXT3, but I ran out of patience.
Since I will need to grow the filesystem in the future, I am using [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on setting up a server to host email accounts on <a href="http://aws.amazon.com/ec2" onclick="javascript:pageTracker._trackPageview('/outbound/article/aws.amazon.com');">Amazon EC2</a> using the newly released Elastic Block Storage.  My benchmarking has shown XFS to be better than ReiserFS for this task &#8211; and presumably EXT3, but I ran out of patience.</p>
<p>Since I will need to grow the filesystem in the future, I am using LVM.  This also allows me to break up the logical volume into separate EBS volumes, which should increase random access performance.  <span id="more-32"></span></p>
<p>Right now for testing, I have a single LVM volume group and logical volume comprised of three &#8220;physical&#8221; EBS volumes of 100GB each. </p>
<p>Although EBS&#8217;s snapshot command completes quickly and the snapshots are consistent as of the time the command is run (there is a pause in access to the filesystem while the snapshot starts), the use of multiple EBS volumes complicates matters.  In order to get a consistent snapshot, the whole filesystem needs to be stopped while a snapshot is begun on each of the underlying EBS volumes.  Conveniently XFS has a &#8220;freeze&#8221; command to flush the whole filesystem and prevent writes until it is unfrozen.</p>
<p>Here&#8217;s my current snapshot script:</p>
<pre>#!/bin/bash

SNAP_CMD=/usr/local/ec2/bin/ec2-create-snapshot
MOUNT_POINT=/mail
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.06
export EC2_CERT=/mnt/aws-config/cert-XXXX.pem
export EC2_HOME=/usr/local/ec2
export EC2_PRIVATE_KEY=/mnt/aws-config/pk-XXXX.pem

vols=("vol-xxxx" "vol-xxxx" "vol-xxxx")
i=0
xfs_freeze -f $MOUNT_POINT

for vol in ${vols[@]}
do
        $SNAP_CMD $vol &#038;
        pids[i]=$!
        let i+=1
done

for pid in ${pids[@]}
do
        wait $pid
done

xfs_freeze -u $MOUNT_POINT
</pre>
<div><span><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://ericmason.net/2008/09/amazon-ebs-snapshot-backups-with-lvm-and-xfs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
