<?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>ntpdate | LogikDevelopment</title>
	<atom:link href="https://www.logikdev.com/tag/ntpdate/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.logikdev.com</link>
	<description>&#34;Il n&#039;y a pas de problème, il n&#039;y a que des solutions. L&#039;esprit de l&#039;homme invente ensuite le problème.&#34; André Gide</description>
	<lastBuildDate>Tue, 25 Apr 2017 13:57:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>
	<item>
		<title>S3 command failed if the time is not synced</title>
		<link>https://www.logikdev.com/2011/12/06/s3-command-failed-if-time-not-synced/</link>
					<comments>https://www.logikdev.com/2011/12/06/s3-command-failed-if-time-not-synced/#comments</comments>
		
		<dc:creator><![CDATA[smoreau]]></dc:creator>
		<pubDate>Tue, 06 Dec 2011 23:11:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ntpdate]]></category>
		<category><![CDATA[s3sync]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[system date]]></category>
		<guid isPermaLink="false">https://www.logikdev.com/?p=1610</guid>

					<description><![CDATA[<p>This is already the second post about the s3sync ruby program. The first article was focused on monitoring s3sync with Zabbix. I will talk on this one about an error I got when running the S3 synchronisation: S3 command failed: list_bucket prefix /data max-keys 200 delimiter / With result 403 Forbidden S3 ERROR: # s3sync.rb:290:in [&#8230;]</p>
<p>The post <a href="https://www.logikdev.com/2011/12/06/s3-command-failed-if-time-not-synced/">S3 command failed if the time is not synced</a> first appeared on <a href="https://www.logikdev.com">LogikDevelopment</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>This is already the second post about the <a href="https://forums.aws.amazon.com/thread.jspa?threadID=11975&amp;start=0&amp;tstart=0" target="_blank"><strong>s3sync</strong></a> ruby program. The first article was focused on <a title="Monitor s3sync with Zabbix" href="https://www.logikdev.com/2011/11/24/monitor-s3sync-with-zabbix/">monitoring s3sync with Zabbix</a>.</p>
<p>I will talk on this one about an error I got when running the S3 synchronisation:</p>
<pre>
S3 command failed:
list_bucket prefix /data max-keys 200 delimiter /
With result 403 Forbidden
S3 ERROR: #
s3sync.rb:290:in `+': can't convert nil into Array (TypeError)
	from s3sync.rb:290:in `s3TreeRecurse'
	from s3sync.rb:346:in `main'
	from ./thread_generator.rb:79:in `call'
	from ./thread_generator.rb:79:in `initialize'
	from ./thread_generator.rb:76:in `new'
	from ./thread_generator.rb:76:in `initialize'
	from s3sync.rb:267:in `new'
	from s3sync.rb:267:in `main'
	from s3sync.rb:735
</pre>
<p>As you can see, this error is not very human-friendly! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f62e.png" alt="😮" class="wp-smiley" style="height: 1em; max-height: 1em;" /> The only thing we know is that the S3 command failed because of the error <code>can't convert nil into Array</code>. It looks to me like an internal error within s3sync&#8230;</p>
<p>But after some investigation, it appears it is simply because the system date on the server is not correct. I cannot tell you how much time I spent on this one!  <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f62f.png" alt="😯" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Anyway, if you are doing automatic backups as describe on <a href="http://blog.eberly.org/2006/10/09/how-automate-your-backup-to-amazon-s3-using-s3sync/" target="_blank">John Eberly&#8217;s blog</a>, you need to add the following code at the top of your <code>upload.sh</code> script:</p>
<pre class="brush: bash; title: ; notranslate">
# update the system date
/usr/sbin/ntpdate 3.uk.pool.ntp.org 2.uk.pool.ntp.org 1.uk.pool.ntp.org 0.uk.pool.ntp.org
</pre>
<p><strong>NB:</strong> please find below the command lines I use to install <a href="http://www.eecis.udel.edu/~mills/ntp/html/ntpdate.html" target="_blank"><strong>ntpdate</strong></a> on a Debian server:</p>
<pre class="brush: bash; light: true; title: ; notranslate">
apt-get install ntpdate
dpkg-reconfigure tzdata
</pre><p>The post <a href="https://www.logikdev.com/2011/12/06/s3-command-failed-if-time-not-synced/">S3 command failed if the time is not synced</a> first appeared on <a href="https://www.logikdev.com">LogikDevelopment</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.logikdev.com/2011/12/06/s3-command-failed-if-time-not-synced/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
