Troubleshooting (Z-Push): Difference between revisions
(Initial creation) |
m (Spelling corrections etc) |
||
Line 28: | Line 28: | ||
#* 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. | #* 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 | #* 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 | # Enter a valid Zimbra account user/pass | ||
#* You should get a "GET not supported" page | #* You should get a "GET not supported" page | ||
#* If not, then Z-Push is unable to | #* If not, then Z-Push is unable to successfully 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. | Assuming the above works, then the basic configuration and interconnectivity of the components (excluding mobile devices) is working. | ||
Tailing the [[#Z-Push|Z-Push log]] (EG <code>tail -f /var/www/z-push/debug.txt</code>) whilst forcing a device to sync can be worth a try, in case there are some | Tailing the [[#Z-Push|Z-Push log]] (EG <code>tail -f /var/www/z-push/debug.txt</code>) whilst forcing a device to sync can be worth a try, in case there are some obvious 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 == | == Logging == | ||
If possible, limit the amount of syncing that's taking place when investigating a problem in the logs. Stop any devices that you can from syncing, and especially on a specific device you're interested in, stop all syncing, and then manually force a sync for a particular data type (calendar, contacts, etc). You're ability to do this will be governed by your users, and types of devices that are syncing. | |||
=== Z-Push === | === Z-Push === | ||
By default Z-Push will log to <code>debug.txt</code>, 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. | By default Z-Push will log to <code>debug.txt</code>, 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. |
Latest revision as of 12:07, 1 June 2012
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 account user/pass
- You should get a "GET not supported" page
- If not, then Z-Push is unable to successfully 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 obvious 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
If possible, limit the amount of syncing that's taking place when investigating a problem in the logs. Stop any devices that you can from syncing, and especially on a specific device you're interested in, stop all syncing, and then manually force a sync for a particular data type (calendar, contacts, etc). You're ability to do this will be governed by your users, and types of devices that are syncing.
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.txt
file fordevid
and a username used by the device to connect- EG
egrep -w 'devid|username' debug.txt
, whereusername
is 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