<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[error - Binary Sludge]]></title><description><![CDATA[dredging the digital quagmire]]></description><link>https://www.binarysludge.com/</link><generator>Ghost 0.11</generator><lastBuildDate>Fri, 01 May 2026 07:10:14 GMT</lastBuildDate><atom:link href="https://www.binarysludge.com/tag/error/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[The network is reliable]]></title><description><![CDATA[<p>A <a href="http://aphyr.com/posts/288-the-network-is-reliable">fascinating post-mortem</a> on high profile network failures:</p>

<blockquote>This post is meant as a reference point–to illustrate that, according to a wide range of accounts, partitions occur in many real-world environments. Processes, servers, NICs, switches, local and wide area networks can all fail, and the resulting economic consequences are</blockquote>]]></description><link>https://www.binarysludge.com/2013/06/09/the-network-is-reliable/</link><guid isPermaLink="false">913c701d-c173-4bb9-a220-836c1e95d217</guid><category><![CDATA[Debugging]]></category><category><![CDATA[DRBD]]></category><category><![CDATA[error]]></category><category><![CDATA[linux]]></category><category><![CDATA[MySQL]]></category><category><![CDATA[security]]></category><category><![CDATA[system adminstration]]></category><category><![CDATA[system architecture]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Sun, 09 Jun 2013 14:23:30 GMT</pubDate><content:encoded><![CDATA[<p>A <a href="http://aphyr.com/posts/288-the-network-is-reliable">fascinating post-mortem</a> on high profile network failures:</p>

<blockquote>This post is meant as a reference point–to illustrate that, according to a wide range of accounts, partitions occur in many real-world environments. Processes, servers, NICs, switches, local and wide area networks can all fail, and the resulting economic consequences are real. Network outages can suddenly arise in systems that are stable for months at a time, during routine upgrades, or as a result of emergency maintenance. The consequences of these outages range from increased latency and temporary unavailability to inconsistency, corruption, and data loss. Split-brain is not an academic concern: it happens to all kinds of systems–sometimes for days on end. Partitions deserve serious consideration.  
</blockquote>]]></content:encoded></item><item><title><![CDATA[BASH variable scope]]></title><description><![CDATA[<p>As outrageously counter-intuitive as it may first appear, it is still possible to be hit by a scope bug in BASH when commands are executed in a subshell. </p>

<p>I was running through <a href="http://tldp.org/LDP/abs/html/complexfunct.html">The Advanced Bash-Scripting Guide's "Complex Functions and Function Complexities"</a> (a long but interesting read), and was struggling with</p>]]></description><link>https://www.binarysludge.com/2012/08/31/bash-variable-scope/</link><guid isPermaLink="false">b39eaef5-4e04-4ae8-8bf0-b9418ad603be</guid><category><![CDATA[error]]></category><category><![CDATA[bash]]></category><category><![CDATA[linux]]></category><category><![CDATA[system adminstration]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Fri, 31 Aug 2012 12:13:13 GMT</pubDate><content:encoded><![CDATA[<p>As outrageously counter-intuitive as it may first appear, it is still possible to be hit by a scope bug in BASH when commands are executed in a subshell. </p>

<p>I was running through <a href="http://tldp.org/LDP/abs/html/complexfunct.html">The Advanced Bash-Scripting Guide's "Complex Functions and Function Complexities"</a> (a long but interesting read), and was struggling with some unexpected behaviour - a variable in my the while block of a script wasn't incrementing as expected.</p>

<pre>curl "$THIS_URL" | sed -e "s#foo.push(##g" -e "s#}});#}}#g" > $TMP_FILE
while read line; do
  ...
done < $TMP_FILE
</pre>

<p>I found the answer <a href="http://www.nucleardonkey.net/blog/2007/08/variable_scope_in_bash.html">here</a>.</p>

<blockquote>It turns out that this is because pipes cause Bash to perform operations within sub-shells, and variables are specific to whatever sub-shell they're called in. So, once we leave the do/while loop, $COUNTER will again evaluate to 0. Lame!</blockquote>

<p>And refactored my script to use process substitution instead of pipes like <a href="http://tldp.org/LDP/abs/html/process-sub.html">this</a>.</p>

<pre>while read LINE; do
  ...
done < <(curl "$this_url"="" |="" sed="" -e="" "s#foo.push(##g"="" "s#}});#}}#g")="" <="" pre="">

<p>Of note is that using this hashbang at the top of the script</p>

<pre>#!/bin/sh</pre> 

<p>failed to execute the process substitution, but replacing it with the binary it was symlinked to (<code>/bin/bash</code>) worked just fine.</p></(curl></pre>]]></content:encoded></item><item><title><![CDATA[Fix postfix "fatal: open database /etc/aliases.db: No such file or directory" error]]></title><description><![CDATA[<p>As there was no email coming from a VM, I checked <code>/var/log/maillog</code>:</p>

<pre>
Jun 25 10:59:13 localhost postfix/local[20793]: fatal: open database /etc/aliases.db: No such file or directory
</pre>

<p>As the missing file is some form of (Berkley?) DB, a simple <code>touch</code> doesn't create any</p>]]></description><link>https://www.binarysludge.com/2012/06/25/fix-postfix-fatal-open-database-etcaliases-db-no-such-file-or-directory-error/</link><guid isPermaLink="false">5aebd771-28a7-4aad-ab84-9a9df1f31c44</guid><category><![CDATA[error]]></category><category><![CDATA[bash]]></category><category><![CDATA[postfix]]></category><category><![CDATA[system adminstration]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Mon, 25 Jun 2012 11:13:38 GMT</pubDate><content:encoded><![CDATA[<p>As there was no email coming from a VM, I checked <code>/var/log/maillog</code>:</p>

<pre>
Jun 25 10:59:13 localhost postfix/local[20793]: fatal: open database /etc/aliases.db: No such file or directory
</pre>

<p>As the missing file is some form of (Berkley?) DB, a simple <code>touch</code> doesn't create any structure for a suitable "empty database". </p>

<p>To fix, update the <code>/etc/aliases</code> database with <code>newaliases</code>:  </p>

<pre>
newaliases
</pre>

<p>From the man page:</p>

<blockquote>       This is a link to the ssmtp binary. It invokes /usr/sbin/sendmail with the -bi option. It is provided for compatibility with the sendmail program.

       In this case it does absolutely nothing since sSMTP does not support /etc/aliases and is just there to avoid programs returning error messages.
</blockquote>]]></content:encoded></item><item><title><![CDATA[Realign columns on AWS Dashboard (EC2, RDS, S3, CloudFront)]]></title><description><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-left: 0pt; margin-top: 0pt;" title="AWS Logo" src="http://c213.r13.cf3.rackcdn.com/AWS Logo.jpg" alt="AWS Logo" width="200" height="200"></p>

<p>It can be infuriating when resizing a window, to have Amazon's AWS Dashboard minimise all columns. To restore them back to their sensible layout:  </p>

<ul>  
    <li>Click Show/Hide</li>
    <li>Toggle any column</li>
    <li>Click Apply</li>
    <li>The columns will have reordered (and you can now un-toggle the added column)</li>
</ul>]]></description><link>https://www.binarysludge.com/2012/02/27/realign-columns-on-aws-dashboard-ec2-rds-s3-cloudfront/</link><guid isPermaLink="false">b8282794-f43f-4369-b884-d526b9152897</guid><category><![CDATA[AWS]]></category><category><![CDATA[error]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Mon, 27 Feb 2012 10:00:13 GMT</pubDate><content:encoded><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-left: 0pt; margin-top: 0pt;" title="AWS Logo" src="http://c213.r13.cf3.rackcdn.com/AWS Logo.jpg" alt="AWS Logo" width="200" height="200"></p>

<p>It can be infuriating when resizing a window, to have Amazon's AWS Dashboard minimise all columns. To restore them back to their sensible layout:  </p>

<ul>  
    <li>Click Show/Hide</li>
    <li>Toggle any column</li>
    <li>Click Apply</li>
    <li>The columns will have reordered (and you can now un-toggle the added column)</li>
</ul>]]></content:encoded></item><item><title><![CDATA[PhpStorm remote debugging Node.js on a foreign host (JetBrains, Webstorm, RubyMine)]]></title><description><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-top: 0;" title="Node.js" src="http://c213.r13.cf3.rackcdn.com/nodejs-black[1].png" alt="Node.js"></p>

<p><a href="https://github.com/dannycoates/node-inspector">node-inspector</a> is the de-facto standard Node.js debugger, but runs in another browser window. For those that like their IDEs fully integrated, PhpStorm <em>should</em> support remote debugging functionality for Node.js but is currently buggy - it will only connect to servers on the same host. The bug is <a href="http://youtrack.jetbrains.net/issue/WI-9821" title="Bug WI-9821">here</a></p>]]></description><link>https://www.binarysludge.com/2012/02/21/phpstorm-remote-debugging-node-js-on-a-foreign-host-jetbrains-webstorm-rubymine/</link><guid isPermaLink="false">791e243e-ede8-4327-ab27-757e4b8d129e</guid><category><![CDATA[Debugging]]></category><category><![CDATA[error]]></category><category><![CDATA[IDE]]></category><category><![CDATA[Javascript]]></category><category><![CDATA[JetBrains]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[PhpStorm]]></category><category><![CDATA[RubyMine]]></category><category><![CDATA[WebStorm]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Tue, 21 Feb 2012 20:05:50 GMT</pubDate><content:encoded><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-top: 0;" title="Node.js" src="http://c213.r13.cf3.rackcdn.com/nodejs-black[1].png" alt="Node.js"></p>

<p><a href="https://github.com/dannycoates/node-inspector">node-inspector</a> is the de-facto standard Node.js debugger, but runs in another browser window. For those that like their IDEs fully integrated, PhpStorm <em>should</em> support remote debugging functionality for Node.js but is currently buggy - it will only connect to servers on the same host. The bug is <a href="http://youtrack.jetbrains.net/issue/WI-9821" title="Bug WI-9821">here</a>.</p>

<p>For when the bug is fixed, here are RHEL/CentOS instructions on how to connect to a remote Node.js process (Node.js currrently only allows its debugger to listen for connections on <code>127.0.0.1</code>, which isn't much use for remote debugging).</p>

<p>On VM console 1 (<code>-df</code> debug mode on for diagnosis):</p>

<pre>
yum install balance -yt
balance -df 8585 127.0.0.1.5858
</pre>

<p>On VM console 2:</p>

<pre>
node --debug app.js 
</pre>

<p>On host:  </p>

<pre>
telnet {VM IP} 8585
</pre>

<p>Should output  </p>

<pre>
Type: connect
V8-Version: 3.6.6.14
Protocol-Version: 1
Embedding-Host: node v0.6.6
Content-Length: 0
</pre>

<p>VM console 1:  </p>

<pre>
$ balance -df 8585 127.0.0.1:5858
argv[0]=balance
bindhost=NULL
source port 8585
file /var/run/balance/balance.8585.0.0.0.0 already exists
the following channels are active:
  0  0 127.0.0.1:5858:0
connect from 172.27.4.11
trying group 0 channel 0 ... connect to channel 0 successful
connect from 172.27.4.11
trying group 0 channel 0 ... connect to channel 0 successful
</pre>

<p>The connection is working, so attach the remote debugger in PhpStorm (this is the step that's currently broken):</p>

<table style="border:none;">  
<tr style="border:none;">  
<td style="text-align: right;">Host:</td><td style="text-align: left;"><code>172.27.8.04</code> (replace with VM's IP)</td></tr>

<tr style="border:none;"><td style="text-align: right;">Debug Port:</td><td style="text-align: left;"><code>8585</code></td></tr>

</table>

<p>Debug on!</p>]]></content:encoded></item><item><title><![CDATA[How To Force Refresh Google Calendar]]></title><description><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-top: 0; width: 25%;" title="Google Calendar" src="http://c213.r13.cf3.rackcdn.com/2012-01-23-755652287549775328.png" alt="Google Calendar"></p>

<p>Google Calendar caches remote calendar URLs for some time - not helpful if you want to verify a change.</p>

<p>This can be circumvented by altering the URL while requesting the same content. Adding a query parameter (or attempting to add another one) will cause Google to treat the calendar as</p>]]></description><link>https://www.binarysludge.com/2012/02/01/how-to-force-refresh-google-calendar/</link><guid isPermaLink="false">5d848525-b0ce-4091-a570-0420f4aeb362</guid><category><![CDATA[error]]></category><category><![CDATA[time management]]></category><category><![CDATA[URL redirection]]></category><category><![CDATA[URL shortening]]></category><category><![CDATA[Google Calendar]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Wed, 01 Feb 2012 09:00:19 GMT</pubDate><content:encoded><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-top: 0; width: 25%;" title="Google Calendar" src="http://c213.r13.cf3.rackcdn.com/2012-01-23-755652287549775328.png" alt="Google Calendar"></p>

<p>Google Calendar caches remote calendar URLs for some time - not helpful if you want to verify a change.</p>

<p>This can be circumvented by altering the URL while requesting the same content. Adding a query parameter (or attempting to add another one) will cause Google to treat the calendar as a new feed.</p>

<p>Here's an example with the UK holidays calendar feed from CalendarLabs:</p>

<p>Original Calendar URL:  


<pre>webcal://www.calendarlabs.com/templates/ical/UK-Holidays.ics</pre></p>

<p>Updated Calendar URL:  


<pre>webcal://www.calendarlabs.com/templates/ical/UK-Holidays.ics?noCache</pre></p>

<p>And another example with an updated query string from Facebook:</p>

<p>Original Calendar URL:  


<pre>webcal://www.facebook.com/ical/u.php?uid=123456789&amp;key=ABCdefGHIjkl_m123</pre></p>

<p>Updated Calendar URL:  


<pre>webcal://www.facebook.com/ical/u.php?uid=123456789&amp;key=ABCdefGHIjkl_m123&amp;noCache</pre></p>

<p>Any string can be used instead of <code>noCache</code>, as Google Calendar just remembers the full URL. So next time you want to force an update, use <code>noCache-2</code>, <code>noCache-3</code> etc.</p>

<p>If the calendar's URL already has query parameters, or adding another parameter breaks the feed, the URL can be shortened with bit.ly (or any URL shortener). This is <a href="http://boingboing.net/2009/04/04/why-url-shorteners-s.html">less useful</a>, as you're relying on the query shortening service always being available.</p>]]></content:encoded></item><item><title><![CDATA[PuTTY Connection Manager - Website Down]]></title><description><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin: -50px 0 -60px 0;" title="Silly PuTTY" src="http://c213.r13.cf3.rackcdn.com/lrg_Silly_Putty.gif" alt="Silly PuTTY" width="300" height="300">  
</p>

<p>SSH connections on Windows are best managed through PuTTY, although the client only allows one connection per window. For marshalling many PuTTY instances, PuTTY Connection Manager is my preferred option (other window managers <a title="PuTTY Links" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/links.html">are available</a>, including <a href="http://code.google.com/p/superputty/">superputty</a>).</p>

<p>Unfortunately the URL of the PuTTY Connection Manager <a href="http://puttycm.free.fr/">website</a> is returning <code>403 Forbidden</code></p>]]></description><link>https://www.binarysludge.com/2011/11/30/putty-connection-manager-website-down/</link><guid isPermaLink="false">862d337a-c21c-4656-bec7-1ae9a7bc0e67</guid><category><![CDATA[error]]></category><category><![CDATA[linux]]></category><category><![CDATA[PuTTY]]></category><category><![CDATA[SSH]]></category><category><![CDATA[system adminstration]]></category><category><![CDATA[Window manager]]></category><category><![CDATA[windows]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Wed, 30 Nov 2011 13:35:20 GMT</pubDate><content:encoded><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin: -50px 0 -60px 0;" title="Silly PuTTY" src="http://c213.r13.cf3.rackcdn.com/lrg_Silly_Putty.gif" alt="Silly PuTTY" width="300" height="300">  
</p>

<p>SSH connections on Windows are best managed through PuTTY, although the client only allows one connection per window. For marshalling many PuTTY instances, PuTTY Connection Manager is my preferred option (other window managers <a title="PuTTY Links" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/links.html">are available</a>, including <a href="http://code.google.com/p/superputty/">superputty</a>).</p>

<p>Unfortunately the URL of the PuTTY Connection Manager <a href="http://puttycm.free.fr/">website</a> is returning <code>403 Forbidden</code>, and there don't appear to be any mirrors of the last build that was released.</p>

<p>Archive.org doesn't have the <a href="http://web.archive.org/web/20110720224945/http://puttycm.free.fr/cms/">download page</a> archived, so there are no checksums available to verify my own archive. I've hosted the most stable version here for posterity: <a href="http://dl.dropbox.com/u/536200/puttycm-debug-0.7.1.223.zip">Putty Connection Manager 0.7.1 Alpha</a></p>

<p>If you already have this software installed, it is no longer able to check for updates from the target domain. If "automatically check for updates" is on and PuTTY Connection Manager crashes at startup, set this registry value to <code>0</code>:</p>

<pre>HKEY_CURRENT_USER\Software\ACS\PuTTY Connection Manager</pre>

<p>&nbsp;</p>]]></content:encoded></item><item><title><![CDATA[Running ntp/ntpd on a development Virtual Machine (VM)]]></title><description><![CDATA[<p align="center">  
<img class="alignleft mainimage" style="margin-bottom: 0;" title="Top Marks" src="http://c213.r13.cf3.rackcdn.com/Big Ben.jpg" alt="Big Ben">  
</p>

<p>Keeping the system clock on the right time is troublesome for a virtual machine if VM guest tools are not available to synchronise clocks. As the guest OS does not have access to the hardware clock it relies on software to tick over its own clock, and inaccuracies generally lead</p>]]></description><link>https://www.binarysludge.com/2011/10/31/running-ntpntpd-on-a-development-virtual-machine-vm/</link><guid isPermaLink="false">1e5239ae-9bdc-4882-a450-c060767323c3</guid><category><![CDATA[error]]></category><category><![CDATA[Network Time Protocol]]></category><category><![CDATA[ntpd]]></category><category><![CDATA[system adminstration]]></category><category><![CDATA[system time]]></category><category><![CDATA[virtual machine]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Mon, 31 Oct 2011 23:42:36 GMT</pubDate><content:encoded><![CDATA[<p align="center">  
<img class="alignleft mainimage" style="margin-bottom: 0;" title="Top Marks" src="http://c213.r13.cf3.rackcdn.com/Big Ben.jpg" alt="Big Ben">  
</p>

<p>Keeping the system clock on the right time is troublesome for a virtual machine if VM guest tools are not available to synchronise clocks. As the guest OS does not have access to the hardware clock it relies on software to tick over its own clock, and inaccuracies generally lead to slowdown (although over-compensation for loss of timer ticks may gain time). </p>

<p>Changing any system's time can be risky - an OS relies on a contiguous series of time values. If a system event is scheduled to occur at a specified time and the clock is set forward beyond it, that time never occurs and the event will not occur.</p>

<p>Network Time Protocol (<code>ntpd</code>) avoids this problem by making minuscule adjustments to the clock frequency (the <a href="http://en.wikipedia.org/wiki/Slew">slew</a>), effectively shortening the length of a unit of time to the OS. <code>man ntpd</code> states:</p>

<blockquote>The slew rate of typical Unix kernels is limited to 0.5 ms/s, so for every second that the clock requires adjusting, 2000s are required to adjust it. </blockquote>

<p>For a development VM that is off for periods of time this slew rate is too slow, and if the machine doesn't run time-critical services <code>ntpd</code> can be configured to absolutely set the system time.</p>

<p></p><h3>What  <p></p>

<ul>  
    <li>Synchronise clock of virtual machine using ntp</li>
</ul>  

<p></p><h3>Why  <p></p>

<ul>  
    <li>Guest additions not available</li>
</ul>  

<p></p><h3>Risks  <p></p>

<ul>  
    <li>Time-based system events not occurring</li>
</ul>  

<p></p><h3>How  <p></p>

<ol>  
<li>  
Edit <code>/etc/sysconfig/ntpd</code> and add the <code>-x</code> flag (mine looks like this):  


<pre>OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -x"</pre>
On startup the ntpd daemon will set the time irrespective of how incorrect it currently is.  
</li><li>  
Add this line in the root <code>crontab</code> to refresh the time every 5 minutes.  


<pre>*/5 * * * * /sbin/service ntpd restart &gt;&gt; /tmp/ntpd.log 2&gt;&amp;1</pre>
</li>  
</ol>  

<p><br> <br>
Here is a <a href="http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf ">detailed explanation of Timekeeping in VMWare</a> and <a href="http://www.ntp.org/ntpfaq/NTP-s-algo.htm#AEN1766 ">What is a Reference Clock?</a> from <a href="http://www.ntp.org/">ntp.org</a>'s FAQ. <br>
<br><br></p></h3></h3></h3></h3>]]></content:encoded></item><item><title><![CDATA[Fix Kindle Not Syncing Across Multiple Devices By Correcting Filesystem Errors (Whispernet, Whispersync)]]></title><description><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-left: 0; margin-top: 0;" title="Kindle DX Graphite" src="http://c0000213.cdn3.cloudfiles.rackspacecloud.com/KindleDXGraphite.jpg" alt="Kindle DX Graphite" width="200" height="200"></p>

<p>A Kindle will sync your progress through a book when it's powered down (presumably only if it has sufficient battery to connect to a mobile or Wi-Fi network). This allows another device (another Kindle or the software on a mobile device or PC) to download that location so you can</p>]]></description><link>https://www.binarysludge.com/2011/06/05/fix-kindle-not-syncing-across-multiple-devices-by-correcting-filesystem-errors-whispernet-whispersync/</link><guid isPermaLink="false">8afe48cb-957b-46ce-8324-a33e474ce32c</guid><category><![CDATA[books]]></category><category><![CDATA[error]]></category><category><![CDATA[Kindle]]></category><category><![CDATA[WhisperNet]]></category><category><![CDATA[WhisperSync]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Sun, 05 Jun 2011 16:11:03 GMT</pubDate><content:encoded><![CDATA[<p align="center">  
<img class="alignright mainimage" style="margin-left: 0; margin-top: 0;" title="Kindle DX Graphite" src="http://c0000213.cdn3.cloudfiles.rackspacecloud.com/KindleDXGraphite.jpg" alt="Kindle DX Graphite" width="200" height="200"></p>

<p>A Kindle will sync your progress through a book when it's powered down (presumably only if it has sufficient battery to connect to a mobile or Wi-Fi network). This allows another device (another Kindle or the software on a mobile device or PC) to download that location so you can resume your reading from the same point.</p>

<p>If this doesn't appear to be happening from the physical Kindle (i.e. your progress isn't retrieved when you use a different device), the most likely reason is a corrupt filesystem. To fix:  </p>

<ol>  
    <li>Attach Kindle to a PC via USB</li>
    <li>Your PC may prompt <strong>Do you want to scan and fix Kindle?</strong> - if so, click Yes</li>
    <li>If your device hasn't prompted you:
<ol>  
    <li>Navigate to Windows Explorer</li>
    <li>Right click on your Kindle</li>
    <li>Select Properties</li>
    <li>Navigate to the Tools tab</li>
    <li>Under Error-checking click "Check now"</li>
    <li>Select "Automatically fix filesystem errors" and click "Start"</li>
</ol>  

<p></p></li> <br>
    <li>Once the filesystem is repaired the Kindle will sync to Whispernet again.</li>
    <li>In future, unmount the Kindle by <a title="Safely Remove Hardware" href="http://windows.microsoft.com/en-US/windows7/Safely-remove-devices-from-your-computer">ejecting it safely</a> or <a href="http://blog.ashfame.com/2008/02/safely-remove-usb-drive-safely-remove-hardware-icon-disappears-system-tray/">change its removal policy</a>.</li>
</ol><p></p>]]></content:encoded></item><item><title><![CDATA[YouTube's "500 Internal Server Error" Page]]></title><description><![CDATA[<p align="center">  
<a href="http://www.elixireleven.com/"><img alt="Internal Server Error" src="http://c0000213.cdn3.cloudfiles.rackspacecloud.com/Internal Server Error.jpg" title="ElixirEleven's Internal Server Error" width="200" height="200" class="alignright mainimage" style="margin-top: 0;"></a></p>

<p>I received an HTTP 500 response from YouTube today after submitting a search for <a href="http://www.youtube.com/results?search_query=shlomo&amp;aq=f">Shlomo</a> (an <a href="http://www.shlo.co.uk/category/videos/">excellent beatboxer</a> and human voice percussionist) and received the <a href="https://www.binarysludge.com/2011/02/08/youtubes-500-internal-server-error-page/#YouTubeError">cryptic error mesage below</a>.</p>

<p>It looks like potentially sensitive debug data have been serialised and encrypted into the error page, but it's not immediately obvious</p>]]></description><link>https://www.binarysludge.com/2011/02/08/youtubes-500-internal-server-error-page/</link><guid isPermaLink="false">9cd9a16d-d4f2-48cb-922e-913a4bf347c9</guid><category><![CDATA[error]]></category><category><![CDATA[HTTP Sessions]]></category><category><![CDATA[system architecture]]></category><category><![CDATA[YouTube]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Tue, 08 Feb 2011 13:00:22 GMT</pubDate><content:encoded><![CDATA[<p align="center">  
<a href="http://www.elixireleven.com/"><img alt="Internal Server Error" src="http://c0000213.cdn3.cloudfiles.rackspacecloud.com/Internal Server Error.jpg" title="ElixirEleven's Internal Server Error" width="200" height="200" class="alignright mainimage" style="margin-top: 0;"></a></p>

<p>I received an HTTP 500 response from YouTube today after submitting a search for <a href="http://www.youtube.com/results?search_query=shlomo&amp;aq=f">Shlomo</a> (an <a href="http://www.shlo.co.uk/category/videos/">excellent beatboxer</a> and human voice percussionist) and received the <a href="https://www.binarysludge.com/2011/02/08/youtubes-500-internal-server-error-page/#YouTubeError">cryptic error mesage below</a>.</p>

<p>It looks like potentially sensitive debug data have been serialised and encrypted into the error page, but it's not immediately obvious why this is fed back to the user and not logged internally. Perhaps this error:  </p>

<ol>  
    <li>occurred in an isolated system component without write permission to persistent storage</li>
    <li>is a trigger condition for a reroute from an overloaded component (possibly an aggregation service?)</li>
    <li>is infrequent enough to be considered non-critical</li>
    <li>is an undesired, undiagnosed emergent property of their architecture</li>
    <li>is unexpected, consequently not routed to the correct engineer and mothballed</li>
</ol>

<p>Whatever it is, there isn't any direction on how to contact the "highly trained monkeys" so most users won't bother. The error is either considered minor or unfixable.</p>

<p>Serving <a href="http://www.youtube.com/t/fact_sheet">2 billion videos a day</a> is non-trivial, but for any site without such <a href="http://highscalability.com/youtube-architecture">well-publicised architectural prowess</a> giving users encrypted debug messages and no method to report them is considered bad form!</p>

<p><a name="YouTubeError">&nbsp;</a>  </p>

<div style="padding: 0px 40px;">  
<h3>500 Internal Server Error  
Sorry, something went wrong.

A team of highly trained monkeys has been dispatched to deal with this situation.

If you see them, show them this information:  


<pre>UOWacxCYxzsYHkLrZEkPJ42v33Rm1C1wn5HkrqJyEFGNk3WfVhFWNNNBnXif
PBdrNCrIESBIpTwnU8M1R3DMOew5Oz8CKKbgOM_HzNYITN09NXUAidiDBQ5a
0ZSK0S-qKr51QgiwuVU-D5Luof6lVbO37ec5N5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serGFjpNpXSkYC5_HGEwIQpI
4i4jfX2LG9A_iVjzx_rDWSiS2Dzr-Gs2HmlaCldHIQjl4fU5NLBPktTQt0vh
owpAzHQxjTDqXZdc0pwEDPNiy5qJNs_uh-x-zNJra_gA4nQueB9jBOq7PZq8
bEIrEgVv</pre>
</h3></div>]]></content:encoded></item><item><title><![CDATA[MySQL ERROR 1137 (HY000): Can't reopen table: 'tmp_journals']]></title><description><![CDATA[<p>When setting up a query using a temporary lookup table, I got this error:</p>

<pre><code>ERROR 1137 (HY000): Can't reopen table: 'tmp_journals'  
</code></pre>

<p>It transpires that since 4.1 the way MySQL handles temporary tables has changed. This affects joins, unions and subqueries. There is an obvious fix:</p>

<pre><code>mysql&gt; CREATE</code></pre>]]></description><link>https://www.binarysludge.com/2010/03/18/mysql-error-1137-hy000-cant-reopen-table/</link><guid isPermaLink="false">4b1b5222-d865-4542-9fda-e978b7c28df5</guid><category><![CDATA[error]]></category><category><![CDATA[MySQL]]></category><category><![CDATA[temporary table]]></category><dc:creator><![CDATA[Andrew Martin]]></dc:creator><pubDate>Thu, 18 Mar 2010 15:00:49 GMT</pubDate><content:encoded><![CDATA[<p>When setting up a query using a temporary lookup table, I got this error:</p>

<pre><code>ERROR 1137 (HY000): Can't reopen table: 'tmp_journals'  
</code></pre>

<p>It transpires that since 4.1 the way MySQL handles temporary tables has changed. This affects joins, unions and subqueries. There is an obvious fix:</p>

<pre><code>mysql&gt; CREATE TEMPORARY TABLE tmp_journals_2 LIKE tmp_journals;  
Query OK, 0 rows affected (0.00 sec)

mysql&gt; INSERT INTO tmp_journals_2 SELECT * FROM tmp_journals;  
Query OK, 3228659 rows affected (2.01 sec)  
Records: 3228659  Duplicates: 0  Warnings: 0  
</code></pre>

<p>Then the query is easy:</p>

<pre><code>SELECT COUNT(1) cnt, journal_invoice_ref  
FROM tmp_journals  
GROUP BY journal_date  
HAVING cnt &gt; 10000

UNION

SELECT COUNT(1) cnt, journal_invoice_ref  
FROM tmp_journals_2  
GROUP BY journal_invoice_ref  
HAVING cnt &lt; 10  
</code></pre>]]></content:encoded></item></channel></rss>