File not found exception on download

57 views
Skip to first unread message

tozor

unread,
Aug 18, 2008, 12:26:29 PM8/18/08
to AdWords API Forum
I got the following exception when I attempted to download a report:

java.io.FileNotFoundException:
https://adwords.google.com/api/adwords/ReportDownload?t=AAAAAByPTeQAAAEb1nSJRAEAAAACE8Ei5y425pTesqMxAJtqU1hSRlC7cc_E
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:
1168)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:
234)
at
com.adlucent.logic.adwords.ReportManager.downloadReportResults(ReportManager.java:
327)

Since the URL in question is returned from getGzipReportDownloadUrl(),
I am pretty confident that the problem is not on my end. When the URL
is returned from getGzipReportDownloadUrl() is the report file
actually available for downloading or is there some small window of
time before the report is actually copied to the download location??
I have seen this error once or twice before but this is over a course
of a year and thousands of reports. I am wondering if any other
developers have seen this.

Thanks in advance

Tim Ozor

AdWords API Advisor

unread,
Aug 19, 2008, 12:53:54 PM8/19/08
to AdWords API Forum
Hello Tim,

No, that's a new one to me. I know that the URLs eventually expire,
but I don't know what the exact timeframe is for that.

Has this just happened the one time?

Cheers,
-Jeff Posnick, AdWords API Team


On Aug 18, 12:26 pm, tozor <t...@adlucent.com> wrote:
> I got the following exception when I attempted to download a report:
>
> java.io.FileNotFoundException:https://adwords.google.com/api/adwords/ReportDownload?t=AAAAAByPTeQAA...
>         at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection....
> 1168)
>         at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConn...

tozor

unread,
Aug 19, 2008, 12:55:35 PM8/19/08
to AdWords API Forum
Like I said I have seen it two or three times over the course of a
year and we pull thousands of reports in our application. This is not
a huge deal but I was just wondering if there was a theoretical race
condition.

I'll repost if I see it again.

Tim


On Aug 19, 11:53 am, AdWords API Advisor

dkasak

unread,
Sep 25, 2008, 10:01:02 PM9/25/08
to AdWords API Forum
I'm actually seeing this issue quite a bit - I've just been asked to
look into it because of the high number of 'URL not found' issues.
What could be causing this? Too many concurrent connections /
reports / logins / something?

As noted above, the URL we're getting is coming straight from
getGzipReportDownloadUrl, and we're hitting the URL immediately after
receiving it. We're also trying it six times before giving up, so if
it were a timing issue, you'd think we'd pick it up in one of the
later attempts.

Can anyone shed any light on this issue? I have report IDs if these
help track down the issue. One such one is 546548514.

Thanks.

Dan

Albert

unread,
Sep 26, 2008, 2:50:50 AM9/26/08
to AdWords API Forum
I confirm, we are having this issue in the past several days a lot.
Happens sporadically.

In the part of the trace, you can see we re-try getting a different
download url several times.

===============(not found trace + soap log)=======================

=====not fount==================

Utilities.Stabilizers.Armor.SafeExec
areParamsValid == true
Max Try is 4
System.Net.WebException: The remote server returned an error: (404)
Not Found.
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri,
ICredentials credentials)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String
role, Type ofObjectToReturn)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings)
at Utilities.XMLHelper.ValidateXML(DataSet& ds)
at
AdCoreModel.API.AdWordsAPI.ReportsDataService.<>c__DisplayClass6.<SaveReport>b__3()
in C:\Inetpub\wwwroot\webServices\AdCoreModel\API\AdWordsAPI
\ReportsDataService.cs:line 399
at Utilities.Stabilizers.Armor.SafeExec(UInt32 maxTries, Type[]
exceptionTypes, CommonWrapper method, UInt32 sleepTime, String[]
detail_InnerText, CommonWrapper backupMethod, Nullable`1 jobRunID)
Going for next try
26/09/2008 01:51:54
Max Try is 3
System.Net.WebException: The remote server returned an error: (404)
Not Found.
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri,
ICredentials credentials)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String
role, Type ofObjectToReturn)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings)
at Utilities.XMLHelper.ValidateXML(DataSet& ds)
at
AdCoreModel.API.AdWordsAPI.ReportsDataService.<>c__DisplayClass6.<SaveReport>b__3()
in C:\Inetpub\wwwroot\webServices\AdCoreModel\API\AdWordsAPI
\ReportsDataService.cs:line 399
at Utilities.Stabilizers.Armor.SafeExec(UInt32 maxTries, Type[]
exceptionTypes, CommonWrapper method, UInt32 sleepTime, String[]
detail_InnerText, CommonWrapper backupMethod, Nullable`1 jobRunID)
Going for next try
26/09/2008 01:51:58
Max Try is 2
System.Net.WebException: The remote server returned an error: (404)
Not Found.
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri,
ICredentials credentials)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String
role, Type ofObjectToReturn)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings)
at Utilities.XMLHelper.ValidateXML(DataSet& ds)
at
AdCoreModel.API.AdWordsAPI.ReportsDataService.<>c__DisplayClass6.<SaveReport>b__3()
in C:\Inetpub\wwwroot\webServices\AdCoreModel\API\AdWordsAPI
\ReportsDataService.cs:line 399
at Utilities.Stabilizers.Armor.SafeExec(UInt32 maxTries, Type[]
exceptionTypes, CommonWrapper method, UInt32 sleepTime, String[]
detail_InnerText, CommonWrapper backupMethod, Nullable`1 jobRunID)
Going for next try
26/09/2008 01:52:02
Max Try is 1
System.Net.WebException: The remote server returned an error: (404)
Not Found.
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri,
ICredentials credentials)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String
role, Type ofObjectToReturn)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings, XmlParserContext inputContext)
at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings
settings)
at Utilities.XMLHelper.ValidateXML(DataSet& ds)
at
AdCoreModel.API.AdWordsAPI.ReportsDataService.<>c__DisplayClass6.<SaveReport>b__3()
in C:\Inetpub\wwwroot\webServices\AdCoreModel\API\AdWordsAPI
\ReportsDataService.cs:line 399
at Utilities.Stabilizers.Armor.SafeExec(UInt32 maxTries, Type[]
exceptionTypes, CommonWrapper method, UInt32 sleepTime, String[]
detail_InnerText, CommonWrapper backupMethod, Nullable`1 jobRunID)
Going for next try
26/09/2008 01:52:06
Max tries = 0
26/09/2008 01:52:10

=======soap log============
<?xml version="1.0" encoding="iso-8859-1"?>
-----SoapRequest at 26/09/2008 01:51:55
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<applicationToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</applicationToken>
<clientEmail xmlns="https://adwords.google.com/api/adwords/
v12" />
<developerToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</developerToken>
<email xmlns="https://adwords.google.com/api/adwords/v12">
***
</email>
<password xmlns="https://adwords.google.com/api/adwords/
v12">
***
</password>
<useragent xmlns="https://adwords.google.com/api/adwords/
v12">
***
</useragent>
</soap:Header>
<soap:Body>
<getReportDownloadUrl xmlns="https://adwords.google.com/api/
adwords/v12">
<reportJobId>
546853164
</reportJobId>
</getReportDownloadUrl>
</soap:Body>
</soap:Envelope>
-----SoapResponse at 26/09/2008 01:51:56
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<responseTime soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
77
</responseTime>
<operations soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
1
</operations>
<units soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
next" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
adwords/v12">
1
</units>
<requestId soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
aee01e833ed2f1615e9a3fc1e070fae3
</requestId>
</soapenv:Header>
<soapenv:Body>
<getReportDownloadUrlResponse xmlns="https://
adwords.google.com/api/adwords/v12">
<getReportDownloadUrlReturn>

https://adwords.google.com/api/adwords/ReportDownload?t=AAAAACCYUSwAAAEcnTalfQAAAAAAi0F7_83ERLKe6vCPRkG5Uqd4aCstwVz1
</getReportDownloadUrlReturn>
</getReportDownloadUrlResponse>
</soapenv:Body>
</soapenv:Envelope>
-----SoapRequest at 26/09/2008 01:51:59
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<applicationToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</applicationToken>
<clientEmail xmlns="https://adwords.google.com/api/adwords/
v12" />
<developerToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</developerToken>
<email xmlns="https://adwords.google.com/api/adwords/v12">
***
</email>
<password xmlns="https://adwords.google.com/api/adwords/
v12">
***
</password>
<useragent xmlns="https://adwords.google.com/api/adwords/
v12">
***
</useragent>
</soap:Header>
<soap:Body>
<getReportDownloadUrl xmlns="https://adwords.google.com/api/
adwords/v12">
<reportJobId>
546853164
</reportJobId>
</getReportDownloadUrl>
</soap:Body>
</soap:Envelope>
-----SoapResponse at 26/09/2008 01:52:00
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<responseTime soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
6
</responseTime>
<operations soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
1
</operations>
<units soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
next" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
adwords/v12">
1
</units>
<requestId soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
6a5d74d380f08b928df821b806433660
</requestId>
</soapenv:Header>
<soapenv:Body>
<getReportDownloadUrlResponse xmlns="https://
adwords.google.com/api/adwords/v12">
<getReportDownloadUrlReturn>

https://adwords.google.com/api/adwords/ReportDownload?t=AAAAACCYUSwAAAEcnTa0fAAAAAABaWcQMRWWPK8BbyKejGUghFS519IeFO-l
</getReportDownloadUrlReturn>
</getReportDownloadUrlResponse>
</soapenv:Body>
</soapenv:Envelope>
-----SoapRequest at 26/09/2008 01:52:03
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<applicationToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</applicationToken>
<clientEmail xmlns="https://adwords.google.com/api/adwords/
v12" />
<developerToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</developerToken>
<email xmlns="https://adwords.google.com/api/adwords/v12">
***
</email>
<password xmlns="https://adwords.google.com/api/adwords/
v12">
***
</password>
<useragent xmlns="https://adwords.google.com/api/adwords/
v12">
***
</useragent>
</soap:Header>
<soap:Body>
<getReportDownloadUrl xmlns="https://adwords.google.com/api/
adwords/v12">
<reportJobId>
546853164
</reportJobId>
</getReportDownloadUrl>
</soap:Body>
</soap:Envelope>
-----SoapResponse at 26/09/2008 01:52:03
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<responseTime soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
6
</responseTime>
<operations soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
1
</operations>
<units soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
next" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
adwords/v12">
1
</units>
<requestId soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
28179a10180f4071f5bfdc814ee9438a
</requestId>
</soapenv:Header>
<soapenv:Body>
<getReportDownloadUrlResponse xmlns="https://
adwords.google.com/api/adwords/v12">
<getReportDownloadUrlReturn>

https://adwords.google.com/api/adwords/ReportDownload?t=AAAAACCYUSwAAAEcnTbDFwAAAAAAbWZVD9lgwDgT-mcS4JqNtDmLAkw3Wtzb
</getReportDownloadUrlReturn>
</getReportDownloadUrlResponse>
</soapenv:Body>
</soapenv:Envelope>
-----SoapRequest at 26/09/2008 01:52:07
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<applicationToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</applicationToken>
<clientEmail xmlns="https://adwords.google.com/api/adwords/
v12" />
<developerToken xmlns="https://adwords.google.com/api/
adwords/v12">
***
</developerToken>
<email xmlns="https://adwords.google.com/api/adwords/v12">
***
</email>
<password xmlns="https://adwords.google.com/api/adwords/
v12">
***
</password>
<useragent xmlns="https://adwords.google.com/api/adwords/
v12">
***
</useragent>
</soap:Header>
<soap:Body>
<getReportDownloadUrl xmlns="https://adwords.google.com/api/
adwords/v12">
<reportJobId>
546853164
</reportJobId>
</getReportDownloadUrl>
</soap:Body>
</soap:Envelope>
-----SoapResponse at 26/09/2008 01:52:07
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<responseTime soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
6
</responseTime>
<operations soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
1
</operations>
<units soapenv:actor="http://schemas.xmlsoap.org/soap/actor/
next" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/
adwords/v12">
1
</units>
<requestId soapenv:actor="http://schemas.xmlsoap.org/soap/
actor/next" soapenv:mustUnderstand="0" xmlns="https://
adwords.google.com/api/adwords/v12">
745ab4a238153a2cab9250f8d22c837d
</requestId>
</soapenv:Header>
<soapenv:Body>
<getReportDownloadUrlResponse xmlns="https://
adwords.google.com/api/adwords/v12">
<getReportDownloadUrlReturn>

https://adwords.google.com/api/adwords/ReportDownload?t=AAAAACCYUSwAAAEcnTbSDgAAAAABMNFG9IBW0m_2Ii_YonmK-uBJbz-8SE57
</getReportDownloadUrlReturn>
</getReportDownloadUrlResponse>
</soapenv:Body>
</soapenv:Envelope>

AdWords API Advisor

unread,
Sep 26, 2008, 11:43:12 AM9/26/08
to AdWords API Forum
Thanks for providing those logs and report job ids. I'll open a bug
with the reports team with that info.

Cheers,
-Jeff Posnick, AdWords API Team


> https://adwords.google.com/api/adwords/ReportDownload?t=AAAAACCYUSwAA...
> ...
>
> read more »

tozor

unread,
Sep 26, 2008, 6:20:00 PM9/26/08
to AdWords API Forum
I am also seeing these errors today with some frequency.

Tim Ozor

On Sep 26, 10:43 am, AdWords API Advisor
> ...
>
> read more »

Albert

unread,
Sep 29, 2008, 4:35:37 AM9/29/08
to AdWords API Forum
Please let us know when this is resolved. In the mean time we've
implemented a re-try ordering a new report if the download url throws
404 not found. The problem with this is we are paying quota for each
new report although the problem is not on our side.

regards,
Albert

AdWords API Advisor

unread,
Oct 2, 2008, 11:07:50 AM10/2/08
to AdWords API Forum
Hello,

The bug is in with the engineering team, but there's no update on it
yet. How frequently are folks experiencing this behavior over the past
day or so? If this was taking place primarily last week that's a good
data point to pass back to the engineers.

Cheers,
-Jeff Posnick, AdWords API Team


tozor

unread,
Oct 2, 2008, 1:19:44 PM10/2/08
to AdWords API Forum
I saw it several times on Friday during the day, but have not seen it
since then.

Tim Ozor

On Oct 2, 10:07 am, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:

AdWords API Advisor

unread,
Oct 14, 2008, 2:30:16 PM10/14/08
to AdWords API Forum
I wanted to update folks after speaking to the engineering team about
this again.

There's speculation that these bad URLs might be returned during a
period of time in which the backend datastore is in a particular state
(apologies for not being able to get more specific than that). They're
matching up the timestamps from the sample failures everyone has
already provided, but what they'd really like is to be notified the
next time this happens so that they could try to catch things live.

So, please don't hesitate to post again about this behavior soon after
you see it. I'll bring it to the engineers' immediate attention when
you do.

Cheers,
-Jeff Posnick, AdWords API Team


tozor

unread,
Nov 24, 2008, 6:32:55 PM11/24/08
to AdWords API Forum
We had a reoccurence of this error at 7:30AM PST.

Thanks.

Tim Ozor

On Oct 14, 12:30 pm, AdWords API Advisor

AdWords API Advisor

unread,
Nov 25, 2008, 2:44:07 PM11/25/08
to AdWords API Forum
Hello Tim,

So yesterday's occurrence is actually something that the core
engineering team knows the root cause of. There was a loss of
connectivity between one particular set of AdWords API servers and the
backend data store that contains reports data yesterday morning for
several hours. There is retry/failover logic in place that should have
protected most users from seeing anything other than slightly
increased response times, but they did see a handful of outright
failures to fetch report data due to this.

But... it's not a type of failure that has occurred previously, so
the engineering team isn't convinced that it has particular insight to
offer into the root cause of the previous occurrences. \

Cheers,
-Jeff Posnick, AdWords API Team


Reply all
Reply to author
Forward
0 new messages