iphone ActiveSync not working for SOME mailboxes - SBS 2003

Experts: About 1 week ago, SOME of my client users (Exchange SP2 on SBS 2003) started having problems sync'ing their iPhones using ActiveSync.

Basically, several users can sync fine using their 3G iPhones, and e-mail flows into their iPhone mailboxes nearly instantly. However, 3 other users (all company VIPs) suddenly started having the very annoying problem where their new mail would only dump into their iPhone inbox (via ActiveSync) every 4-12 hours....and there is no other way to get it to come in at all. I am able to mimic the most dependent iPhone user's sync issue on MY own iPhone (same model), and the EXACT same thing happens to me, so I know that it's not a device issue. What I have noticed when testing his account on my iPhone is that the mail app tries to connect to the server every 5-10 seconds, but doesn't bring in any content during those checks...it's almost as though that check is failing hundreds of times per day, and every so often, it will get through.

I have already followed Method 1 in the MS KB article "How to reset Virtual Directories..." here:
http://support.microsoft.com/kb/883380 , and I also re-ran the Internet Connectiion & Email config Wizard in SBS2003, but neither yielded a better result...both to no avail. I still cannot receive mail on demand testing with the CEO's affected mailbox.

Again, this problem is with just a few mailboxes using ActiveSync, while others have no such problem(s).

Thank you in advance for your help!

Brian :-)

ethernet69Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pamikenCommented:
sounds like a mailbox issue and not with the server as a whole since most users are working.  I would just export all the items in the mailbox to a pst file.  Then delete the mailbox (NOT the user).  Recreate the mailbox and import the items back.  See if the issue still exists.
Alan HardistyCo-OwnerCommented:
Please have a read through my Exchange 2003 / Activesync article and check your settings / run the tests and then report back any errors.
If you get stuck - I am only a post away!
http://www.experts-exchange.com/articles/Software/Server_Software/Email_Servers/Exchange/Exchange-2003-Activesync-Connection-Problems-FAQ.html 
MegaNuk3Commented:
Does the user have rules that move messages around too? Are all messages affected or just ones in specific folders take ages to synch?

Have a look at clearing the failing folders down. I.e. if the user has 10,000 mails in their inbox, then make another subfolder called Inbox_PreMay2010 and move everything into there, then does the synch issue still occur?

Does the affected user having anything else synching with Outlook their mailbox? A blackberry or locally connected PIM device?
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

ethernet69Author Commented:
alanhardisty:  I went through all the pre-requisites there and then did an IISRESET.  Some of the settings in IIS did not match, i.e. some of the virtual directories were using asp.net 2 instead of 1.  I did change all of these settings to match what you had listed, but we are still having the same issue even after doing an IISRESET.

One thing to note:  We have an empty mailbox setup for testing purposes and we configured an iPhone to to have email pushed from this mailbox, and we are still experiencing the same issue.  The iPhone will constantly check for email, find none, and then a large dump of email will come in hours late.  This leads me to believe it is not related to any mailbox rules or the amount of email in a mailbox.

It seems we do have one user who's activesync is working fine.  My boss said he setup the activesync profile for this specific user on his phone, and it worked without any issues.  All of the users are in the same storage group in exchange, as well.

ethernet69Author Commented:
Another thing to note.  When we are using an activesync profile that has issues on an iPhone, it seems to be checking for email every 5 seconds.  This is on an iPhone and it wears the battery down very fast from constantly checking.
Alan HardistyCo-OwnerCommented:
If Activesync is working for one - it should work for all.
If all of the users are in the same mail store, then this smells of store corruption to me and the only way to deal with that is to dismount the store and run the following:
eseutil /p (to repair the database)
eseutil /d (to defreagment the database)
isinteg -s servername -fix -test alltests (to check the integrity of the database - this should be run at least twice until you see 0 errors and 0 fixes in the last line of output).
Then mount the store and try syncing again.
If that does not work - please advise and I'll see what else I can find up my sleeve for you.
Alan
ethernet69Author Commented:
Thanks Alan. I agree that if ActiveSync is working for one, that it should work for all. After having created a brand-new user account with test mailbox today, and getting messages relatively quickly on my iPhone (though this connection was checking for mail/changes every 5 seconds), I really don't know what to think :-(

I don't mean to sound ungrateful or question your input, but if my client had issues with the Exchange Store, wouldn't there be other problems with using the Outlook (MAPI) client or OWA that would have presented themselves? I'm just wondering how an issue with ActiveSync would indicate that there's corruption in the mailstore when we have had no other outward symptoms. I'm happy to take them offline for several hours and run ESEUTIL & ISINTEG, but I wanted to be sure that this was prudent first :-)

Thanks,
Brian
Alan HardistyCo-OwnerCommented:
I totally understand that you don't want to rush to do the eseutil commands - they are very time consuming.  I would hope to see problems in OWA if there were store problems, but they don't always show up.
Have you tried the following (from my article):
Inconsistent Sync:
If you are getting inconsistent Synchronisation from your device to your Exchange 2003 server, please add the following registry key to the server:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\VirusScan
ProactiveScanning      REG_DWORD      1

You mentioned that this only started a couple of weeks ago.
Did anything particular happena round that time?  Any updates installed?  Any power surges / power cuts?  Any irregular shutdowns?
How big are your PRIV1.edb & PRIV1.stm files?
ethernet69Author Commented:
wow...you are FAST!!! :-)

I have NOT tried the registry fix you outlined above. Well, not too long before the ActiveSync (A.S.) problem started (maybe a 7-10 days), we were having problems with Inetinfo.exe going offline suddenly (the EXE would simply hang, which booted off OWA users AND our A.S. users, as A.S. is tied right into IIS). This problem happened sporadically, and without warning, though it was becoming more frequent (last time it happened 2 days in a row). We learned that all we would need to do is do a ping check check on our internal/OWA website, and run a automatic script using our RMM tool (Kaseya) to kill & re-lanch inetinfo.exe. We had gotten Microsoft support involved, but they couldn't find the clear culprit that was causing inetinfo.exe to "hang" (though it was still running in TM). Oddly enough, the problem has NOT happened since MS Support put some monitors (PoolMon) on the server, and I have since "closed" the ticket with Microsoft (they pushed to close it, though I felt it was a bit pre-mature) - they said I can always re-open it.

All that, of course, is related to IIS on the server, and A.S.is part of IIS. We also put a new version of the AVG security software (Business Security), re-branded and deployed thru the Kaseya RMM software.

So, do you think that there's a connection here? I tend to think it's not likely there's a DB corruption, but like I said, I'm happy to be proven wrong :-)

Cheers,
Brian
Alan HardistyCo-OwnerCommented:
Sorry about the speed ; )
Okay - try the Registry Key first - then reboot the server to make sure it has kicked in.
It might also be worth re-installing Exchange 2003 Service Pack 2 as this can often tidy up any issues with Exchange before heading off to the land of ESEUTIL.
I would then uninstall the AVG security software and reboot the server to see if that is causing you issues (you can always put it back afterwards).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ethernet69Author Commented:
Thanks Alan. I'd be happy to try that tonight, but business hours just ended, and my client is not there anymore. I can access the server remotely, but 50% of the time the server is rebooted, is comes back up with no network traffic on the NIC (not disabled, but you just can't reach the server). My client (or whoever is onsite) then has to disable & re-enable the NIC on the server, and we're back "online," so to speak. It's noteworthy that all services start, as the NIC sees itself as having a Network connection on reboot, but at some point goes unresponsive - highly frustrating since I live about 8.5 light years away from this client and do NOT want to deploy for that...LOL. This started happening last fall when a company that we outsourced our helpdesk/NOC support to installed TrendMicro Business Security on this server - even though Trend has been long gone, ever since this time I cannot reboot the server remotely cuz it will get me in trouble....ugh! :-(

Ok, so while this would be terrible troubleshooting form (and would make the DEFINITIVE answer elusive), should I make the registry edit AND remove AVG, then reboot once? I will be able to reboot as early as 8AM ET as someone will be onsite to disable/enable that stupic NIC for me...

Thanks,
Brian
Alan HardistyCo-OwnerCommented:
I totally understand.
It is recommended to make one change at a time so that you know what fixes the problem.  If you make two and it works - then you are none the wiser as to the fix.
ethernet69Author Commented:
Alan-

I agree...I woudl be none the wiser if I did that :-)

Question: Do you have any experience with Exchange ActiveSync (EAS) Verbose logging and where to turn that on? Also, do you know what the right syntax would be for LogParser 2.2 to "decrypt" the EAS logged components in the IIS logs?

Brian
ethernet69Author Commented:
Oops...meant to include this in my last post:

http://msexchangeteam.com/archive/2005/03/28/403047.aspx

Brian
ethernet69Author Commented:
Ok, I just installed the registry key, and server is rebooting right now. Does Exchange 2003 SP2 require a reboot? If not, I would probably download/install later today to tidy things up.
As a 3rd step, were you suggesting to remove AVG first (then rebooting) before running the ESEUTILs?
ethernet69Author Commented:
oops...last post was meant for Alan, or anyone who knows the answer for that matter :-)

Brian
Alan HardistyCo-OwnerCommented:
SP2 does not usually require a reboot.

Yes - lose AVG first and test.  If no good, run eseutil.
ethernet69Author Commented:
Thanks Alan. By the way, to answer your question from yesterday, Priv1.edb is ~ 9.5GB, and Priv1.stm is ~ 1.2GB...there are also a boatload of log files, which I understand can make the ESEUTIL process take a lot longer. Would you advise to use NTBackup simply for log-reduction purposes before running ESEUTIL, probably tonight? Also, how long should each take, repair & defrag, based on an approx 10GB Exchange DB?

Brian
Alan HardistyCo-OwnerCommented:
I have not seen the logs slow down eseutil before but having lots of them suggests you have not backed up.

It would be prudent to backup the stores first just in case.  Also, eseutil runs at about 4-6gb per hour, so you are looking at about 2 hours for /p, then the same for /d and then about the same for isinteg.
ethernet69Author Commented:
Actually, we do backup this client server every hour during business hours(we have a BDR/NAS device onsite with offsite replication plus virtualization if server crashes). We use Storage Craft's "ShadowProtect" for backups, which is also fully VSS aware; from what I understand, only NTBackup will purge those excessive log files, and it might make sense to "parse them down" before any database maintenance.
MegaNuk3Commented:
VSS aware backup software should purge the log files too. are you doing a full Exchange backup? Not a differential? Sorry, I don't know how "ShadowProtect" works.

Another thing for you to try is setting the user whose iPhone synchs every 5 seconds to "fetch" every 15 minutes instead of "push" and then see if the messages start arriving properly on the other devices.
MegaNuk3Commented:
If so, then you have 1 problem mailbox/Activesync pair to sort out instead of having to take down your whole Exchange database.

Have you looked in the IIS logs to see how quick the connections are being made and for which users? I have seen that earlier you posted a useful link about seeing what ActiveSync is actually doing from the IIS logs. Is it actually synching anything for the user/mailbox where it connects every 5 seconds?
ethernet69Author Commented:
alanhardisty:  We have tried all of your suggested fixes (aside from removing AVG), and we are still having the same issue syncing with OMA.  I'm going to take a look through the IIS logs here in a minute.  Do you have any other suggestions?
MegaNuk3Commented:
Yesterday, I had a client with the same issue where 1 iPhone would hit IIS every 4-7 seconds and not show anything as synching. The battery on that iPhone went from fully charged to flat within 6 hours.

The solution I came up with was:
1.) put the iPhone on Airplane mode
2.) install MobileAdmin on the Exchange 2003 server http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=e6851d23-d145-4dbf-a2cc-e0b4c6301453
3.) Delete all the device pairs from that user/mailbox. The user had 2 pairs, one for his iPhone and one for his previous windows mobile device that he hadn't used since getting the iPhone (over a year ago)
4.) turn airplane mode off on the iPhone and it will re-pair with exchange and will be visible in MobileAdmin again

The device will log loads in IIS for a couple of minutes while it resynchs everything and then it should go quiet and only synch every now and again and not every 4-7 seconds... It is still fine today after performing the steps above yesterday.

This has only happened recently where the user deleted and recreated their Exchange ActiveSync account on the iPhone to get rid of a 3 week old e-mail that couldn't be moved on the device, but could on Outlook. The Activesync account recreation on the device got rid of the 3 week old message, but then this 4-7 second IIS hit occured, which was slowing down delivery to other devices and eating this user's iPhone battery.
ethernet69Author Commented:
MegaNuk3....great feedback, thanks! This sounds quite pertinent. We will try this ASAP!

Brian
MegaNuk3Commented:
OK, good luck.

BTW step 3. above is done through the MobileAdmin tool(web page) you will see a "Remote Wipe" option, go into that. Then enter the "Mailbox display name" or SMTP address, then press the GREEN arrow to search. When the results are shown, click the "Delete" option on the right hand side to delete the pair.
Alan HardistyCo-OwnerCommented:
You can temporarily bypass this potential problem by the part in my article that reads:
To resolve this (if you like things tidy), please open up Exchange System Manager, Global Settings, Mobile Services Properties, Device Security Button, Exceptions Button, then add your account to the exceptions list.

If you add your problem users to the Exceptions list and try synching, then you should quickly see if the problems go away, then you can start nuking old Activesync pairings on the server.
ethernet69Author Commented:
I found one of the users with issues did have 4 devices registered to them.  I deleted all of them and had them re add their Exchange profile to their iPhone.  Did some testing and it seems the user is still having issues.

One curios thing that I noticed - The user's iphone seems to work fine and receive emails right away when Outlook is open on their work computer (Configured for Exchange).  When they close outlook, the phone will constantly check for email and it will not pull anything.
MegaNuk3Commented:
Have the IIS logs calmed down? Can you confirm that the user with this "outlook open" only has an Exchange account on their iPhone and nothing else like "mobileME"
Alan HardistyCo-OwnerCommented:
The registry Key mentioned in my article should be the answer to this problem:
Add the following registry key to the server:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\VirusScan
ProactiveScanning      REG_DWORD      1

 
ethernet69Author Commented:
Alan-

Ok, so we have found the culprit and it was, in fact, AVG causing the ActiveSync timeouts/errors for my clients' iPhones - very frustrating, but also very weird. Obviously they are happy that they are working again, but also confused as to how A/V software can cause this.
But first I wanted to say that I applied the above registry fix 3 different times (twice before finally removing AVG, and once after having re-installed it). EVERY time after the server rebooted, the registry key came back with a hex value of ZERO (instead of One) - in other words, I was making the change (and double-checking the registry value again before reboot), but after the reboot that key was set back to Zero...so frustrating. What do you think is "disallowing" this registry change to take place/stick? I don't think I've ever seen anything like this before, though this IS a week of firsts for me all-around.

A penny for your thoughts? :-)

Brian
MegaNuk3Commented:
Glad to hear it is working
MegaNuk3Commented:
Have you looked under HKLM\SOFTWARE\policies to see if there is anything in there that sets the key back to 0?
MegaNuk3Commented:
@Alanhardisty - maybe you should update your article to tell people to keep checking that ProActiveScanning value to ensure that is doesn't change back to 0 after a reboot ;-)
ethernet69Author Commented:
@ MegaNuk3 - "Have you looked under HKLM\SOFTWARE\policies to see if there is anything in there that sets the key back to 0?"

Can you please elaborate on that registry key you listed and how that would help? There are many values under that hive/key...
What I would like to know is how to make that change that "AlanHardisty" reference "stick" to the server's registry.

Brian
Alan HardistyCo-OwnerCommented:
I would imagine that AVG is resetting the registry key back to 0 and that there will be a setting somewhere in AVG that you can adjust to make the setting permanent and then your problem should go away.
What version of AVG are you using?
MegaNuk3Commented:
Use regedit and do a search for ProActiveScanning under the Policies key, see if it lists anything. Like Software\AVG\ProActiveScanning = 0
MegaNuk3Commented:
I with Alan on that one, it should be a setting you can set via the GUI. I reckon when the AVG service starts it is overwriting your reg key...
Alan HardistyCo-OwnerCommented:
Worth a read - AVG forum specific to this problem with additional registry settings:
http://forums.avg.com/us-en/avg-free-forum?sec=thread&act=show&id=55921 
ethernet69Author Commented:
Well, I can't do that on assumption that I'll find something, because it will instantly break the EAS/sync capability. I would ask for some more concrete info after my client has been "mired" with this for more than a week. I can't just re-install AVG and hope that I find something, then remove again, and reboot again...as you might imaging, the downtime is costing me a good bit of credibility :-(

Brian
Alan HardistyCo-OwnerCommented:
Get rid of AVG would be my recommendation.  Use an alternative product.
ethernet69Author Commented:
@alanhardisty
There are a couple different suggestions that are listed in the forum post, but neither are concrete. One suggests editing a whole different location in the registry (multiple keys), and another lists a GUI-type solution.

Thoughts?

Brian
Alan HardistyCo-OwnerCommented:
I don't have any experience of AVG I am afraid in a networked environment.
I would recommend trying the settings and seeing, but failing that I would be stripping AVG off the server and finding an alternative product that does not mess with Activesync.
ethernet69Author Commented:
We are Kaseya RMM users, and AVG is what we use, as it monitors and reports back to our web-based console if there are any problems. Right now removing AVG permanently is not the best solution. The ironic thing is that AVG has been running on this server for months, and we just now started having a problem...
Alan HardistyCo-OwnerCommented:
Probably a Windows Update that might have upset it.
You can always try reinstalling Exchange 2003 Service Pack 2.
ethernet69Author Commented:
At the risk of sounding ungrateful, I was hoping for something more concrete, like an actual AVG solution that is clear :-)
Alan HardistyCo-OwnerCommented:
Sorry - short of Googling - I don't have any AVG knowledge.  Not sure if MegaNuke has any experience.
Have you tried calling AVG and seeing what they have to say.  It is clearly an AVG issue.
MegaNuk3Commented:
Nope, sorry I don't have AVG experience either.

From the link Alan posted:
"this issue should be solved by enabling "Proactive scanning" in AVG VSAPI plugin (through Exchange Manager or AVG executable from plugins folder)"

Also as Alan says, it might be worth a call to AVG as they probably have a hotfix for this by now.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SBS

From novice to tech pro — start learning today.