Solved

Syncing iPad Calendars with Exchange 2010

Posted on 2014-03-13
18
2,028 Views
Last Modified: 2014-04-29
We are running Exchange 2010 on Windows Server 2008R2.  I am having problems syncing the calendar on iPads to our Exchange Server.  Email for these accounts sync without a hitch. When I try to sync the calendar, the event log of the exchange server gives the 1008 error below.  I went into OWA for this user and deleted the sync relationship, then tried to sync the iPad calendar and got the 1007 error below.  I have also deleted the account from the iPad repeatedly, and deleted it after removing the sync relationship, but to no avail.  This is not the only user on our network experiencing this problem.

Another symptom of this issue:
Sometimes when I access this user's account using OWA, although email shows up just fine, the calendar is not populated and I cannot switch views between daily, weekly, monthly, or show another user's calendar that has already been added to My Calendars.  I ran the command "New-MailboxRepairRequest -Mailbox Latika -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview" and sometimes it would fix it and sometimes I needed to run it a second time to get results.  After that, I could see the user's calendar populated in OWA.

More on this error:  If I log out of OWA, try to sync the calendar on the iPad, then log back into OWA, the calendar is not populated and the views controls don't work.  After running the MailboxRepairRequest, once the OWA calendar is fixed, if I don't check the calendar on the iPad, I can log out of OWA and then log back in and the calendar is populated.
_______________________________________________________________________________________________
1008 Error
An exception occurred and was handled by Exchange ActiveSync. This may have been caused by an outdated or corrupted Exchange ActiveSync device partnership. This can occur if a user tries to

modify the same item from multiple computers. If this is the case, Exchange ActiveSync will re-create the partnership with the device. Items will be updated at the next synchronization.

URL=/Microsoft-Server-ActiveSync/default.eas?User=LatPar&DeviceId=ApplDMPJD0AZDVGC&DeviceType=iPad&Cmd=Sync
--- Exception start ---
Exception type: Microsoft.Exchange.Data.Storage.SyncStateExistedException
Exception message: The sync state named 2 already exists.
Exception level: 0
Exception stack trace:    at Microsoft.Exchange.Data.Storage.SyncState.CreateSyncStateFolderInFolder(SyncStateInfo syncStateInfo, Folder syncStateParentFolder, PropertyDefinition[]

properties, Object[] values)
   at Microsoft.Exchange.Data.Storage.SyncState.CreateSyncStateStoreObject(SyncStateStorage syncStateStorage, SyncStateInfo syncStateInfo, Folder syncStateParentFolder, PropertyDefinition[]

properties, Object[] values)
   at Microsoft.Exchange.Data.Storage.FolderSyncState.CreateSyncState(SyncStateStorage syncStateStorage, Folder syncStateParentFolder, ISyncProviderFactory syncProviderFactory, String

syncFolderId)
   at Microsoft.Exchange.Data.Storage.SyncStateStorage.CreateFolderSyncState(ISyncProviderFactory syncProviderFactory, String syncFolderId)
   at Microsoft.Exchange.AirSync.SyncCollection.OpenSyncState(Boolean autoLoadFilterAndSyncKey, SyncStateStorage syncStateStorage)
   at Microsoft.Exchange.AirSync.SyncCommand.SyncTheCollection(SyncCollection collection, Boolean createSubscription, Boolean tryNullSync)
   at Microsoft.Exchange.AirSync.SyncCommand.OnExecute()
   at Microsoft.Exchange.AirSync.SyncCommand.ExecuteCommand()
   at Microsoft.Exchange.AirSync.Command.WorkerThread()
Inner exception follows below:
Exception type: Microsoft.Exchange.Data.Storage.ObjectExistedException
Exception message: Could not create folder 2.
Exception level: 1
Exception stack trace:    at Microsoft.Exchange.Data.Storage.FolderCreatePropertyBag.CreateMapiFolder()
   at Microsoft.Exchange.Data.Storage.FolderCreatePropertyBag.SaveFolderPropertyBag(Boolean needVersionCheck)
   at Microsoft.Exchange.Data.Storage.CoreFolder.Save(SaveMode saveMode)
   at Microsoft.Exchange.Data.Storage.Folder.Save(SaveMode saveMode)
   at Microsoft.Exchange.Data.Storage.SyncState.CreateSyncStateFolderInFolder(SyncStateInfo syncStateInfo, Folder syncStateParentFolder, PropertyDefinition[] properties, Object[] values)
Inner exception follows below:
Exception type: Microsoft.Mapi.MapiExceptionCollision
Exception message: MapiExceptionCollision: Unable to create folder. (hr=0x80040604, ec=-2147219964)
Diagnostic context:
    Lid: 55847   EMSMDBPOOL.EcPoolSessionDoRpc called [length=60]
    Lid: 43559   EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=244][latency=0]
    Lid: 23226   --- ROP Parse Start ---
    Lid: 27962   ROP: ropCreateFolder [28]
    Lid: 17082   ROP Error: 0x80040604
    Lid: 25953  
    Lid: 21921   StoreEc: 0x80040604
    Lid: 27962   ROP: ropExtendedError [250]
    Lid: 1494    ---- Remote Context Beg ----
    Lid: 26426   ROP: ropCreateFolder [28]
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x668F0040
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x3FE5000B
    Lid: 15348   StoreEc: 0xFFFFFA84
    Lid: 63733  
    Lid: 5079    StoreEc: 0x80040604
    Lid: 6255    StoreEc: 0x80040604
    Lid: 6511    StoreEc: 0x80040604
    Lid: 8047    StoreEc: 0x80040604
    Lid: 7310    StoreEc: 0x80040604
    Lid: 1750    ---- Remote Context End ----
    Lid: 31418   --- ROP Parse Done ---
    Lid: 22417  
    Lid: 30609   StoreEc: 0x80040604
    Lid: 29073  
    Lid: 20369   StoreEc: 0x80040604
Exception level: 2
Exception stack trace:    at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, SafeExInterfaceHandle iUnknown, Exception innerException)
   at Microsoft.Mapi.MapiFolder.CreateFolder(String folderName, String folderComment, Boolean openIfExists, Boolean createSearchFolder, Byte[] folderId)
   at Microsoft.Mapi.MapiFolder.CreateFolder(String folderName, String folderComment, Boolean openIfExists)
   at Microsoft.Exchange.Data.Storage.FolderCreatePropertyBag.CreateMapiFolder()
--- Exception end ---.
______________________________________________________________________________________________
1007 Error
Failed to create a sync state because one already exists with the same name. More information:

Microsoft.Exchange.Data.Storage.SyncStateExistedException: The sync state named 1 already exists. ---> Microsoft.Exchange.Data.Storage.ObjectExistedException: Could not create folder 1.

---> Microsoft.Mapi.MapiExceptionCollision: MapiExceptionCollision: Unable to create folder. (hr=0x80040604, ec=-2147219964)
Diagnostic context:
    Lid: 55847   EMSMDBPOOL.EcPoolSessionDoRpc called [length=60]
    Lid: 43559   EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=244][latency=0]
    Lid: 23226   --- ROP Parse Start ---
    Lid: 27962   ROP: ropCreateFolder [28]
    Lid: 17082   ROP Error: 0x80040604
    Lid: 25953  
    Lid: 21921   StoreEc: 0x80040604
    Lid: 27962   ROP: ropExtendedError [250]
    Lid: 1494    ---- Remote Context Beg ----
    Lid: 26426   ROP: ropCreateFolder [28]
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x668F0040
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x3FE5000B
    Lid: 15348   StoreEc: 0xFFFFFA84
    Lid: 63733  
    Lid: 5079    StoreEc: 0x80040604
    Lid: 6255    StoreEc: 0x80040604
    Lid: 6511    StoreEc: 0x80040604
    Lid: 8047    StoreEc: 0x80040604
    Lid: 7310    StoreEc: 0x80040604
    Lid: 1750    ---- Remote Context End ----
    Lid: 31418   --- ROP Parse Done ---
    Lid: 22417  
    Lid: 30609   StoreEc: 0x80040604
    Lid: 29073  
    Lid: 20369   StoreEc: 0x80040604
   at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, SafeExInterfaceHandle iUnknown, Exception innerException)
   at Microsoft.Mapi.MapiFolder.CreateFolder(String folderName, String folderComment, Boolean openIfExists, Boolean createSearchFolder, Byte[] folderId)
   at Microsoft.Mapi.MapiFolder.CreateFolder(String folderName, String folderComment, Boolean openIfExists)
   at Microsoft.Exchange.Data.Storage.FolderCreatePropertyBag.CreateMapiFolder()
   --- End of inner exception stack trace ---
   at Microsoft.Exchange.Data.Storage.FolderCreatePropertyBag.CreateMapiFolder()
   at Microsoft.Exchange.Data.Storage.FolderCreatePropertyBag.SaveFolderPropertyBag(Boolean needVersionCheck)
   at Microsoft.Exchange.Data.Storage.CoreFolder.Save(SaveMode saveMode)
   at Microsoft.Exchange.Data.Storage.Folder.Save(SaveMode saveMode)
   at Microsoft.Exchange.Data.Storage.SyncState.CreateSyncStateFolderInFolder(SyncStateInfo syncStateInfo, Folder syncStateParentFolder, PropertyDefinition[] properties, Object[] values)
   --- End of inner exception stack trace ---
   at Microsoft.Exchange.Data.Storage.SyncState.CreateSyncStateFolderInFolder(SyncStateInfo syncStateInfo, Folder syncStateParentFolder, PropertyDefinition[] properties, Object[] values)
   at Microsoft.Exchange.Data.Storage.SyncState.CreateSyncStateStoreObject(SyncStateStorage syncStateStorage, SyncStateInfo syncStateInfo, Folder syncStateParentFolder, PropertyDefinition[]

properties, Object[] values)
   at Microsoft.Exchange.Data.Storage.FolderSyncState.CreateSyncState(SyncStateStorage syncStateStorage, Folder syncStateParentFolder, ISyncProviderFactory syncProviderFactory, String

syncFolderId)
   at Microsoft.Exchange.Data.Storage.SyncStateStorage.CreateFolderSyncState(ISyncProviderFactory syncProviderFactory, String syncFolderId)
   at Microsoft.Exchange.AirSync.SyncCollection.OpenSyncState(Boolean autoLoadFilterAndSyncKey, SyncStateStorage syncStateStorage)
   at Microsoft.Exchange.AirSync.SyncCommand.SyncTheCollection(SyncCollection collection, Boolean createSubscription, Boolean tryNullSync)
   at Microsoft.Exchange.AirSync.SyncCommand.OnExecute()
   at Microsoft.Exchange.AirSync.SyncCommand.ExecuteCommand()
   at Microsoft.Exchange.AirSync.Command.WorkerThread()
0
Comment
Question by:Stolzman
  • 9
  • 7
  • 2
18 Comments
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39927626
Are the devices on the latest iOS? Apple have had a LOT of problems with calendar sync.

Simon.
0
 
LVL 35

Expert Comment

by:Bembi
ID: 39927710
jepp, i just can only confirm Sembees comment....
Make sure Exchange is updated and iOS is actual.
I just recognized strange issues again wth brand new iPads and Exchange 2013.

Following your description, some of your iOS are working? So just compare the Versions. If the iOS is 7.x there are additional issues, so try to upgrade and see what works.

I just had the issue with EX 2013 where we got iOS 7.3 got running with Ex2013 RU3
0
 
LVL 1

Author Comment

by:Stolzman
ID: 39927903
yes, the two devices I am aware of that are having problems syncing are both up to date, having applied the latest update in the last day or so.  There are other iPads and iPhones that ARE syncing their calendars.  Some of the iPads that sync successfully are running 7.0, some 7.1.  Also, Exchange is fully patched and up to date.
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39928902
You should keep this KB article bookmarked. It is the known issues with ActiveSync that Microsoft have: http://support.microsoft.com/kb/2563324

However my instinct is that there is a corrupt calendar item in the mailbox somewhere, and that is causing ActiveSync to choke.

Simon.
0
 
LVL 35

Expert Comment

by:Bembi
ID: 39929256
...and, if not done anyway....
If you recreate a connection agreement..., completely remove all settings from the iOS and reboot the device. Switch it off and keep it off for a minute...
Then recreate the connetion and see, if it is working.
Removing and just recreating alone mostly didn't work for us,
0
 
LVL 1

Author Comment

by:Stolzman
ID: 39938140
I tried your suggestion to no avail: remove the account from the iPad and turn it off, unpair the iPad from the account, turn on the iPad and re-add the account.  Here is some more info that might be helpful.  This info is about OWA, since the iPad retrieves email over the web app.

When I log into OWA in chrome, the affected calendar does not display, I can't click on other user's calendars, and I can't switch views.  In the past, running the Exchange Powershell command "New-MailboxRepairRequest -Mailbox LatPar -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview" would repair the mailbox and I could view it in Chrome.  Sometimes I would have to run the command more than once to get this effect.  Now, no matter what I do, I can't view it in Chrome.  Other accounts view in Chrome with no problem.

However, when I view the account in Firefox, everything works, even when it doesn't work in Chrome.  Apparently, the exchange server is serving up the info.

Any other suggestions?
0
 
LVL 35

Expert Comment

by:Bembi
ID: 39940594
Maybe Sembee is right, corupted items in the mailbox. I have seen a lot of such items during migrations.

One idea is - instead of repairing all the times the mailbox - to create a second mailbox in exchange, move th emailbox to the other database an see, if this works without issues. If there are issues, the mailbox move may fails and gives you some hints in the move log, where.
I have seen issues with older recuring calendar items, especially if such items are coming from older exchange mailboxes. If possible, you may try to move calendar items -in the list view - to a new calendar folder to see, if ou can move all of the or some items are denied.

Another log message would point me to the
- MapiExceptionCollision: Unable to create folder
- The sync state named 1 already exists. ---> Could not create folder 1.
Do you have subfolders in the calender?

For this a  procedure....
Create a new calendar folder....
Move all calendar items out into this new folder.
Recreate the sync between iPadand Exchange
Check Crome
Create some new calendar items (in the default calendar folder) to check the view / sync
Move back the calendar items to see, if it breaks after the move back....

This gives you at least a hint, if calender sync doesn't work at all (even with an empty calender) or it fails on the content.
0
 
LVL 1

Author Comment

by:Stolzman
ID: 39962789
Things continue to get stranger.  A couple of days ago, contacts stopped syncing for a couple of iPad users.  One user had 486 contacts in Outlook, but only 267 on her iPad.  Now, the calendars have reappeared for these two users, but the calendar still does not show up in Chrome.

Let's wait a couple of days and see what changes over the weekend.
0
 
LVL 35

Expert Comment

by:Bembi
ID: 39967484
Can it have something to do with the size?
See https://discussions.apple.com/thread/4357376
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Author Comment

by:Stolzman
ID: 39967754
I doubt that size is the issue, because emails are syncing just fine.  It's calendar items and contacts that are not syncing.
0
 
LVL 35

Expert Comment

by:Bembi
ID: 39970447
At least iPads and Exchange is a common mess, we run usually into trouble with devices, but could solve them mostly by the hints stated above. As you can see, the error message points to MAPI and this is a not quite easy to follow up topic.

Following the errors bove again, you may try the following:
In Outlook (2010 an above) you can connect to several mailboxes at the same time. This allows you to move items around. You may try to create a new mailbox (empty) and establish the connection between iPad and empty mailbox. Create then some items to make sure, all items are synced to the iPad. This prooves the base functionality. If it doesn't work, you can at least see, that there is a basic connection problem what we usually could fi by the lates exchange updates as well as the lates iOS updates.

If the general snyc works, you can start to move the real content into this mailbox to see, if it stops somewhere with items, you moved into the empty mailbox. This gives you a clue, if there are corrupted items in the folder, when the sync stops working.

As MAPI works with a lot of tags, the other partner may run into problems, you may be able to isolate items, which do not wan tto work in the sync agreement.

Also make sure, you avoid common troublemakers, like folders with special characters or folder names just like 1,2,3 oder folder names which start with a number etc. Also some items like group calendars, invitation messages are sometimes a point of failure, Even I have seen problems with older calendar items from earlier outlook versions, which even failed with MS devices.
0
 
LVL 1

Author Comment

by:Stolzman
ID: 40005416
Hi, I followed Bembi's suggestions in the post above.  I was able to create a new account on the exchange server and connect with the iPad and sync items with no problem.

I then took a backup of the offending mailbox and restored it to the new mailbox. Again, things sync'ed with no problem.

Now, when I reconnect the iPad to the offending account, not only does the calendar not sync, but folders in the inbox are empty on the iPad but not on the exchange server.

Seems that there is a major problem with the account on the server.  I am reluctant to destroy and recreate the mailbox, because when I did this with another user, users could not email him using the dropdown email address in outlook, and this generated a number of help desk calls.

Any suggestions on the next step?  I really don't want to create problems for this user.
0
 
LVL 35

Expert Comment

by:Bembi
ID: 40013023
OK, as I understood you recovered the users mailbox into a test mailbox?

And the new account worked fine including all of the content?
Have you really tested everything? means also some of the folders, esp. inside th inbox?

By the way, sorting intems inside the inbox never was a good idea..., for several reasons.

If you reconnect to the old account, have you switched off the IPhone before you recreated the sync?

Before you go the way, to recreate the mailbox, you may have a look into the AD attributes of the two users (user - testaccount). Maybe you find something interesting there. But my throught is more something, what is inside the mailbox.

What is - like you made it with the test account -
to backup the users mailbox. Clean it completely and recreate the items from the backup?
0
 
LVL 1

Author Comment

by:Stolzman
ID: 40013431
I exported the user's mailbox to a .pst using the New-MailboxExportRequest command and then imported the data into the new test mailbox using New-MailboxImportRequest.  This new test mailbox was then able to sync with the ipad no problem.  I set the account to retreive all email and was able to sync emails in the inbox and all subfolders.  Contacts and calendar items also synced, and when I created items in Outlook or the iPad, they synced just fine and showed up in both places.

Then I deleted everything in the user's mailbox (but did not delete the mailbox) and imported the data from the .pst using the commands above. I was able to get email, but not to sync contacts or calendar items. And I DID disconnect the user's iPhone from here account in OWA before re-adding the account.

My next step is to delete the user's mailbox and then import the data from a .pst using the above techniques.  However, I am reluctant to do this because it causes problems emailing the person after this is done.  If you have another suggestions for a next step, I'd love to hear.

Couple of questions for Bembi:

1)  Why is it not a good idea to sort items in the inbox?  Reasons/references?
2)  Where in AD are you suggesting I look for attributes of the two mailboxes?
0
 
LVL 1

Author Comment

by:Stolzman
ID: 40013627
Also, attached is the exchange connection log.
EASMailboxLog-latika-iPad-ApplDM.txt
0
 
LVL 35

Accepted Solution

by:
Bembi earned 500 total points
ID: 40017000
OK, first the questions:
1.) If you open the mailbox, the inbox is, what is loaded first / shown first / synched first. If there is a huge amount of content, it slows down the open sequence of outlook or just the time, new items are shown (depends from the mode). MS raised the earlier item based limits to about 100k, but I already give this advice to my customers and ge usually a positive feedback.  
The other argument is just, that folders outside the default outlook folders are independent from them. If something crashes, not the biggest deal to move them around. If one of the defualt folders is damaged, than everything what is inside maybe affected. If such folders should be synchronized, the user has actively enable them, which the default inbo is enabled by default. Then the synch mechanism has to check the whole huge content.

2.) All exchange attributes are stored in the user AD properties. All these properties start with MSExch....
For easier view, use ADExplorer from sysinternals.

Coming back to your sync issue....
And to our log....
I see....

What I can see is, that the initial sync request is a full folder sync and that the client fails to fetch items. While the default folders are well known items, a the subfolders has to be enumerated and I guess somewhere here starts the problem.
That the situation may change can just have something to do with the way / order / results of the sync request. If items are changed on one side, a folders needs to be enumerated, if nothing changed, nothing happens.

Deleted items in a mailbox are not really deleted, they are just marked as deleted. And even if you remove them out of the "deleteted items" folder, there are still recoverable. If you recover such items from a pst, the chance is big that you just recover the old items rather than to create new ones, what means, corupted items stays corrupt.
If you recover the items into a new mailbox,, all items are newly created because they never exists before.

What you can try is to empty the users mailbox and to move the items back to the mailbox from the test mailbox, not by recovering them from the pst.
Another try is to create a new MS Exchange mailbox DB and to move the mailbox to this new database. Also this procedure enforces, that all items are newly written and mostly the procedure throws an error, when it tries to move corrupted items.

If there is no other idea as to recreate the mailbox, the problems with the clients are usually due to the local address cache.... The address cache can be deleted by a command line switch for outlook, but I guess you know this solution?
0
 
LVL 1

Author Comment

by:Stolzman
ID: 40030632
Well, I finally had to delete the mailbox and recreate it and import the data in the fashion suggeted above, and that seemed to work.  However, be aware that when this is done, people have problems emailing this user until the GAL is updated. Also, using autosuggest for this user does not work until this entry is deleted and recreated.  Thanks, Bembi for hanging with me in this.
0
 
LVL 1

Author Closing Comment

by:Stolzman
ID: 40030633
thanks for your help and sticking with me in this
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Easy CSR creation in Exchange 2007,2010 and 2013
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
how to add IIS SMTP to handle application/Scanner relays into office 365.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now