<?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>Racker Hacker &#187; Posts</title> <atom:link href="http://rackerhacker.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" /><link>http://rackerhacker.com</link> <description>Words of wisdom from a server administrator</description> <lastBuildDate>Tue, 09 Mar 2010 01:51:39 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Rackspace Cloud Tech Podcast Episode 2</title><link>http://rackerhacker.com/2010/03/08/rackspace-cloud-tech-podcast-episode-2/</link> <comments>http://rackerhacker.com/2010/03/08/rackspace-cloud-tech-podcast-episode-2/#comments</comments> <pubDate>Tue, 09 Mar 2010 01:51:39 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[cloud]]></category> <category><![CDATA[security]]></category> <category><![CDATA[sysadmin]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1295</guid> <description><![CDATA[ I participated in a podcast for the Rackspace Cloud with Robert Collazo last week.  We covered some important topics including network security and convenient deployment tools. &#169;2010 Racker Hacker. All Rights Reserved..]]></description> <content:encoded><![CDATA[<p><span class="youtube"><object width="600" height="360"><param name="movie" value="http://www.youtube.com/v/QC4KxSbWKEQ&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D18" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/QC4KxSbWKEQ&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D18" type="application/x-shockwave-flash" allowfullscreen="true" width="600" height="360" ></embed><param name="wmode" value="transparent" /></object></span><a href="http://www.youtube.com/watch?v=QC4KxSbWKEQ&fmt=18"><img src="http://img.youtube.com/vi/QC4KxSbWKEQ/default.jpg" width="130" height="97" border=0></a></p><p>I participated in a <a href="http://www.rackspacecloud.com/blog/2010/03/05/tech-cloud-cast-episode-2/">podcast</a> for the <a href="http://rackspacecloud.com/">Rackspace Cloud</a> with <a href="http://twitter.com/rcollazo">Robert Collazo</a> last week.  We covered some important topics including network security and convenient deployment tools.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/03/08/rackspace-cloud-tech-podcast-episode-2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Sticky shift key with synergy in Fedora 12</title><link>http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/</link> <comments>http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/#comments</comments> <pubDate>Thu, 04 Mar 2010 02:44:12 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[fedora]]></category> <category><![CDATA[gdm]]></category> <category><![CDATA[keyboard]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[synergy]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1274</guid> <description><![CDATA[My synergy setup at work is relatively simple.  I have a MacBook Pro running Snow Leopard that acts as a synergy server and a desktop running Fedora 12 as a synergy client.  On the Mac, I use SynergyKM to manage the synergy server.  The Fedora box uses my gdm strategy for starting [...]]]></description> <content:encoded><![CDATA[<p>My synergy setup at work is relatively simple.  I have a MacBook Pro running Snow Leopard that acts as a synergy server and a desktop running Fedora 12 as a synergy client.  On the Mac, I use SynergyKM to manage the synergy server.  The Fedora box uses <a href="http://rackerhacker.com/2008/07/30/automatically-starting-synergy-in-gdm-in-ubuntufedora/">my gdm strategy</a> for starting synergy at the login screen and in GNOME.</p><p>I kept having an issue where the shift key would become stuck regardless of the settings I set for the client or server.  The <code> halfDuplexCapsLock</code> <a href="http://synergy2.sourceforge.net/configuration.html">configuration option</a> had no effect.  After installing <code>xkeycaps</code>, I found that both shift keys were getting stuck if I brought the mouse back and forth between Mac and Fedora twice.</p><p>I decided to run a test.  I started the client with the debug argument and moved the mouse to my Fedora box.  At that point, I pressed the letter 'a' and saw:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">DEBUG1: CXWindowsKeyState.cpp,195:   032 (00000000) up
DEBUG1: CXWindowsKeyState.cpp,195:   03e (00000000) up
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   032 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   03e (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) up</pre></div></div><p>I brought the mouse back to the Mac and then back to Fedora.  I pressed 'a' again and saw:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) up
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) down
DEBUG1: CXWindowsKeyState.cpp,195:   026 (00000000) up</pre></div></div><p>After dumping the keyboard layout with <code>xmodmap</code> I found the keys that corresponded with the key numbers:</p><ul><li>032 - Left shift</li><li>03e - Right shift</li><li>026 - a</li></ul><p>If I tapped the left shift, I could clear the key press, but I couldn't clear the right shift key (it was stuck down according to Fedora's X server).  When I hooked up a physical keyboard and mouse, I was able to use them normally without any keybinding problems.</p><p><span style="font-weight: bold; color: #008000;">The root cause:</span> When synergy started in <code>/etc/gdm/PreSession/Default</code> after the gdm login, the keyboard layout wasn't set up properly.  The X server was setting up the keyboard layout later in the startup process and this confusion caused the shift keys to get stuck.  Fedora 12 uses evdev to probe for keyboards during X's startup and eventually settles on a default layout if none are explicitly defined.</p><p><span style="font-weight: bold; color: #008000;">The fix:</span> I added the synergy startup to the GNOME startup items and it works flawlessly.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/03/03/sticky-shift-key-with-synergy-in-fedora-12/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Private network interfaces: the forgotten security hole</title><link>http://rackerhacker.com/2010/03/01/private-network-interfaces-the-forgotten-security-hole/</link> <comments>http://rackerhacker.com/2010/03/01/private-network-interfaces-the-forgotten-security-hole/#comments</comments> <pubDate>Tue, 02 Mar 2010 00:55:07 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[cloud]]></category> <category><![CDATA[command line]]></category> <category><![CDATA[encryption]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[network]]></category> <category><![CDATA[security]]></category> <category><![CDATA[ssl]]></category> <category><![CDATA[sysadmin]]></category> <category><![CDATA[tcpwrappers]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1263</guid> <description><![CDATA[Regardless of the type of hosting you're using - dedicated or cloud - it's important to take network interface security seriously.  Most often, threats from the internet are the only ones mentioned.  However, if you share a private network with other customers, you have just as much risk on that interface. Many cloud providers [...]]]></description> <content:encoded><![CDATA[<p>Regardless of the type of hosting you're using - dedicated or cloud - it's important to take network interface security seriously.  Most often, threats from the internet are the only ones mentioned.  However, if you share a private network with other customers, you have just as much risk on that interface.</p><p>Many cloud providers allow you access to a private network environment where you can exchange data with other instances or other services offered by the provider.  The convenience of this access comes with a price: other instances can access your instance on the private network just as easily as they could on the public interface.</p><p>Here are some security tips for your private interfaces:</p><p><strong>Disable the private interface</strong><br /> This one is pretty simple.  If you have only one instance or server, and you don't need to communicate privately with any other instances, just disable the interface.  Remember to configure your networking scripts to leave the interface disabled after reboots.</p><p><strong>Use packet filtering</strong><br /> The actual mechanism will vary based on your operating system, but filtering packets is the one of the simplest ways to secure your private interface.  You can take some different approaches with them, but I find the easiest method is to allow access from your other instances and reject all other traffic.</p><p>For additional security, you can limit access based on ports as well as source IP addresses.  This could prevent an attacker from having easy access to your other instances if they're able to break into one of them.</p><p><strong>Configure your daemons to listen on the appropriate interfaces</strong><br /> If there are services that don't need to be listening on the private network, don't allow them to listen on your private interface.  For example, MySQL might need to listen on the private interface so the web server can talk to it, but apache won't need to listen on the private interface.  This reduces the profile of your instance on the private network and makes it a less likely target for attack.</p><p><strong>Use hosts.allow and hosts.deny</strong><br /> Many new systems administrators forget about how handy tcpwrappers can be for limiting access.  If your firewall is down in error, host.allow and hosts.deny could be an extra layer of protection.  It's important to ensure that the daemons you are attempting to control are build with tcpwrappers support.  Daemons like sshd support it, but apache and MySQL do not.</p><p><strong>Encrypt all traffic on the private network</strong><br /> Just because it's called a "private" network doesn't mean that your traffic can traverse the network privately.  You should always err on the side of caution and encrypt all traffic traversing the private network.  You can use ssh tunnels, stunnel, or the built-in SSL features found in most daemons.</p><p>This also brings up an important point: <strong>you should know how your provider's private network works</strong>.  Are there safeguards to prevent sniffing?  Could someone else possibly ARP spoof your instance's private IP addresses?  Is your private network's subnet shared among many customers?</p><p>With all of that said, it's also very important to have proper change control policies so that administrators working after you are fully aware of the security measures in place and why they are important.  This will ensure that all of the administrators on your instances will understand the security of the system and they should be able to make sensible adjustments later for future functionality.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/03/01/private-network-interfaces-the-forgotten-security-hole/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>System Administration Inspiration: If it&#039;s broken, break it a little more</title><link>http://rackerhacker.com/2010/02/28/system-administration-inspiration-if-its-broken-break-it-a-little-more/</link> <comments>http://rackerhacker.com/2010/02/28/system-administration-inspiration-if-its-broken-break-it-a-little-more/#comments</comments> <pubDate>Sun, 28 Feb 2010 16:47:16 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[general advice]]></category> <category><![CDATA[sysadmin]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1121</guid> <description><![CDATA[Earlier this year, I started a series of posts to encourage systems administrators to refine their troubleshooting abilities.  This is the second post in that series. Almost every system administrator has found themselves in a situation where they're confronted with a server which has a problem.  However, if you're not the primary administrator for [...]]]></description> <content:encoded><![CDATA[<p>Earlier this year, <a href="http://rackerhacker.com/2010/01/03/a-new-year-system-administrator-inspiration/">I started a series of posts</a> to encourage systems administrators to refine their troubleshooting abilities.  This is the second post in that series.</p><p>Almost every system administrator has found themselves in a situation where they're confronted with a server which has a problem.  However, if you're not the primary administrator for the server, you may not always know what has changed recently or you may not be aware of changes in the server's environment.  In these situations, if the fix isn't obvious, try going through these steps:</p><p><strong>Localize the problem to a specific daemon or service</strong><br /> In the case of a problem where a website isn't loading properly, is it a problem with the web server itself?  Could something other than the actual web server daemon be having an issue?</p><p>As an example, consider a ruby on rails application which runs through apache's mod_proxy_balancer and queries data from MySQL.  If any of those individual puzzle pieces were not functioning correctly, you'd get a different result.  A downed MySQL instance could make the application throw errors or appear to be unresponsive.  If the mongrel cluster had failed, apache might be returning internal server errors.  Your browser might return a connection refused if apache was down.  These are all relatively easy to determine.</p><p>What if you are unable to determine which daemon is causing the problem?</p><p><strong>If it's broken, break it a little more</strong><br /> Let's say that you've reviewed the process list and all of the appropriate daemons appear to be running.  However, the website is still not loading properly.  What do you do?  Bring down a service and try again.  Did something change? Did a new error appear? If not, bring that daemon back up and try taking down one of the other ones.</p><p>I've also had some good results by making small adjustments in the web server's configuration file.  If you have a virtual host that isn't returning the correct data, try commenting it out temporarily.  For rewrite rules, try removing them temporarily or strip them down to a more basic form.  Test again, and then begin adding lines back incrementally.  As much as a single period or quotation mark can derail a perfectly good set of rewrite rules.</p><p>In short - try to think outside the box when you're troubleshooting a difficult issue on an unfamiliar system.  Always remember to back up your configurations before making changes and ensure your daemons will start properly if you bring them down.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/02/28/system-administration-inspiration-if-its-broken-break-it-a-little-more/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>MySQL: The total number of locks exceeds the lock table size</title><link>http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/</link> <comments>http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/#comments</comments> <pubDate>Tue, 16 Feb 2010 18:00:29 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[configuration]]></category> <category><![CDATA[database]]></category> <category><![CDATA[innodb]]></category> <category><![CDATA[memory]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[optimization]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1173</guid> <description><![CDATA[If you're running an operation on a large number of rows within a table that uses the InnoDB storage engine, you might see this error: ERROR 1206 (HY000): The total number of locks exceeds the lock table size MySQL is trying to tell you that it doesn't have enough room to store all of the row locks [...]]]></description> <content:encoded><![CDATA[<p>If you're running an operation on a large number of rows within a table that uses the InnoDB storage engine, you might see this error:</p><p><code>ERROR 1206 (HY000): The total number of locks exceeds the lock table size</code></p><p>MySQL is trying to tell you that it doesn't have enough room to store all of the row locks that it would need to execute your query.  The only way to fix it for sure is to adjust <code>innodb_buffer_pool_size</code> and restart MySQL.  By default, this is set to only 8MB, which is too small for anyone who is using InnoDB to do anything.</p><p><strong>If you need a temporary workaround,</strong> reduce the amount of rows you're manipulating in one query.  For example, if you need to delete a million rows from a table, try to delete the records in chunks of 50,000 or 100,000 rows.  If you're inserting many rows, try to insert portions of the data at a single time.</p><p>Further reading:</p><ul><li><a href="http://bugs.mysql.com/bug.php?id=15667">MySQL Bug #15667 - The total number of locks exceeds the lock table size</a></li><li><a href="http://mrothouse.wordpress.com/2006/10/20/mysql-error-1206/">MySQL Error 1206 &raquo; Mike R's Blog</a></li></ul><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/02/16/mysql-the-total-number-of-locks-exceeds-the-lock-table-size-2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Wordpress + W3 Total Cache + MaxCDN How-To</title><link>http://rackerhacker.com/2010/02/13/wordpress-w3-total-cache-maxcdn/</link> <comments>http://rackerhacker.com/2010/02/13/wordpress-w3-total-cache-maxcdn/#comments</comments> <pubDate>Sun, 14 Feb 2010 03:56:30 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[cdn]]></category> <category><![CDATA[dns]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[optimization]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[wordpress]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1175</guid> <description><![CDATA[It's no secret that I'm a big fan of Wordpress as a blog and CMS platform.  While it does have its problems, it's relatively simple to set up, it's extensible, and -- when properly configured -- it has great performance.  The WP Super Cache plugin has been a staple on my Wordpress blogs [...]]]></description> <content:encoded><![CDATA[<p>It's no secret that I'm a big fan of <a href="http://wordpress.org/">Wordpress</a> as a blog and CMS platform.  While it does have its problems, it's relatively simple to set up, it's extensible, and -- when properly configured -- it has great performance.  The <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> plugin has been a staple on my Wordpress blogs for quite some time and it has solved almost all of my performance problems.</p><p>However, when you load up quite a few plugins or a heavy theme, the performance will dip due to the increased number of stylesheets, javascript files, and images.  You can compress and combine the stylesheets and javascript to decrease load times, but this may not get the performance to a level you like.</p><p>I was in this situation and I found a great solution: the <a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a> plugin and the <a href="http://www.maxcdn.com/">MaxCDN</a> service.</p><p>To get started, <a href="http://www.maxcdn.com/">visit MaxCDN's site</a> and set up an account.  Their current promotion gives you 1TB of CDN bandwidth for one year for $10 (regularly $99).  Once you sign up, do the following:</p><ul><li>Click <strong>Manage Zones</strong></li><li>Click <strong>Create pull zone</strong></li></ul><p>At this point, you'll see a list of form fields to complete:</p><ul><li>Enter an alias for the pull zone name</li><li>The origin server URL is the URL that's normally used to access your site (i.e. rackerhacker.com)</li><li>The custom CDN domain is the URL you want to use for your CDN (i.e. cdn.rackerhacker.com)</li><li>The label can be anything you'd like to use to remember which zone is which</li><li>Enabling compression is generally a good idea</li></ul><p>Once you save the zone, MaxCDN will give you a new domain name.  You'll want to create a CNAME record that points from your CDN URL (for me, that's cdn.rackerhacker.com) to the really long URL that MaxCDN provides.</p><p><strong style="color: #D42020;">STOP HERE:</strong> Ensure that all of your DNS servers are replying with the CNAME record before you continue with the W3 Total Cache installation and CDN setup.  If you proceed without waiting for that, some of your blog's visitors will get errors when they try to load content via your CDN domain.</p><p>You're ready for W3 Total Cache now.  Install the plugin within your Wordpress installation and activate it.  Hop into the settings for the plugin and make these adjustments:</p><ul><li>Enable <strong>Page Caching</strong> and set it to <strong>Disk (enhanced)</strong></li><li>Enable <strong>Minify</strong> and set it to <strong>Disk</strong></li><li>Enable <strong>Database Caching</strong> and set it to <strong>Disk</strong></li><li>Leave the CDN disabled for now, but flip the <strong>CDN Type</strong> to <strong>Origin Pull (Mirror)</strong></li><li>Press <strong>Save changes</strong></li></ul><p>Click <strong>CDN Settings</strong> at the top of the page and configure the CDN:</p><ul><li>Enter your CDN domain (for me, it's cdn.rackerhacker.com) in the top form field</li><li>Leave the other options as they are by default and click <strong>Save changes</strong></li></ul><p>W3 Total Cache should prompt you to clear out your page cache, and that would be recommended at this step.  If you fully reload your blog's main page in your browser (may require you to hold SHIFT while you click reload/refresh) and check the page source, you should see your CDN URL appear for some of the javascript or CSS files.</p><p>You may discover that some CSS files, stylesheets, or images aren't being loaded via the CDN automatically.  Luckily, that's an easy fix.  Under the <strong>Minify Settings</strong> section of the W3 Total Cache plugin settings, scroll to the very bottom.  Add in your javascript or CSS files via the form fields at the bottom and the plugin should handle the minifying (is that even a word?) and the CDN URL rewriting for you.</p><p>Further reading:</p><ul><li><a href="http://www.maxcdn.com/wordpress-cdn-module.php">MaxCDN Wordpress Integration Overview</a></li><li><a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache plugin page at wordpress.org</a></li><li><a href="http://www.w3-edge.com/wordpress-plugins/w3-total-cache/">W3 Total Cache main site</a></li></ul><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/02/13/wordpress-w3-total-cache-maxcdn/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>MySQL: The total number of locks exceeds the lock table size</title><link>http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/</link> <comments>http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/#comments</comments> <pubDate>Fri, 29 Jan 2010 13:12:21 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[command line]]></category> <category><![CDATA[database]]></category> <category><![CDATA[innodb]]></category> <category><![CDATA[memory]]></category> <category><![CDATA[mysql]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1156</guid> <description><![CDATA[This problem has cropped up for me a few times, but I've always forgotten to make a post about it.  If you're working with a large InnoDB table and you're updating, inserting, or deleting a large volume of rows, you may stumble upon this error: ERROR 1206 (HY000): The total number of locks exceeds the [...]]]></description> <content:encoded><![CDATA[<p>This problem has cropped up for me a few times, but I've always forgotten to make a post about it.  If you're working with a large InnoDB table and you're updating, inserting, or deleting a large volume of rows, you may stumble upon this error:</p><p><code>ERROR 1206 (HY000): The total number of locks exceeds the lock table size</code></p><p>InnoDB stores its lock tables in the main buffer pool.  This means that the number of locks you can have at the same time is limited by the <code>innodb_buffer_pool_size</code> variable that was set when MySQL was started.  By default, MySQL leaves this at 8MB, which is pretty useless if you're doing anything with InnoDB on your server.</p><p>Luckily, the fix for this issue is very easy: adjust <code>innodb_buffer_pool_size</code> to a more reasonable value.  However, that fix does require a restart of the MySQL daemon.  There's simply no way to adjust this variable on the fly (with the current stable MySQL versions as of this post's writing).</p><p>Before you adjust the variable, make sure that your server can handle the additional memory usage.  The <code>innodb_buffer_pool_size</code> variable is a server wide variable, not a per-thread variable, so it's shared between all of the connections to the MySQL server (like the query cache).  If you set it to something like 1GB, MySQL won't use all of that up front.  As MySQL finds more things to put in the buffer, the memory usage will gradually increase until it reaches 1GB.  At that point, the oldest and least used data begins to get pruned when new data needs to be present.</p><p><strong>So, you need a workaround without a MySQL restart?</strong></p><p>If you're in a pinch, and you need a workaround, break up your statements into chunks.  If you need to delete a million rows, try deleting 5-10% of those rows per transaction.  This may allow you to sneak under the lock table size limitations and clear out some data without restarting MySQL.</p><p>To learn more about InnoDB's parameters, visit the <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html">MySQL documentation</a>.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/01/29/mysql-the-total-number-of-locks-exceeds-the-lock-table-size/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Switching between audible and visual bells in screen</title><link>http://rackerhacker.com/2010/01/21/switching-between-audible-and-visual-bells-in-screen/</link> <comments>http://rackerhacker.com/2010/01/21/switching-between-audible-and-visual-bells-in-screen/#comments</comments> <pubDate>Thu, 21 Jan 2010 14:37:09 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[command line]]></category> <category><![CDATA[irc]]></category> <category><![CDATA[irssi]]></category> <category><![CDATA[screen]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1141</guid> <description><![CDATA[About a year ago, I was introduced to the joys of using irssi and screen to access irc servers.  Before that time, I'd usually used graphical clients like Colloquy, and I always enjoyed getting Growl notifications when someone mentioned a word or string that I set up as a trigger. Once I started using irssi [...]]]></description> <content:encoded><![CDATA[<p>About a year ago, I was introduced to the joys of using <a href="http://www.irssi.org/">irssi</a> and <a href="http://www.gnu.org/software/screen/">screen</a> to access irc servers.  Before that time, I'd usually used graphical clients like <a href="http://colloquy.info/">Colloquy</a>, and I always enjoyed getting <a href="http://growl.info/">Growl</a> notifications when someone mentioned a word or string that I set up as a trigger.</p><p>Once I started using irssi in screen, I found that the visual bell in screen didn't get my attention quickly.  Luckily, someone in the <a href="irc://irc.freenode.net/slicehost">#slicehost</a> channel let me know about screen's audible bell.  You can flip between the visual and audible bell with <strong>CTRL-A</strong> and then <strong>CTRL-G</strong>.  If you keep repeating that key combination, you'll switch back and forth between the two (with a status update at the bottom left).</p><p>You can also set up your visual bell configuration in your .screenrc via some configuration parameters:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">vbell [on|off]
vbell_msg [message]
vbellwait sec</pre></div></div><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/01/21/switching-between-audible-and-visual-bells-in-screen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Crash course in dsh</title><link>http://rackerhacker.com/2010/01/20/crash-course-in-dsh/</link> <comments>http://rackerhacker.com/2010/01/20/crash-course-in-dsh/#comments</comments> <pubDate>Wed, 20 Jan 2010 14:47:56 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[command line]]></category> <category><![CDATA[dsh]]></category> <category><![CDATA[puppet]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sysadmin]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1133</guid> <description><![CDATA[Thanks to a recommendation from Michael and Florian, I've been using dsh with a lot of success for quite some time.  In short, dsh is a small application which will allow you to run commands across many servers via ssh very quickly. You may be wondering: "Why not just use ssh in a for loop?" [...]]]></description> <content:encoded><![CDATA[<p>Thanks to a recommendation from <a href="http://twitter.com/mshuler">Michael</a> and <a href="http://twitter.com/pandemicsyn">Florian</a>, I've been using <a href="http://www.netfort.gr.jp/~dancer/software/dsh.html.en">dsh</a> with a lot of success for quite some time.  In short, dsh is a small application which will allow you to run commands across many servers via ssh very quickly.</p><p>You may be wondering: "Why not just use ssh in a for loop?"  Sure, you could do something like this in bash:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> ~<span style="color: #000000; font-weight: bold;">/</span>myhosts.txt<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #007800;">$i</span> <span style="color: #ff0000;">'uptime'</span>; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div><p>But dsh allows you to do this:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">dsh -g myhosts 'uptime'</pre></div></div><p>In addition, dsh allows you to run the commands concurrently (-c) or one after the other (-w).  You can tell it to prepend each line with the machine's name (-M) or it can omit the machine name from the output (-H).  If you need to pass extra options, such as which ssh key to use, or an alternative port, you can do that as well (-o).  All of these command line options can be tossed into a configuration file if you have a default set of options you prefer.</p><p>Another thing that makes dsh more powerful is the groups feature.  Let's say you have three groups of servers - some are in California, others in Texas, and still others in New York.  You could make three files for the groups:</p><ul><li>~/.dsh/group/california</li><li>~/.dsh/group/texas</li><li>~/.dsh/group/newyork</li></ul><p>Inside each file, you just need to list the hosts one after the other.  Here's the <code>~/.dsh/group/texas</code> group file:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">db1.tx.mydomain.com
db2.tx.mydomain.com
web1.tx.mydomain.com
web2.tx.mydomain.com
#web3.tx.mydomain.com</pre></div></div><p>As you can see, dsh handles comments in the hosts file.  In the above example, the web3 server will be skipped since it's prepended with a comment.  Let's say you want to check the uptime on all of the Texas servers as fast as possible:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">dsh -c -g texas 'uptime'</pre></div></div><p>That will run the <code>uptime</code> command on all of the servers in the Texas group concurrently.  If you need to run it on two groups at once, just pass another group (eg. <code>-g texas -g california</code>) as an argument.  You can also run the commands against all of your groups (-a).</p><p>The dsh command can really help you if you need to gather information or run simple commands on many remote servers.  If you find yourself using it often for systems management, you may want to consider something like <a href="http://reductivelabs.com/products/puppet/">puppet</a>.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/01/20/crash-course-in-dsh/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Change the escape keystrokes in screen</title><link>http://rackerhacker.com/2010/01/07/change-the-escape-keystrokes-in-screen/</link> <comments>http://rackerhacker.com/2010/01/07/change-the-escape-keystrokes-in-screen/#comments</comments> <pubDate>Thu, 07 Jan 2010 14:11:23 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[command line]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[screen]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1122</guid> <description><![CDATA[One of my favorite (and most used) applications on any Linux machine is screen. Once you fire up a screen session, you can start something and keep it running indefinitely.  Even if your internet connection drops or you accidentally close your terminal window, the screen session will remain open on the remote server. Detaching from [...]]]></description> <content:encoded><![CDATA[<p>One of my favorite (and most used) applications on any Linux machine is <a href="http://www.gnu.org/software/screen/">screen</a>. Once you fire up a screen session, you can start something and keep it running indefinitely.  Even if your internet connection drops or you accidentally close your terminal window, the screen session will remain open on the remote server.</p><p>Detaching from a screen session is done by pressing CTRL-A and then d (for detach).  However, when I'm on my Mac, CTRL-A and CTRL-E send my cursor to the beginning and end of lines, respectively.  Once I launch screen, I lose the CTRL-A functionality because screen thinks I'm trying to send it a command.</p><p>Luckily, this can be changed in your <code>~/.screenrc</code>:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">escape ^Ww</pre></div></div><p>With this change, you can press CTRL-W, then press d, and you'll detach from the screen session.  For all of the screen options, run <code>man screen</code> on your local machine or review the <a href="http://linuxmanpages.com/man1/screen.1.php">man page online</a>.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/01/07/change-the-escape-keystrokes-in-screen/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>A New Year System Administrator Inspiration</title><link>http://rackerhacker.com/2010/01/03/a-new-year-system-administrator-inspiration/</link> <comments>http://rackerhacker.com/2010/01/03/a-new-year-system-administrator-inspiration/#comments</comments> <pubDate>Mon, 04 Jan 2010 02:53:53 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[general advice]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[networking]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1104</guid> <description><![CDATA[Happy New Year!  I certainly hope it's a great one for you, your family, and your business.  As the new year begins, I figured it would be a good time to sit down and answer a question that I hear very often: How do I become a better systems administrator? The best way to become [...]]]></description> <content:encoded><![CDATA[<p>Happy New Year!  I certainly hope it's a great one for you, your family, and your business.  As the new year begins, I figured it would be a good time to sit down and answer a question that I hear very often:</p><p><em>How do I become a better systems administrator?</em></p><p>The best way to become a better systems administrator is to <strong>fully understand the theory</strong> of what's happening in your server's environment.</p><p>What do I mean by that?  Learn why things aren't happening as you expected and think about all of the factors that could possibly be involved.  Instead of thinking purely about cause and effect, you'll find it much easier and rewarding to consider everything inside and outside your environment before you make any changes.</p><p>This still may be a little difficult to fully understand, so he's an example.  Let's say you're handling an issue where a customer can't reach a website hosted on their server.  When you ask them for more details, they might give you the dreaded reply: "It's not coming up."  Start by making a mental list of the problems that are easiest to check:</p><ul><li>Is the web server daemon running?</li><li>If a database server is being used, is it running and accessible?</li><li>Is there a software/hardware firewall blocking port 80?</li><li>Is a script stuck on the server tying up resources?</li><li>Could there be a DNS resolution problem?</li><li>Is the server up?</li><li>Did a switch fail?</li><li>Is the server's hard disk out of space?</li><li>Can the customer reach other websites like Google or Yahoo?</li><li>If SELinux is involved, have the appropriate contexts been set?</li><li>Could the site be a target of a denial of service attack?</li><li>Has the server reached its connection tracking limit?</li></ul><p>Of course, this is a relatively short list, but these are all easy to check.  If you're thinking about cause and effect, you might only consider the web server daemon and some basic network issues.  By considering all of the other factors that may be related, you've ensured that all of the basics are covered before you consider more complex problems.</p><p>Most systems administrators have taken an error message and tossed it in en masse into Google before.  Occasionally, no results will appear for the search.  If you find yourself in this situation, try to understand the individual parts of the error message.  Work outward from what you know already.  You should know which daemon said it, and you may have an idea of what the application was doing when the error occurred.  Take time to consider what the daemon is trying to tell you within the context of what it was doing at the time.</p><p>One of the easiest ways to force yourself to be immersed into this way of thinking is to host applications for non-technical people.  You'll find that many customers want things done differently, and they're all at different levels of technical aptitude.  Some may find it a frustrating experience at first, but you'll think yourself later.  It will force you to consider all aspects of how a server operates since you might not always know what's happening within a customer's application.</p><p>As always, if you find yourself stumbling, remember to ask your peers and colleagues.  Even if they haven't seen the particular issue, they will probably be able to guide you closer to the solution you seek.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2010/01/03/a-new-year-system-administrator-inspiration/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Wordpress and PHP 5.3.x: update_comment_type_cache() expected to be a reference</title><link>http://rackerhacker.com/2009/12/21/wordpress-and-php-5-3-x-update_comment_type_cache-expected-to-be-a-reference/</link> <comments>http://rackerhacker.com/2009/12/21/wordpress-and-php-5-3-x-update_comment_type_cache-expected-to-be-a-reference/#comments</comments> <pubDate>Mon, 21 Dec 2009 14:02:02 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[php]]></category> <category><![CDATA[wordpress]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1078</guid> <description><![CDATA[I upgraded a Fedora 11 instance to Fedora 12 and found the following error at the top of one of my Wordpress blogs:Parameter 1 to update_comment_type_cache() expected to be a reference, value given in wp-includes/plugin.php on line 166The problem wasn't in a plugin, actually.  It was within my theme's (R755-light) functions.php:function update_comment_type_cache&#40;&#38;$queried_posts&#41; &#123;The temporary [...]]]></description> <content:encoded><![CDATA[<p>I upgraded a Fedora 11 instance to Fedora 12 and found the following error at the top of one of my Wordpress blogs:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Parameter 1 to update_comment_type_cache() expected to be a reference, 
value given in wp-includes/plugin.php on line 166</pre></div></div><p>The problem wasn't in a plugin, actually.  It was within my theme's (<a href="http://wordpress.org/extend/themes/r755-light">R755-light</a>) functions.php:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> update_comment_type_cache<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$queried_posts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></div></div><p>The temporary fix is to remove the <code>&#038;</code> from that line so it looks like this:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> update_comment_type_cache<span style="color: #009900;">&#40;</span><span style="color: #000088;">$queried_posts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></div></div><p>After clearing out the WP Super Cache, the page was loading properly again.  It turns out that the function actually calculates how many comments are available for a given post, so that functionality is working properly right now.  A few theme authors are already releasing new versions to fix this bug, but my theme's author has not.</p><blockquote><p>The credit for the fix goes to someone in the <a href="http://wordpress.org/support/topic/297878?replies=8">Wordpress forums</a>.</p></blockquote><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/12/21/wordpress-and-php-5-3-x-update_comment_type_cache-expected-to-be-a-reference/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Upgraded to Wordpress 2.9</title><link>http://rackerhacker.com/2009/12/21/upgraded-to-wordpress-2-9/</link> <comments>http://rackerhacker.com/2009/12/21/upgraded-to-wordpress-2-9/#comments</comments> <pubDate>Mon, 21 Dec 2009 13:47:04 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[security]]></category> <category><![CDATA[wordpress]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1074</guid> <description><![CDATA[If you haven't upgraded your Wordpress installation to version 2.9 yet, you might want to consider doing that soon.  There are quite a few improvements, bug fixes and security features available in the new version. The automatic upgrade via the admin interface actually worked just fine for me.  Of course, I backed up my [...]]]></description> <content:encoded><![CDATA[<p>If you haven't <a href="http://codex.wordpress.org/Upgrading_WordPress">upgraded</a> your <a href="http://wordpress.org/">Wordpress</a> installation to version 2.9 yet, you might want to consider doing that soon.  There are quite a few <a href="http://core.trac.wordpress.org/query?status=closed&#038;milestone=2.9">improvements, bug fixes and security features</a> available in the new version.</p><p>The automatic upgrade via the admin interface actually worked just fine for me.  Of course, I backed up my database and files first, just to be sure.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/12/21/upgraded-to-wordpress-2-9/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Parse kernel.org changelogs with wget and grep</title><link>http://rackerhacker.com/2009/12/15/parse-kernel-org-changelogs-with-wget-and-grep/</link> <comments>http://rackerhacker.com/2009/12/15/parse-kernel-org-changelogs-with-wget-and-grep/#comments</comments> <pubDate>Tue, 15 Dec 2009 23:14:47 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[grep]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[one liner]]></category> <category><![CDATA[shell]]></category> <category><![CDATA[wget]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1063</guid> <description><![CDATA[I try to keep up with the latest kernel update from kernel.org, but parsing through the output can be a pain if there are a lot of changes taking place.  Here's a handy one-liner to make it easier to read:wget --quiet -O - http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.31.8 &#124; grep -A 4 ^commit &#124; grep -B 1 &#34;^--&#34; [...]]]></description> <content:encoded><![CDATA[<p>I try to keep up with the latest kernel update from <a href="http://kernel.org/">kernel.org</a>, but parsing through the output can be a pain if there are a lot of changes taking place.  Here's a handy one-liner to make it easier to read:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">wget --quiet -O - http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.31.8 | grep -A 4 ^commit | grep -B 1 &quot;^--&quot; | grep -v &quot;^--&quot;</pre></div></div><p>It should give you some output like this:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">    Linux 2.6.31.8
    ext4: Fix potential fiemap deadlock (mmap_sem vs. i_data_sem)
    signal: Fix alternate signal stack check
    SCSI: scsi_lib_dma: fix bug with dma maps on nested scsi objects
    SCSI: osd_protocol.h: Add missing #include
    SCSI: megaraid_sas: fix 64 bit sense pointer truncation
    ..</pre></div></div><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/12/15/parse-kernel-org-changelogs-with-wget-and-grep/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Upgrading Fedora 11 to 12 using yum</title><link>http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/</link> <comments>http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/#comments</comments> <pubDate>Tue, 08 Dec 2009 02:28:06 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[fedora]]></category> <category><![CDATA[rpm]]></category> <category><![CDATA[upgrade]]></category> <category><![CDATA[yum]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1055</guid> <description><![CDATA[As with the Fedora 10 to 11 upgrade, you can upgrade Fedora 11 to Fedora 12 using yum.  I find this to be the easiest and most reliable way to upgrade a Fedora installation whether you use it as a server or desktop. To reduce the total data downloaded, I'd recommend installing the yum-presto package [...]]]></description> <content:encoded><![CDATA[<p>As with the <a href="/2009/06/11/upgrading-from-fedora-10-cambridge-to-fedora-11-leonidas/">Fedora 10 to 11 upgrade</a>, you can upgrade Fedora 11 to Fedora 12 using yum.  I find this to be the easiest and most reliable way to upgrade a Fedora installation whether you use it as a server or desktop.</p><p>To reduce the total data downloaded, I'd recommend installing the <code>yum-presto</code> package first.  It downloads delta RPM's and builds them on the fly, which allows you to upgrade packages without having to download the entire RPM's.</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum install yum-presto</pre></div></div><p>Now, upgrade your current system to the latest packages and clean up yum's metadata:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum upgrade
yum clean all</pre></div></div><p>Get the latest <code>fedora-release</code> package and install it (replace <b>x86_64</b> with <b>x86</b> if you're using a 32-bit system):</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/12/Fedora/x86_64/os/Packages/fedora-release-*.noarch.rpm
rpm -Uvh fedora-release-*.rpm</pre></div></div><p>Now, upgrade your system to Fedora 12:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum upgrade</pre></div></div><blockquote><p>For detailed documentation on the entire process, refer to <a href="http://fedoraproject.org/wiki/YumUpgradeFaq">Fedora using yum</a> on the FedoraProject Wiki.</p></blockquote><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/12/07/upgrading-fedora-11-to-12-using-yum/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Disable acceleration for Apple&#039;s Magic Mouse</title><link>http://rackerhacker.com/2009/12/03/disable-acceleration-for-apples-magic-mouse/</link> <comments>http://rackerhacker.com/2009/12/03/disable-acceleration-for-apples-magic-mouse/#comments</comments> <pubDate>Thu, 03 Dec 2009 13:55:41 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[magic mouse]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1047</guid> <description><![CDATA[Edit: After further research, I found that this fix only adjusts the speed at which your mouse moves.  It doesn't do anything for the acceleration curve. I recently picked up a Magic Mouse and discovered that I like almost all of its features.  The biggest headache is the funky mouse acceleration curve that it [...]]]></description> <content:encoded><![CDATA[<p><b>Edit:</b> After further research, I found that this fix only adjusts the speed at which your mouse moves.  It doesn't do anything for the acceleration curve.</p><p>I recently picked up a <a href="http://www.apple.com/magicmouse/">Magic Mouse</a> and discovered that I like almost all of its features.  The biggest headache is the funky mouse acceleration curve that it applies by default.  When you make small movements, they barely even register on the screen.  When you make big movements and slow down a little mid-move, the pointer slows down much too rapidly.</p><p>A quick Google search revealed a <a href="http://discussions.apple.com/thread.jspa?messageID=10640835">support discussion post</a> where users were discussing possible solutions.  Someone suggested running this in the terminal:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">defaults write -g com.apple.mouse.scaling -1</pre></div></div><p>That improved things a little for me, but it's not perfect.  If you adjust the tracking speed in System Preferences after running this command, the acceleration curve will be reset to the default.</p><p><b>Update:</b> After some tinkering (and <a href="http://reviews.cnet.com/8301-13727_7-10392736-263.html">further Googling</a>), I found that <code>0</code> or <code>.1</code> seemed to work better for me than <code>-1</code>.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/12/03/disable-acceleration-for-apples-magic-mouse/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Automatically loading iptables rules on Debian/Ubuntu</title><link>http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/</link> <comments>http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/#comments</comments> <pubDate>Tue, 17 Nov 2009 04:39:52 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[debian]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[networking]]></category> <category><![CDATA[scripts]]></category> <category><![CDATA[security]]></category> <category><![CDATA[ubuntu]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1039</guid> <description><![CDATA[If you want your iptables rules automatically loaded every time your networking comes up on your Debian or Ubuntu server, you can follow these easy steps. First, get your iptables rules set up the way you like them.  Once you've verified that everything works, save the rules:iptables-save &#62; /etc/firewall.confNext, open up /etc/network/if-up.d/iptables in your favorite [...]]]></description> <content:encoded><![CDATA[<p>If you want your iptables rules automatically loaded every time your networking comes up on your Debian or Ubuntu server, you can follow these easy steps.</p><p>First, get your iptables rules set up the way you like them.  Once you've verified that everything works, save the rules:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">iptables-save &gt; /etc/firewall.conf</pre></div></div><p>Next, open up <code>/etc/network/if-up.d/iptables</code> in your favorite text editor and add the following:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
iptables-restore <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>firewall.conf</pre></div></div></pre><p>Once you save it, make it executable:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">chmod +x /etc/network/if-up.d/iptables</pre></div></div><p>Now, the rules will be restored each time your networking scripts start (or restart).  If you need to save changes to your rules in the future, you can manually edit <code>/etc/firewall.conf</code> or you can adjust your rules live and run:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">iptables-save &gt; /etc/firewall.conf</pre></div></div><p><em>Thanks to <a href="http://twitter.com/ajmesserli">Ant</a> for this handy tip.</em></p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Upgraded to Wordpress 2.8.6 with some theme changes</title><link>http://rackerhacker.com/2009/11/16/upgraded-to-wordpress-2-8-6-with-some-theme-changes/</link> <comments>http://rackerhacker.com/2009/11/16/upgraded-to-wordpress-2-8-6-with-some-theme-changes/#comments</comments> <pubDate>Tue, 17 Nov 2009 04:32:22 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[exploit]]></category> <category><![CDATA[security]]></category> <category><![CDATA[theme]]></category> <category><![CDATA[wordpress]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1035</guid> <description><![CDATA[I've upgraded the blog to Wordpress 2.8.6 after I read about the registered user exploits. Also, I've dropped the Adsimple theme I was using, and I'm now using a slightly modified Dojo theme.  It's a little easier on the eyes, but it's still lightweight enough to be fast on mobile broadband connections. Let me know what [...]]]></description> <content:encoded><![CDATA[<p>I've upgraded the blog to Wordpress 2.8.6 after I read about the <a href="http://wordpress.org/development/2009/11/wordpress-2-8-6-security-release/">registered user exploits</a>.</p><p>Also, I've dropped the <a href="http://wordpress.org/extend/themes/adsimple">Adsimple</a> theme I was using, and I'm now using a slightly modified <a href="http://spaceninja.com/dojo/">Dojo</a> theme.  It's a little easier on the eyes, but it's still lightweight enough to be fast on mobile broadband connections.</p><p>Let me know what you think!</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/11/16/upgraded-to-wordpress-2-8-6-with-some-theme-changes/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Changing the time zone in irssi</title><link>http://rackerhacker.com/2009/11/03/changing-the-time-zone-in-irssi/</link> <comments>http://rackerhacker.com/2009/11/03/changing-the-time-zone-in-irssi/#comments</comments> <pubDate>Tue, 03 Nov 2009 14:34:42 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[irc]]></category> <category><![CDATA[irssi]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[time zone]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1028</guid> <description><![CDATA[I usually set the time zone on my servers to UTC, but that makes it a bit confusing for me when I use irssi.  If you have perl support built into irssi, you can run these commands to alter your time zone within irssi only:/load perl /script exec $ENV{'TZ'}='(nameofyourtimezone)';For example, I'm in Central Time, so [...]]]></description> <content:encoded><![CDATA[<p>I usually set the time zone on my servers to UTC, but that makes it a bit confusing for me when I use irssi.  If you have perl support built into irssi, you can run these commands to alter your time zone within irssi only:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/load perl
/script exec $ENV{'TZ'}='(nameofyourtimezone)';</pre></div></div><p>For example, I'm in Central Time, so I'd use:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/script exec $ENV{'TZ'}='CST6CDT';</pre></div></div><p>To update the time in your status bar, simply /whois yourself and you should see the updated time zone.  If you want more handy irssi tips, look no further than <a href="http://irssi.org/documentation/tips">irssi's documentation</a>.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/11/03/changing-the-time-zone-in-irssi/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Please help! Found a lost dog - New Braunfels, TX</title><link>http://rackerhacker.com/2009/10/14/please-help-found-a-lost-dog-new-braunfels-tx/</link> <comments>http://rackerhacker.com/2009/10/14/please-help-found-a-lost-dog-new-braunfels-tx/#comments</comments> <pubDate>Thu, 15 Oct 2009 02:06:53 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=1025</guid> <description><![CDATA[Update: The dog has made it back home to its family. Thanks to all that helped spread the word! This is not the usual type of post I'd make on this blog, but I'm trying to find a home for a lost dog that my wife found in New Braunfels, TX.  More details are on [...]]]></description> <content:encoded><![CDATA[<p><strong>Update</strong>: The dog has made it back home to its family. Thanks to all that helped spread the word!</p><p>This is not the usual type of post I'd make on this blog, but I'm trying to find a home for a lost dog that my wife found in New Braunfels, TX.  More details are on my <a href="http://majorhayden.com/help-us-find-the-owner-of-this-lost-dog">Posterous blog</a>.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/10/14/please-help-found-a-lost-dog-new-braunfels-tx/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Twitter direct message notifications with Prowl</title><link>http://rackerhacker.com/2009/09/19/twitter-direct-message-notifications-with-prowl/</link> <comments>http://rackerhacker.com/2009/09/19/twitter-direct-message-notifications-with-prowl/#comments</comments> <pubDate>Sat, 19 Sep 2009 17:48:27 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=999</guid> <description><![CDATA[If you want instant notifications of a direct message on Twitter on your iPhone, you have a few options.  You could set up your mobile device to receive SMS messages and get them quickly, but you're stuck paying for all of those incoming SMS messages.  However, it's annoying when you follow an account, [...]]]></description> <content:encoded><![CDATA[<p>If you want instant notifications of a direct message on Twitter on your iPhone, you have a few options.  You could set up your mobile device to receive SMS messages and get them quickly, but you're stuck paying for all of those incoming SMS messages.  However, it's annoying when you follow an account, and then they follow and DM you at 4AM.  Twitter <a href="http://twitter.com/devices">allows you to set quiet hours</a>, but then you don't see any notifications on your phone when you wake up.</p><p>You could always pick up Boxcar [<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=321493542&#038;mt=8">iTunes Link</a>] from iTunes and use it's plug-and-play setup routine to begin receiving notifications of direct messages.  The downside of the app is that the notifications are fairly delayed (sometimes 5-10 minutes late in my experience) and you're paying $2.99 for an app that can only handle one Twitter account.  Also, the app only handles Twitter direct messages and replies - nothing else.</p><p>Here's where Prowl [<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=320876271&#038;mt=8">iTunes Link</a>] comes in.  You can toss anything at the <a href="http://prowl.weks.net/api.php">Prowl API</a> and it comes up on your phone within seconds.  The app is $2.99, but you can sent up to 1,000 notifications per hour through the API at no additional cost. <strong>Seriously - would you ever need 1,000 notifications per hour?</strong></p><p>First, you'll need two ruby gems for this project.  The first of which is the <a href="http://github.com/augustl/ruby-prowl">prowl</a> gem by <a href="http://github.com/augustl">August Lilleaas</a>, and the second is <a href="http://tmail.rubyforge.org/">tmail</a>.  If you haven't installed gems from github before, you'll need to run this first:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">gem sources -a http://gems.github.com</pre></div></div><p>Install the gems:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">gem install prowl tmail</pre></div></div><p>Once they're installed, you can toss this script into <code>/usr/local/bin/twitterdm-prowl.rb</code>:</p><div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'tmail'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'prowl'</span>
&nbsp;
message = <span style="color:#ff6633; font-weight:bold;">$stdin</span>.<span style="color:#9900CC;">read</span>
mail = <span style="color:#6666ff; font-weight:bold;">TMail::Mail</span>.<span style="color:#9900CC;">parse</span><span style="color:#006600; font-weight:bold;">&#40;</span>message<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
prowlevent = mail.<span style="color:#9900CC;">subject</span>.<span style="color:#CC0066; font-weight:bold;">gsub</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>Direct message from <span style="color:#006600; font-weight:bold;">/</span>,<span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">strip</span>
prowlbody = mail.<span style="color:#9900CC;">parts</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">body</span>.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\n\n<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">strip</span>
&nbsp;
Prowl.<span style="color:#9900CC;">add</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'your-prowl-api-key-goes-here'</span>, <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#ff3333; font-weight:bold;">:application</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;TWITDM&quot;</span>,
  <span style="color:#ff3333; font-weight:bold;">:event</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> prowlevent,
  <span style="color:#ff3333; font-weight:bold;">:description</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> prowlbody,
  <span style="color:#ff3333; font-weight:bold;">:priority</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">0</span>,
<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div><p>At the beginning of the script, we rope in rubygems, tmail and prowl.  We're going to read a message in from standard input (I'll show you how that works in a moment) and then parse it with tmail.  The subject and body are stripped down to make it easier to display on your iPhone's screen.  Finally, we wrap up by sending the data to the Prowl API with a normal priority.</p><p>As far as customizations go, you'll obviously need to input your Prowl API key for the script to work.  You can adjust the regular expressions to include different parts of the e-mail if you need them.  Also, feel free to adjust the application name ("TWITDM") in the script to something else.  The priority can run from 2 (OMG emergency) to -2 (I don't care).  I chose 0 (normal) for my script.</p><p>Now, make sure the script is executable:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">chmod 0755 /usr/local/bin/twitterdm-prowl.rb</pre></div></div><p>We'll need to set up an alias in <code>/etc/aliases</code> to feed in this e-mails to our script:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">twitterdm:	 &quot;|/usr/bin/ruby /usr/local/bin/twitterdm-prowl.rb&quot;</pre></div></div><p>Run <code>newaliases</code> to ensure that your alias ends up in the hashed aliases table.</p><p>At this point, you'll need to ensure that your emails actually make it into the alias you set up.  You'll need something that can filter your e-mails and forward them based on the filter.  If you want a strictly Linux solution, you could use procmail for that.  If you're e-mail provider has server-side filters that can forward e-mails (<a href="http://www.rackspace.com/email_hosting/">as mine does</a>), that's the easiest method.  Twitter provides some great e-mail headers that you can use for filtering:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">X-Twittercreatedat: Sat Sep 19 17:26:31 +0000 2009
X-Twitterrecipientid: 14453057
X-Twitterrecipientscreenname: RackerHacker
X-Twitteremailtype: direct_message
X-Twitterdirectmessageid: 383469494
X-Twittersenderid: 25000734
X-Twittersendername: Major Hayden
X-Twittersenderscreenname: rkrhkr
X-Twitterrecipientname: Major Hayden</pre></div></div><p>I use <code>X-Twitteremailtype: direct_message</code> to filter and forward, but it's up to you on how you do it.</p><div class="wp-caption alignright" style="width: 170px"><a href="http://c0008031.cdn.cloudfiles.rackspacecloud.com/twitterdmprowl.jpg"><img alt="Twitter direct message notification via Prowl" src="http://c0008031.cdn.cloudfiles.rackspacecloud.com/twitterdmprowl.jpg" title="Twitter direct message notification via Prowl" width="160" height="240" /></a><p class="wp-caption-text">Twitter direct message notification via Prowl</p></div><p>Now, use another account to send yourself a direct message and you should get a notification pretty quickly (see the image on the right).  If you didn't get a notification, try going to the Prowl site and <a href="https://prowl.weks.net/add_notification.php">send yourself a test notification</a>.  If the test notification fails, then you may have an issue with Prowl itself (this hasn't ever happened to me).</p><p>If the test notification works, but your Twitter notifications don't, check your mail logs.  Your filters may not be sending the direct message e-mails to your alias, your alias may not be configured properly, or the permissions on the ruby script you made may be incorrect.</p><p>If you want to keep testing without sending yourself a ton of direct messages, just send yourself one direct message.  Once you receive the e-mail notification from Twitter, open it up and view the source of the message in your e-mail client (command-option-U in Apple Mail).  Copy the entire source of the message to your clipboard, paste it into your favorite text editor on your server, and save it.  You can call your script with the e-mail just like your mail server would with the following:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">cat &quot;twitterdmmessage.txt&quot; | /usr/local/bin/twitterdm-prowl.rb</pre></div></div><p>By going that route, you be testing the script itself, and your e-mail server will be removed from the equation.</p><p>If you're still having trouble, let me know and I'll be glad to help!</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/09/19/twitter-direct-message-notifications-with-prowl/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Fix MacFusion on Snow Leopard</title><link>http://rackerhacker.com/2009/08/28/fix-macfusion-on-snow-leopard/</link> <comments>http://rackerhacker.com/2009/08/28/fix-macfusion-on-snow-leopard/#comments</comments> <pubDate>Fri, 28 Aug 2009 16:21:23 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[ftp]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[macfusion]]></category> <category><![CDATA[snow leopard]]></category> <category><![CDATA[ssh]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=994</guid> <description><![CDATA[First off, credit for this fix goes to Geoff Watts from his two tweets. If you're using Snow Leopard, you'll find that the current version of MacFusion refuses to complete a connection to a remote server.  You can fix this in two steps: First, quit MacFusion. Second, open System Preferences and then open the MacFUSE pane.  [...]]]></description> <content:encoded><![CDATA[<p>First off, credit for this fix goes to <a href="https://twitter.com/geoffwatts">Geoff Watts</a> from his <a href="http://twitter.com/geoffwatts/status/3605414263">two</a> <a href="http://twitter.com/geoffwatts/status/3605464669">tweets</a>.</p><p>If you're using Snow Leopard, you'll find that the current version of MacFusion refuses to complete a connection to a remote server.  You can fix this in two steps:</p><p>First, quit MacFusion.</p><p>Second, open System Preferences and then open the MacFUSE pane.  Check the "Show Beta Versions" box and click "Check For Updates".  Go ahead and update MacFUSE.</p><p>Third, open up a terminal and do the following:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">rm /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshnodelay.so</pre></div></div><p>Your MacFusion installation should now be working on Snow Leopard.  I've tested SSH and FTP connectivity so far, and they both appear to be working.  Thanks again to Geoff for the fix!</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/08/28/fix-macfusion-on-snow-leopard/feed/</wfw:commentRss> <slash:comments>102</slash:comments> </item> <item><title>Fedora 11 httpd: alloc_listener: failed to get a socket for (null)</title><link>http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/</link> <comments>http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/#comments</comments> <pubDate>Fri, 14 Aug 2009 17:14:02 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[emergency]]></category> <category><![CDATA[fedora]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[yum]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=981</guid> <description><![CDATA[If you use Fedora 11 in a virtualized environment, you may have seen this error recently if you've updated to apr-1.3.8-1:[root@f11 ~]# /etc/init.d/httpd start Starting httpd: [Fri Aug 14 17:05:24 2009] [crit] (22)Invalid argument: alloc_listener: failed to get a socket for (null) Syntax error on line 134 of /etc/httpd/conf/httpd.conf: Listen setup failed [...]]]></description> <content:encoded><![CDATA[<p>If you use Fedora 11 in a virtualized environment, you may have seen this error recently if you've updated to apr-1.3.8-1:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@f11 ~]# /etc/init.d/httpd start
Starting httpd: [Fri Aug 14 17:05:24 2009] [crit] (22)Invalid argument: alloc_listener: failed to get a socket for (null)
Syntax error on line 134 of /etc/httpd/conf/httpd.conf:
Listen setup failed
                                                           [FAILED]</pre></div></div><p>The issue is related to three kernel calls that are used in apr-1.3.8-1: accept4(), dup3() and epoll_create1().  Without these calls, apache is unable to start.</p><p><strong><u>Update on August 17, 2009:</u> the Fedora team has <a href="https://bugzilla.redhat.com/show_bug.cgi?id=516331#c12">pushed apr-1.3.8-2 into the stable repositories</a> for Fedora 11, which eliminates the need for the temporary fix shown below.</strong></p><p><strong>Deprecated solution:</strong> There is a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=516331">bug open</a> with the Fedora team, and there is a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=516331#c10">temporary fix</a> available:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum --enablerepo=updates-testing update apr</pre></div></div><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Installing the mysql gem in Fedora 11 64-bit</title><link>http://rackerhacker.com/2009/08/07/installing-the-mysql-gem-in-fedora-11-64-bit/</link> <comments>http://rackerhacker.com/2009/08/07/installing-the-mysql-gem-in-fedora-11-64-bit/#comments</comments> <pubDate>Fri, 07 Aug 2009 18:57:22 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=975</guid> <description><![CDATA[On some systems, getting the mysql gem to build can be a little tricky.  Fedora 11 x86_64 will require a bit of extra finesse to get the gem installed.  First off, ensure that you've installed the mysql-devel package:# yum -y install mysql-develI'll assume that you already installed the rubygems package. You can install [...]]]></description> <content:encoded><![CDATA[<p>On some systems, getting the mysql gem to build can be a little tricky.  Fedora 11 x86_64 will require a bit of extra finesse to get the gem installed.  First off, ensure that you've installed the <code>mysql-devel</code> package:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># yum -y install mysql-devel</pre></div></div><p>I'll assume that you already installed the <code>rubygems</code> package. You can install the mysql gem like this:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
Building native extensions.  This could take a while...
Successfully installed mysql-2.7
1 gem installed
Installing ri documentation for mysql-2.7...
Installing RDoc documentation for mysql-2.7...</pre></div></div><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/08/07/installing-the-mysql-gem-in-fedora-11-64-bit/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Graphical representation of Cisco&#039;s BGP issues this morning</title><link>http://rackerhacker.com/2009/08/04/graphical-representation-of-ciscos-bgp-issues-this-morning/</link> <comments>http://rackerhacker.com/2009/08/04/graphical-representation-of-ciscos-bgp-issues-this-morning/#comments</comments> <pubDate>Tue, 04 Aug 2009 14:45:45 +0000</pubDate> <dc:creator>Major Hayden</dc:creator> <category><![CDATA[Posts]]></category><guid isPermaLink="false">http://rackerhacker.com/?p=970</guid> <description><![CDATA[ If you haven't checked out bgplay, it's pretty handy. &#169;2010 Racker Hacker. All Rights Reserved..]]></description> <content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/WS1gqGkw6A4&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WS1gqGkw6A4&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p><p>If you haven't checked out <a href="http://bgplay.routeviews.org/bgplay/">bgplay</a>, it's pretty handy.</p><p>&copy;2010 <a href="http://rackerhacker.com">Racker Hacker</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://rackerhacker.com/2009/08/04/graphical-representation-of-ciscos-bgp-issues-this-morning/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 10/40 queries in 0.040 seconds using disk
Content Delivery Network via cdn.rackerhacker.com

Served from: dfw.mhtx.net @ 2010-03-15 03:19:03 -->