AutoDiscovery is not working
Results 1 to 7 of 7

Thread: AutoDiscovery is not working

  1. #1
    Member
    Join Date
    May 2012
    Posts
    46

    AutoDiscovery is not working

    Hi ZeXtras,

    I've been trying to get AutoDiscovery to work on my test VM but it fails to return valid xml. Here is my environment:

    zmcontrol -v:
    HTML Code:
    Release 8.0.0.GA.5434.UBUNTU12.64 UBUNTU12_64 FOSS edition.
    zxsuite core getVersion:
    HTML Code:
            zextras_version                                     1.8.18
            zextras_target                                      8.0.0
            zextras_commit                                      3059c6f79b2810b3bec750378cc1ea78a2e5f5e0
            zextras_lib_version                                 1.0.0
            zextras_lib_commit                                  3f5febe98cc757c290650e6a9601977f1c96e18e
    DNS Configuration:

    Code:
    SRV Record:
    Service:_autodiscover
    Protocol:_tcp
    Name:domain.com
    Priority:10
    Weight:2
    Port:443
    Target:mail.domain.com
    I've used this too to test Exchange AutoDiscovery among with an Android 4.4.4 device: https://testconnectivity.microsoft.com/. It fails at:
    Code:
    Attempting to send an Autodiscover POST request to potential Autodiscover URLs.
     	Autodiscover settings weren't obtained when the Autodiscover POST request was sent.
     	
    	Additional Details
     	
    	Test Steps
     	
    	The Microsoft Connectivity Analyzer is attempting to retrieve an XML Autodiscover response from URL https://mail.domain.com:443/Autodiscover/Autodiscover.xml for user admin@domain.com.
     	The Microsoft Connectivity Analyzer failed to obtain an Autodiscover XML response.
     	
    	Additional Details
     	
    The Response element in the payload was null. 
    <?xml version="1.0"?>
    <Autodiscover xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006" />
    HTTP Response Headers:
    Content-Length: 613
    Content-Type: text/xml
    Date: Sun, 05 Oct 2014 23:04:51 GMT
    Elapsed Time: 1415 ms.
    Extract from /opt/zimbra/log/sync.log:
    Code:
    2014-10-06 00:59:57,086 INFO  [qtp345520345-107:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [] sync - Handling autodiscover request...
    2014-10-06 00:59:57,235 WARN  [qtp345520345-107:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [] sync - No basic auth header in the request
    2014-10-06 00:59:57,235 WARN  [qtp345520345-107:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [] sync - HTTP/1.1 401 Unauthorized
    2014-10-06 00:59:57,418 INFO  [qtp345520345-107:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [] sync - Handling autodiscover request...
    2014-10-06 00:59:57,574 INFO  [qtp345520345-107:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [name=admin@domain.com;tid=107;] sync - Cached auth NOT found for admin@domain.com
    2014-10-06 00:59:57,610 INFO  [qtp345520345-107:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [] sync - sending autodiscover response...
    zxsuite core getproperty ZxCore_LogLevel:
    Code:
    ZxCore_LogLevel                                             0 (1)
    cat /etc/lsb-release:
    Code:
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=12.04
    DISTRIB_CODENAME=precise
    DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"
    uname -a:
    Code:
    Linux pcmonitor 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    I've even tried adding a debug logger for the admin@domain.com but it only logged this: (command used was: zxsuite mobile doAddAccountLogger admin@domain.com debug /opt/zimbra/log/admin_debug.log)
    Code:
    2014-10-06 00:58:51,287 [ZxLink Handler Thread] info Logging admin@domain.com
    I've inputed the following fields in the test wizard:
    Code:
    Email Address: admin@domain.com
    Domain\\UserName: admin@domain.com
    Password: <password>
    Confirm Password: <password>
    Ignore SSL: No
    I understand: Yes
    Here is my /opt/zimbra/jetty/etc/jetty.xml.in relevant extract:
    Code:
        <Set name="handler">
          <New id="Handlers" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
            <Set name="rewriteRequestURI">true</Set>
            <Set name="rewritePathInfo">false</Set>
            <Set name="originalPathAttribute">requestedPath</Set>
            <Call name="addRule"><Arg><New class="org.eclipse.jetty.rewrite.handler.MsieSslRule"/></Arg></Call>
            <!-- map convenience URLs to the webapp that handles them -->
            <Call name="addRule">
                <Arg>
                    <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
                        <Set name="pattern">/Microsoft-Server-ActiveSync/*</Set>
                        <Set name="replacement">/service/extension/zimbrasync</Set>
                    </New>
                </Arg>
            </Call>
            <Call name="addRule">
                <Arg>
                    <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
                        <Set name="pattern">/autodiscover/*</Set>
                        <Set name="replacement">/service/extension/autodiscover</Set>
                    </New>
                </Arg>
            </Call>
            <Call name="addRule">
                <Arg>
                    <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
                        <Set name="pattern">/Autodiscover/*</Set>
                        <Set name="replacement">/service/extension/autodiscover</Set>
                    </New>
                </Arg>
            </Call>
            <Call name="addRule">
                <Arg>
                    <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
                        <Set name="pattern">/AutoDiscover/*</Set>
                        <Set name="replacement">/service/extension/autodiscover</Set>
                    </New>
                </Arg>
            </Call>
    Any ideas what I did wrong?

    Thanks,
    Paul

  2. #2
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,342
    Hello Paul!

    Your settings look fine, I'll run some tests and get back to you as soon as possible!

    Have a nice day,
    Cine
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  3. #3
    Member
    Join Date
    May 2012
    Posts
    46
    Thank you Cine. I appreciate it.

  4. #4
    Member
    Join Date
    May 2012
    Posts
    46
    Not trying to rush things but I'd like to know if there's something I did wrong or if this is a bug that will be fixed in a future release.

  5. #5
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,342
    Hello iamcypher!

    ZeXtras Suite 1.10.0, which has been released seconds ago, includes a huge overhaul of the AutoDiscovery feature which should solve your issue, could you please update and let me know the outcome?

    Have a nice day,
    Cine
    the ZeXtras Team
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  6. #6
    Member
    Join Date
    May 2012
    Posts
    46
    Hi Cine,

    Thank you for the update. I've updated ZeXtras to 1.10.0 and it did pass a few more steps in the autodiscover tests but it failed the last one.

    /opt/zimbra/log/sync.log extras:
    Code:
    2014-10-29 22:37:41,257 INFO  [qtp1215271166-176:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [tid=176;] sync - Autodiscover: received POST request
    2014-10-29 22:37:41,258 INFO  [qtp1215271166-176:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [tid=176;] sync - Autodiscover: authentication attempt with username admin@domain.com
    2014-10-29 22:37:41,258 INFO  [qtp1215271166-176:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [tid=176;] sync - Autodiscover: Cached auth found for admin@domain.com id: ba8bd555-902b-4e8f-bb3f-1649af22a68f
    2014-10-29 22:37:41,258 INFO  [qtp1215271166-176:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [tid=176;] sync - Autodiscover: authentication successful
    2014-10-29 22:37:41,259 INFO  [qtp1215271166-176:https://192.168.1.56:443/Autodiscover/Autodiscover.xml] [tid=176;] sync - Autodiscover: Sending reply: <?xml version='1.0' encoding='UTF-8' standalone='no' ?>
    <n0:Autodiscover xmlns:n0="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
      <n0:Response>
        <n0:User>
          <n0:DisplayName>admin</n0:DisplayName>
          <n0:EMailAddress>admin@domain.com</n0:EMailAddress>
        </n0:User>
        <n0:Action>
          <n0:Settings>
            <n0:Server>
              <n0:Type>MobileSync</n0:Type>
              <n0:Url>https://mail.domain.com:443/Microsoft-Server-ActiveSync</n0:Url>
              <n0:Name>https://mail.domain.com:443/Microsoft-Server-ActiveSync</n0:Name>
              <n0:ServerData>CertEnroll</n0:ServerData>
            </n0:Server>
          </n0:Settings>
        </n0:Action>
      </n0:Response>
    </n0:Autodiscover>
    This is what the Exchange test says:
    Code:
    Attempting to send an Autodiscover POST request to potential Autodiscover URLs.
      Autodiscover settings weren't obtained when the Autodiscover POST request was sent.
      
      Additional Details
      
      Test Steps
      
      The Microsoft Connectivity Analyzer is attempting to retrieve an XML Autodiscover response from URL https://mail.domain.com:443/Autodiscover/Autodiscover.xml for user admin@domain.com.
      The Microsoft Connectivity Analyzer failed to obtain an Autodiscover XML response.
      
      Additional Details
      
    The Autodiscover XML response received by the Microsoft Connectivity Analyzer was invalid. Exception: Exception details:
    Message: There is an error in XML document (0, 0).
    Type: System.InvalidOperationException
    Stack trace:
    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
    at Microsoft.Exchange.Tools.ExRca.Tests.AutoDiscover.AutoDiscoverGetXMLBase`2.Discover()
    Exception details:
    Message: Root element is missing.
    Type: System.Xml.XmlException
    Stack trace:
    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
    at System.Xml.XmlReader.MoveToContent()
    at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMobileAutoDiscoverResponseXML.Read8_Autodiscover()
    HTTP Response Headers:
    Connection: close
    Content-Length: 0
    Content-Type: text/xml
    Date: Wed, 29 Oct 2014 21:35:25 GMT
    Elapsed Time: 1541 ms.
    And the autodiscover request fails on iOS and Android devices too.

    Thanks,
    Paul

  7. #7
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,342
    Hello iamcypher!

    The XML response reported in the sync.log seems perfectly coherent, so there might be some issues in the transport of the response (non-standard ports, NAT, proxy...).
    I'd need to run some tests on your infrastructure, will send you a PM with the details as soon as possible.

    Have a nice day,
    Cine
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •