Troubleshooting (Z-Push)
This is by no means an exhaustive guide to troubleshooting Zimbra Z-Push, I manage a very modest installation, which, as a result will not turn up a huge range of problems to investigate.
The Basics
If things aren't behaving as expected, you need to identify which component is experiencing the problem...
- Mobile device
- Instigates connection to Z-Push, the client
- Webserver (eg Apache)
- Provides network services for Z-Push
- Z-Push
- Provides ActiveSync to mobile device, the front-end
- Zimbra backend
- Provides interface between Z-Push and Zimbra
- Zimbra
- Hosts account mailboxes, the server
Understanding the scope of the fault may aid in reducing the above list of components to investigate...
|
As with all fault finding, there is only so much prescriptive investigation that can be done - you need to understand how your system works and so be able to identify where the problem lies.
- Browse to your server's ActiveSync URL, eg http://as.domain.com/Microsoft-Server-ActiveSync
- If you get a blank page and nothing else, the webserver (eg Apache) is failing to deliver the page. This is most likely due to a PHP error and you'll need to look at the webserver logs.
- You should be prompted for a username and password (for an account on your Zimbra server), in which case your webserver is working correctly
- Enter a valid Zimbra acount user/pass
- You should get a "GET not supported" page
- If not, then Z-Push is unable to sucessfully authenticate the supplied user/pass, investigate the Zimbra audit logs
Assuming the above works, then the basic configuration and interconnectivity of the components (excluding mobile devices) is working.
Tailing the Z-Push log (EG tail -f /var/www/z-push/debug.txt) whilst forcing a device to sync can be worth a try, in case there are some obviosu errors to fix. If you're not seeing any activity in the Z-Push log for the device, that suggests that the device is either failing to initiate a sync, or is unable to reach the ActiveSync URL.
Logging
Z-Push
By default Z-Push will log to debug.txt, though this will only work if the webserver has write access. Similarly the logging cannot be turned off, so to prevent a large logfile remove write access to the file.
To reduce the amount of data the appears in the log, XML output can be turned off by editing wbxml.php...
define('WBXML_DEBUG', false);
Zimbra Backend
The Zimbra Backend does not have its own log, it writes to the Z-Push log. Logging can be enabled by setting the following entry in config.php. Having this enabled creates alot of logging, sync contents (of emails, contacts, appointments etc) can be visible.
define('ZIMBRA_DEBUG',true);
Zimbra
The following logs can be worth investigating...
| Log | Notes |
|---|---|
/opt/zimbra/log/audit.log
|
Security auditing log
You should see access to your Zimbra server's SOAP URL from the webserver hosting Z-Push using the account that is trying to sync |
/var/log/zimbra.log
|
Zimbra mail log
You should see any in/outgoing email being logged. |
Reset Device Synchronisation
If a particular mobile device is experiencing sync issues, it can be useful to force it to start afresh.
- Identify the device's Mobile Device ID
- Search the
debug.txtfile fordevidand a username used by the device to connect- EG
egrep -w 'devid|username' debug.txt, whereusernameis substituted appropriately - Example log line:
... Statemachine _devid initialized with samsung1234510043207510 for user username
- EG
- It can probably be found on the device as well, eg on Android this can be seen when adding a new Microsoft Exchange ActiveSynce account
- Search the
- Delete all accounts from the device that access Z-Push
- Delete the state data for the device
- EG
rm -fr state/samsung1234510043207510/
- EG
- Recreate the accounts on the device
- Remember not to sync SMS