Office 365 Steaming Subscription Error : One or more subscriptions reside on another client access server

We are trying to subscribe ~2000 rooms with office 365 using Streaming Connections. Very frequently i am getting the following errors, One or more subscriptions reside on another client access server. I understand that this is related to affinity and i am following Microsoft recommendation of using groups and setting the following HTTP Headers. As per microsoft guidelines, we should autodiscover every 12 hours, however i am seeing groups changing after every one hour. Can someone please tell me if anything is wrong in the above traces and why am i repeatedly getting these errors.

I am creating connections per group. Now since groups are changing very frequently and i cannot add subscription to a open connection, i have to wait for 30 minutes till the time the connection for the group to which the failed room belongs. Once connection is disconnected, i add the failed room to the new group connection. 

Also, Following statements are conflicting, one of the link says that x-anchormailbox and connectingSID should be same

Link for the same

however as per msdn, x-anchormailbox should be the first room in the group and connectingSID should be the room that is being processed:

  • Include the X-AnchorMailbox header with a value set to the SMTP address of the anchor mailbox user.

  • Include the X-PreferServerAffinity header with a value set to true.

  • Use the ApplicationImpersonation role (the ExchangeImpersonation type).

MSDN

Which of the two is correct information ?

X-AnchorMailbox,X-PreferServerAffinity,X-BackEndOverrideCookie

Group Name From Auto Discover: https://outlook.office365.com/EWS/Exchange.asmxHKXPR041
Anchor Mailbox:  USSC_CONF_Seminar_Room@condeco.onmicrosoft.com

<Trace Tag="EwsRequestHttpHeaders" Tid="47" Time="2015-01-07 15:12:39Z">
POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0913.015
Accept-Encoding: gzip,deflate
X-AnchorMailbox: USSC_CONF_Seminar_Room@condeco.onmicrosoft.com
X-PreferServerAffinity: true
</Trace>

<Trace Tag="EwsRequest" Tid="47" Time="2015-01-07 15:12:39Z" Version="15.00.0913.015">
  <?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
      <t:RequestServerVersion Version="Exchange2013" />
      <t:ExchangeImpersonation>
        <t:ConnectingSID>
          <t:SmtpAddress>USEM_CONF_Q_404@condeco.onmicrosoft.com</t:SmtpAddress>
        </t:ConnectingSID>
      </t:ExchangeImpersonation>
    </soap:Header>
    <soap:Body>
      <m:Subscribe>
        <m:StreamingSubscriptionRequest>
          <t:FolderIds>
            <t:DistinguishedFolderId Id="calendar">
              <t:Mailbox>
                <t:EmailAddress>USEM_CONF_Q_404@condeco.onmicrosoft.com</t:EmailAddress>
              </t:Mailbox>
            </t:DistinguishedFolderId>
          </t:FolderIds>
          <t:EventTypes>
            <t:EventType>CopiedEvent</t:EventType>
            <t:EventType>CreatedEvent</t:EventType>
            <t:EventType>DeletedEvent</t:EventType>
            <t:EventType>ModifiedEvent</t:EventType>
            <t:EventType>MovedEvent</t:EventType>
          </t:EventTypes>
        </m:StreamingSubscriptionRequest>
      </m:Subscribe>
    </soap:Body>
  </soap:Envelope>
</Trace>



<Trace Tag="EwsResponseHttpHeaders" Tid="47" Time="2015-01-07 15:12:42Z">
HTTP/1.1 500 Internal Server Error
Transfer-Encoding: chunked
request-id: 50ffaa1b-4c09-4797-b08d-78f362c7acba
X-CalculatedBETarget: hkxpr04mb166.apcprd04.prod.outlook.com
X-DiagInfo: HKXPR04MB166
X-BEServer: HKXPR04MB166
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Set-Cookie: exchangecookie=936a68304aaf440fa9efaf0ab3619b2b; path=/,X-BackEndCookie2=USSC_CONF_Seminar_Room@condeco.onmicrosoft.com=u56Lnp2ejJqBysmcmpnMnsbSmc6andLLm53I0sadmcjSz8jLmsaeyM+bncebgbyQkZuanJDRkJGSlpyNkIyQmYvRnJCSgc3PzsrSz83Sz8mrzsrFzs7Fy8iBno+cj42bz8vRj42Qm9GQiouTkJCU0ZyQkg==&amp;HKXPR04MB166.apcprd04.prod.outlook.com=rJqNiZqNgbe0p6+tz8uyvc7JydGej5yPjZvPy9GPjZCb0ZCKi5OQkJTRnJCSgc7Gy83Pyc7Oz8qBzc/OytLPztLPyKvOysXNzcXLzg==; expires=Fri, 06-Feb-2015 15:11:47 GMT; path=/EWS; secure; HttpOnly,X-BackEndCookie=USSC_CONF_Seminar_Room@condeco.onmicrosoft.com=u56Lnp2ejJqBysmcmpnMnsbSmc6andLLm53I0sadmcjSz8jLmsaeyM+bncebgbyQkZuanJDRkJGSlpyNkIyQmYvRnJCSgc3PzsrSz83Sz8mrzsrFzs7Fy8g=&amp;HKXPR04MB166.apcprd04.prod.outlook.com=rJqNiZqNgbe0p6+tz8uyvc7JydGej5yPjZvPy9GPjZCb0ZCKi5OQkJTRnJCSgc7Gy83Pyc7Oz8qBzc/OytLPztLPyKvOysXNzcXLzg==; expires=Fri, 06-Feb-2015 15:11:47 GMT; path=/EWS; secure; HttpOnly
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-FEServer: HKXPR03CA0027
Date: Wed, 07 Jan 2015 15:12:41 GMT


</Trace>

<Trace Tag="EwsResponse" Tid="47" Time="2015-01-07 15:12:43Z" Version="15.00.0913.015">
  <?xml version="1.0" encoding="utf-8"?>
  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
      <s:Fault>
        <faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorProxyRequestNotAllowed</faultcode>
        <faultstring xml:lang="en-US">One or more subscriptions in the request reside on another Client Access server. GetStreamingEvents won't proxy in the event of a batch request.</faultstring>
        <detail>
          <e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorProxyRequestNotAllowed</e:ResponseCode>
          <e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">One or more subscriptions in the request reside on another Client Access server. GetStreamingEvents won't proxy in the event of a batch request.</e:Message>
        </detail>
      </s:Fault>
    </s:Body>
  </s:Envelope>
</Trace>



January 8th, 2015 11:30am

MSDN should be correct here. When you subscribed to the anchor mailbox, you should have gotten a X-BackEndOverrideCookie back in the response, which you should be including in each subsequent subscription request that uses that anchor. If you include that, does it help?
Free Windows Admin Tool Kit Click here and download it now
January 8th, 2015 5:36pm

Hello Jason,

I am following MSDN advice and the attached EWS request and response headers in the question suggests that it is happening as designed. X-BackendOVerriedCookie comes back as a response in first request and it is being included in each and every subscription request for the same group. 

Even after this, i get the error. I am wondering why is office 365 changing groups that frequently. I have observed that sometimes it  changes it after an hour also.

Please suggest.

Thanks and Regards

Rohit

January 9th, 2015 4:49am

That's a great question. I'm not sure what's going on exactly. I'd suggest instrumenting your requests and getting some detailed logs of the error occurring, then contacting our Developer Support team. It would be good to capture the responses that give you back your grouping information as well.
Free Windows Admin Tool Kit Click here and download it now
January 9th, 2015 3:37pm

Thanks Jason. I will contact Developer Support with the information.

Regards

Rohit

January 15th, 2015 5:07am

Matt Stehle's post is about non-subscription operations using impersonation. His point is that even though affinity is usually associated with subscriptions, in Wave 15 you also want to use affinity wherever impersonation is being done.

The BackEndOverride cookie is specific to subscriptions that share a connection defined for another subscription.  So they could both be correct.

I gather from this material that if you're not setting up subscriptions you can just use the AnchorMailbox header. Even the MSDN article says AnchorMailbox will be used if no BackEndOverride is provided.

Free Windows Admin Tool Kit Click here and download it now
April 9th, 2015 1:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics