[horde] Proxy errors to downstream Horde server

Simon Wilson simon at simonandkate.net
Sun Jun 9 11:37:18 UTC 2013


My Horde box is reverse proxied by an Apache box - that box  
consistently logs these errors about every one to two minutes:

[Sun Jun 09 20:56:35 2013] [error] [client 59.167.157.243] (70007)The  
timeout specified has expired: proxy: error reading status line from  
remote server 192.168.1.230
[Sun Jun 09 20:56:35 2013] [error] [client 59.167.157.243] proxy:  
Error reading from remote server returned by  
/Microsoft-Server-ActiveSync

[Sun Jun 09 20:58:36 2013] [error] [client 59.167.157.243] (70007)The  
timeout specified has expired: proxy: error reading status line from  
remote server 192.168.1.230
[Sun Jun 09 20:58:36 2013] [error] [client 59.167.157.243] proxy:  
Error reading from remote server returned by  
/Microsoft-Server-ActiveSync

[Sun Jun 09 21:00:39 2013] [error] [client 59.167.157.243] (70007)The  
timeout specified has expired: proxy: error reading status line from  
remote server 192.168.1.230
[Sun Jun 09 21:00:39 2013] [error] [client 59.167.157.243] proxy:  
Error reading from remote server returned by  
/Microsoft-Server-ActiveSync

Everything seems to be working OK, and there are no issues logged at  
the actual Horde server...

The proxy's apache access log has entries like this recorded as  
originating at 120 seconds before each error pair:

59.167.157.243 - - [09/Jun/2013:20:54:35 +1000] "POST  
/Microsoft-Server-ActiveSync?Cmd=Ping&User=simon%40simonandkate.net&DeviceId=SEC10D1C297BE813&DeviceType=SAMSUNGGTI9500 HTTP/1.1" 502 434 "-"  
"SAMSUNG-GT-I9500/101.40202"

59.167.157.243 - - [09/Jun/2013:20:56:36 +1000] "POST  
/Microsoft-Server-ActiveSync?Cmd=Ping&User=simon%40simonandkate.net&DeviceId=SEC10D1C297BE813&DeviceType=SAMSUNGGTI9500 HTTP/1.1" 502 434 "-"  
"SAMSUNG-GT-I9500/101.40202"

59.167.157.243 - - [09/Jun/2013:20:58:39 +1000] "POST  
/Microsoft-Server-ActiveSync?Cmd=Ping&User=simon%40simonandkate.net&DeviceId=SEC10D1C297BE813&DeviceType=SAMSUNGGTI9500 HTTP/1.1" 502 434 "-"  
"SAMSUNG-GT-I9500/101.40202"


So my Samsung S4 is sending that POST request every minute or two  
(seems excessive?) and it is logged by the proxy server, and every  
time it is followed 120 seconds later by the proxy server logging the  
pair of errors, and a 502 recorded by the proxy.

The internal Horde server appears to be receiving the requests. e.g.:

192.168.1.155 - simon at simonandkate.net [09/Jun/2013:20:58:37 +1000]  
"POST  
/Microsoft-Server-ActiveSync?Cmd=Ping&User=simon%40simonandkate.net&DeviceId=SEC10D1C297BE813&DeviceType=SAMSUNGGTI9500 HTTP/1.1" 200  
-

The Horde server's Apache error logs are empty, so it is happy that  
it's done what it needs to (200 result), but for some reason it's not  
sending something back to the proxy. The Samsung ActiveSync  
functionally is working fine.


When my Apple devices Post, e.g.:


59.167.157.243 - - [09/Jun/2013:21:06:24 +1000] "POST  
/Microsoft-Server-ActiveSync?User=katie&DeviceId=ApplDLXFT8GMDKNW&DeviceType=iPad&Cmd=Ping HTTP/1.1" 200 27 "-"  
"Apple-iPad2C2/1002.329"

It's doing it approximately every 10 to 15 minutes (as opposed to  
every 1 or 2 for the Samsung).

This is the corresponding request on the Horde internal box:

192.168.1.155 - katie [09/Jun/2013:21:06:22 +1000] "POST  
/Microsoft-Server-ActiveSync?User=katie&DeviceId=ApplDLXFT8GMDKNW&DeviceType=iPad&Cmd=Ping HTTP/1.1" 200  
27

So that is complete end to end with 200s.


Something about the Samsung's POST request or the way it is being  
handled by the proxy or Horde is causing it to get 502s and generate  
errors, where the Apples requests complete fine. As a result, the  
Samsung is POSTing every 1 or 2 minutes...


Any suggestions on how to work through this - I'm hoping if it can be  
resolved that it will slow down my S4's battery consumption LOL...

Simon.

Apache configs:

PROXY

# Horde5 Webmail Proxy
<VirtualHost 192.168.1.155:443>
  SSLProxyEngine On
  SSLCertificateFile /etc/pki/tls/certs/simonandkate.net-cert.pem
  SSLCertificateKeyFile /etc/pki/tls/private/simonandkate.net-key.pem
  ServerName mail.simonandkate.net
  ProxyRequests off
  ProxyPreserveHost on
  <Proxy *>
   Order deny,allow
   Allow from all
  </Proxy>
   ProxyPass        / https://192.168.1.230/
   ProxyPassReverse / https://192.168.1.230/
  CustomLog logs/horde5proxy_log "combined"
</VirtualHost>

<VirtualHost 192.168.1.155:80>
  # Redirect http://mail.simonandkate.net to https://mail.simonandkate.net
  ServerName mail.simonandkate.net
  RedirectPermanent / "https://mail.simonandkate.net/"
</VirtualHost>

<VirtualHost 192.168.1.155:80>
# Redirect http://autodiscover.simonandkate.net to  
https://mail.simonandkate.net
  ServerName autodiscover.simonandkate.net
  Redirect /Autodiscover/Autodiscover.xml  
https://mail.simonandkate.net/Autodiscover/Autodiscover.xml
  Redirect /autodiscover/autodiscover.xml  
https://mail.simonandkate.net/Autodiscover/Autodiscover.xml
  Redirect /AutoDiscover/AutoDiscover.xml  
https://mail.simonandkate.net/Autodiscover/Autodiscover.xml
  Redirect / http://www.simonandkate.net
</VirtualHost>

HORDE

<VirtualHost 192.168.1.230:443>
   DocumentRoot /var/www/horde
   <Directory /var/www/horde>
     AllowOverride All
   </Directory>
   Alias /Microsoft-Server-ActiveSync /var/www/horde/rpc.php
   Alias /Autodiscover/Autodiscover.xml /var/www/horde/rpc.php
   SSLEngine on
   SSLCertificateFile /etc/pki/tls/certs/simonandkate.net-cert.pem
   SSLCertificateKeyFile /etc/pki/tls/private/simonandkate.net-key.pem
   CustomLog /var/log/httpd/horde5.log common
</VirtualHost>



--
Simon Wilson
M: 0400 12 11 16
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1339 bytes
Desc: PGP Public Key
URL: <http://lists.horde.org/archives/horde/attachments/20130609/c0e61d59/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: PGP Digital Signature
URL: <http://lists.horde.org/archives/horde/attachments/20130609/c0e61d59/attachment-0003.bin>


More information about the horde mailing list