Amazon declines requests as expired

stephanmaximili... - October 6, 2009 - 16:01
Project:Amazon Module
Version:6.x-1.0-beta7
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I am using the amazon module as a cck-field for books. On our server the requests for ASINs get declined by the amazon-server, because they are expired, too old. If I change the call to gmdate around line 204 to date(...) everything works. Here's the response:

<?xml version="1.0"?> <ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2009-03-31/"><Error><Code>RequestExpired</Code><Message>Request has expired. Timestamp date is 2009-10-06T15:38:01Z.</Message></Error><RequestID>d63265e6-01fd-4aba-b5da-b8ed1291606a</RequestID></ItemLookupErrorResponse>

Note my local time for the request was 17:38 in Berlin, date -u shows 15:38, I am using Amazon DE.

As the module functions on other computers correctly (with the same time settings), what's wrong with our server?

Any help is appreciated.

cheers,
Stephan

#1

rfay - October 6, 2009 - 16:06

Thanks for the report.

Are you saying that this works *for you* on other servers?

Does this only happen on specific ASINs? Or is it every request, as far as you know?

#2

stephanmaximili... - October 6, 2009 - 16:16

Hi,

I tested the amazon-module on my local computer (mac 10.5.x) and there it works for every request. A co-developer reports that the module works fine on his development-computer, too. Only on our server (suse something) it fails for every request unless I replace gmdate with date.

Perhaps Amazon does some throttling by IP-ranges?

cheers,
Stephan

#3

rfay - October 6, 2009 - 16:43

I don't think you'd get the 'expired' message if it was throttling.

I imagine that your system is not set to run on GMT, which is the usual setup for a Unix computer. My bet is that you don't have the timezone set, and that you have the Unix system running on local time.

I can't tell you exactly what to do on your version, but my bet is that's what's up. The timezone is typically in /etc/timezone, and there's typically a GUI way to set all this up.

#4

rfay - October 15, 2009 - 17:36
Status:active» postponed (maintainer needs more info)

#5

stephanmaximili... - October 19, 2009 - 16:43
Status:postponed (maintainer needs more info)» fixed

Hi rfay,

we finally switched servers and now it works as advertised -- may be a corrupted /misconfigured server installation. Thanks für your patience + help!

cheers,
sth

#6

System Message - November 2, 2009 - 16:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.