Error creating mailbox export requests

51 views
Skip to first unread message

Scott

unread,
Sep 7, 2011, 11:07:32 AM9/7/11
to Google Apps Domain Information and Management APIs
I am getting the following error when using the GAM tool as well as
writing directly to the API using Java.

GAM:

Traceback (most recent call last):
File "gam.py", line 2522, in <module>
File "gam.py", line 2164, in doRequestExport
File "gdata\apps\audit\service.pyo", line 230, in
createMailboxExportRequest
File "gdata\apps\service.pyo", line 532, in _PostProperties
gdata.apps.service.AppsForYourDomainException: {'status': 500, 'body':
'<?xml ve
rsion="1.0" encoding="UTF-8"?>\r\n<AppsForYourDomainErrors>\r\n
<error errorCod
e="1000" invalidInput="" reason="UnknownError" />\r\n</
AppsForYourDomainErrors>\
r\n\r\n', 'reason': 'Internal Server Error'}

Java app:

AppsForYourDomainException
AppsForYourDomainException
UnknownError(1000):
at
com.google.gdata.data.appsforyourdomain.AppsForYourDomainException.narrow(AppsForYourDomainException.java:
133)
at
com.google.gdata.client.appsforyourdomain.AppsForYourDomainService.insert(AppsForYourDomainService.java:
102)
at
com.google.gdata.client.appsforyourdomain.audit.AuditService.createMailboxDumpRequest(AuditService.java:
186)
at GoogleMailBoxMakeRequest.startExport(GoogleMailBoxMakeRequest.java:
44)
at GoogleMailBoxMakeRequest.main(GoogleMailBoxMakeRequest.java:19)

Please advise. Thank you.

Shraddha Gupta

unread,
Sep 7, 2011, 12:58:06 PM9/7/11
to google-app...@googlegroups.com
Hello Scott,

We don't support GAM tool at google. You are getting the error with the API using Java, then it would be good if you tell which Apps version you are using, and what you are trying to do. Share some code with us, that will help understand your problem well

Thank you,
-- 
Shraddha Gupta
Developer Programs Engineer,
Google, Hyderabad.



--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.





Jay Lee

unread,
Sep 7, 2011, 9:08:42 PM9/7/11
to google-app...@googlegroups.com
Hi Scott,

  What is the exact GAM command you are running? If you create a file named debug.gam in the same directory as GAM, GAM will output all of it's API calls.

  You should be very careful in posting those logs here publically though as they contain authentication details for your domain so I suggest you sanitize them somewhat (XXXX out the values for OAuth and Authorization headers).

  Lastly, have you uploaded a GPG key for the mailbox export yet? The request shouldn't fail like this if you haven't but the export will ultimately fail with an ERROR status if you haven't

Jay

Scott

unread,
Sep 8, 2011, 3:04:12 PM9/8/11
to google-app...@googlegroups.com
We are on Google Apps for Business.  Everything was working great, creating an export request, downloading, and decrypting.  Then since the other day I am getting these failures.  The command I am running is 'gam audit export request <user> includedeleted' and below is the output using debug.gam

C:\gam>gam audit export request <user> includedeleted
send: 'POST https://apps-apis.google.com/a/feeds/compliance/audit/mail/export/hyattvoi.com/<user> HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: apps-apis.googl
e.com\r\nContent-Length: 260\r\nContent-Type: application/atom+xml\r\nAuthorizat
ion: OAuth realm="", oauth_nonce="xxx", oauth_timestamp="1315508336", oauth
_consumer_key="xxx.apps.googleusercontent.com", oauth_signature_method=
"HMAC-SHA1", oauth_version="1.0", oauth_token="xxxx", oauth_signature="xxx"\r\nUser-Agent:
 Google Apps Manager 1.9.1 / jay...@gmail.com (Jay Lee) / Python 2.7.2 final /
Windows-XP-5.1.2600-SP3 x86 / GData-Python 2.0.14+20110902+custom_mods\r\n\r\n'
send: '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<ns0:entry xmlns:ns0="http://
www.w3.org/2005/Atom" xmlns:ns1="http://schemas.google.com/apps/2006"><ns1:prope
rty name="packageContent" value="FULL_MESSAGE" /><ns1:property name="includeDele
ted" value="true" /></ns0:entry>'
reply: 'HTTP/1.1 500 Internal Server Error\r\n'
header: Content-Type: text/html; charset=UTF-8
header: Date: Thu, 08 Sep 2011 18:57:38 GMT
header: Expires: Thu, 08 Sep 2011 18:57:38 GMT
header: Cache-Control: private, max-age=0
header: X-Content-Type-Options: nosniff
header: X-Frame-Options: SAMEORIGIN
header: X-XSS-Protection: 1; mode=block
header: Server: GSE
header: Transfer-Encoding: chunked

Traceback (most recent call last):
  File "gam.py", line 2522, in <module>
  File "gam.py", line 2164, in doRequestExport
  File "gdata\apps\audit\service.pyo", line 230, in createMailboxExportRequest
  File "gdata\apps\service.pyo", line 532, in _PostProperties
gdata.apps.service.AppsForYourDomainException: {'status': 500, 'body': '<HTML>\n
<HEAD>\n<TITLE>Internal Server Error</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" T
EXT="#000000">\n<H1>Internal Server Error</H1>\n<H2>Error 500</H2>\n</BODY>\n</H
TML>\n', 'reason': 'Internal Server Error'}

Here is the java we are using with the same result:

import java.util.Calendar;
import java.util.List;

import com.google.gdata.client.appsforyourdomain.audit.AuditService;
import com.google.gdata.client.appsforyourdomain.audit.MailBoxDumpRequest;
import com.google.gdata.data.appsforyourdomain.AppsForYourDomainException;
import com.google.gdata.data.appsforyourdomain.generic.GenericEntry;
import java.io.*;
import java.net.*;


public class GoogleMailBoxMakeRequest {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        startExport(args[0], args[1], args[2]);
    }
   
   
    public static void startExport(String adminUser, String adminPwd, String userMail)
    {
        MailBoxDumpRequest request = new MailBoxDumpRequest();
        request.setAdminEmailAddress(adminUser);
        request.setUserEmailAddress(userMail);

        /*Calendar beginDate = Calendar.getInstance();
        beginDate.set(2009, Calendar.JULY, 1, 4, 30);
        request.setBeginDate(beginDate.getTime());

        Calendar endDate = Calendar.getInstance();
        //endDate.set(2011, Calendar.JUNE, 20, 20, 0);
        request.setEndDate(endDate.getTime());*/

        request.setIncludeDeleted(true);
        request.setPackageContent("FULL_MESSAGE");
       

        try
        {
            AuditService service = new AuditService(adminUser, adminPwd, "hyattvoi.com", "hyattvoi.com-auditapp-v1");
            GenericEntry mailboxDumpEntry = service.createMailboxDumpRequest(request);
            System.out.println(mailboxDumpEntry.getId());
        }catch(AppsForYourDomainException ex)
        {
            System.out.println(ex.getCodeName());
            System.out.println(ex.getInternalReason());
            ex.printStackTrace();
        }
        catch(Exception exp)
        {
            System.out.println(exp.getMessage());
        }
    }
}

Thank you


Jay Lee

unread,
Sep 8, 2011, 3:33:01 PM9/8/11
to google-app...@googlegroups.com
I'm able to reproduce this issue and another user is having similar problems on the GAM mail list:


this looks like it is an issue on Google's side. The XML that GAM is sending looks correct:

<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom" xmlns:ns1="http://schemas.google.com/apps/2006">
<ns1:property name="packageContent" value="FULL_MESSAGE" />
<ns1:property name="includeDeleted" value="true" /></ns0:entry>

and the POST URI also looks correct:

https://apps-apis.google.com/a/feeds/compliance/audit/mail/export/hyattvoi.com/<user>

can a Googler take a look server side and let us know if there's an issue with audit requests?

Jay

Shraddha Gupta

unread,
Sep 8, 2011, 5:42:41 PM9/8/11
to google-app...@googlegroups.com
Hello Scott,

We are investigation the issue, and will update you soon on that.

Thanks,
Shraddha Gupta

Claudio Cherubino

unread,
Sep 8, 2011, 7:04:27 PM9/8/11
to google-app...@googlegroups.com
The issue is now tracked at http://code.google.com/googleapps/support/downtime/?place=topic%2Fgoogle-apps-apis-downtime-notify%2FHZP-EglPN4M%2Fdiscussion.
Please follow that thread for updates.
Thanks for your patience

Claudio
Reply all
Reply to author
Forward
0 new messages