King0770-Notes-error-decoding-message

Revision as of 17:44, 24 March 2015 by Jorge de la Cruz (talk | contribs)

When users are using the Zimbra Web-Client (ZWC), and see an error similar to this:

method:	SearchRequest
msg:	system failure: error decoding message 126126 metadata: d1:f148:== Training Services == Dear Joe Smith, The our company is conducting hands-on 
code:	service.FAILURE
detail:	soap:Receiver
trace:	btpool0-29240://mail.domain.com/service/soap/SearchRequest:1275499934607:8524a3793d0646a2
request:	

Body: {
  SearchRequest: {
    _jsns: "urn:zimbraMail",
    limit: 50,
    locale: {
      _content: "en_US"
     },
    offset: 0,
    query: "in:"inbox/Integration/works"",
    sortBy: "dateDesc",
    types: "message",
    tz: {
      id: "America/Los_Angeles"
     }
   }
 },
Header: {
  context: {
    _jsns: "urn:zimbra",
    account: {
      _content: "jsmith@domain.com",
      by: "name"
     },
    authToken: "(removed)",
    notify: {
      seq: 11
     },
    session: {
      _content: 164780,
      id: 164780
     },
    userAgent: {
      name: "ZimbraWebClient - FF3.0 (Win)",
      version: "6.0.6_GA_2324.RHEL5_64"
     }
   }
 }

This could be a sign, that the metadata in the message is corrupted. What will likely need to happen is to copy the message to /tmp, remove the corrupted metadata, and readd the message.

First you need to locate the path of the message. In the above example, the ID if the message is 126126. If you know the ID of the mailbox, and the ID of the message, use the zmmetadump tool to show the message path in the store.

zmmetadump -m 13 -i 126126


Look for the blob path in the output. This output should look something similar to this:
The line containing the [Blob Path] is what you are needing.

[] INFO: Setting mysql connector property: maxActive=100
[] INFO: Setting mysql connector property: maxActive=100
[Database Columns]
  mailbox_id: 13
  id: 126126
  type: 5
  parent_id: <null>
  folder_id: 2
  index_id: 126126
  imap_id: 126126
  date: 1275500831 (Wed 2010/06/02 11:47:11 MDT)
  size: 2046
  volume_id: 1
  blob_digest: IQLaa2e9,1,TXMn34l6E0r+A1WQ=
  unread: 1
  flags: 0
  tags: 0
  sender: xxxxxx
  subject: works
  name: <null>
  mod_metadata: 28832
  change_date: 1275500831 (Wed 2010/06/02 11:47:11 MDT)
  mod_content: 28832

[Blob Path]
/opt/zimbra/store/0/13/msg/9/126126-xxxxx.msg

[Metadata]
MetaData version = 10
{
  f = 
  s = 
}

Once you know of the blob path, and the ID of the account, and the ID of the message, you should be able to do the following.


1) Copy the message to /tmp
cp /opt/zimbra/store/0/13/msg/9/126126-xxxxx.msg /tmp

2) Set the corrupted metadata on the message to NULL
mysql -e "update mboxgroup13.mail_item set metadata='NULL' where mailbox_id=13 and id=126126"

3) Remove the message
zmmailbox -z -m jsmith@domain.com dm 126126 (this should work, if not, try the di option)

4) Verify the message was actually removed from /opt/zimbra/store/0/13/msg/9/

5) Readd the message back into the user's account.
zmmailbox -z -m jsmith@domain.com am Inbox /tmp/126126-xxxxx.msg

6) Retest if searching is successful (should not generate any errors).

Notable RFE: https://bugzilla.zimbra.com/show_bug.cgi?id=47658

Jump to: navigation, search