• The chicken or the egg. How to get current ESE dll's from .msp packages to run Jetstress against without installing Exchange

    You want to jetstress some new hardware, but may not be running the latest build of ESE and need to do comprehensive testing with the latest build of ESE to make sure the results are right.

     

    The typical approach most people use is to install Exchange, get it patched up and then stop all of the services manually. While this does work, its not exactly guidance and can be a little problematic.

     

    Now lets look at our jetstress guidance:

    http://technet.microsoft.com/en-us/library/bb643095(v=EXCHG.80).aspx 

     

    "Jetstress testing should be performed before you install Exchange on the server. If you have already installed Exchange Server, you should still copy the ESE database modules to the Jetstress installation directory. If you are testing with a different version of Exchange Database Engine than the one installed with Exchange Server, you may have to uninstall the existing Exchange Database Engine counters before you run Jetstress. You can do this by running unlodctr ESE at a command prompt. However, you will still have to uninstall and reinstall the Exchange version of the Exchange Database Engine counters when testing is completed."

     

    What can we do about this?

    1. Obtain the latest patch that includes ESE fixes. Specifically we need:
      1. ESE.DLL
      2. ESEPERF.DLL
      3. ESEPERF.INI
      4. ESEPERF.HXX
    2. Download msix from http://hstewart.members.winisp.net/downloads/msix.zip  (source: http://blogs.msdn.com/b/heaths/archive/2006/04/07/571138.aspx)
    3. Run : msix PathtoLatestPackage.msp /out "C:\Directory to output files"
    4. In the output directory, you should now see files such as "PCW_CAB_E12_DAT". Look for the largest file as depending on the version of Exchange, this file name will be different)
    5. Rename PCW_CAB_E12_DAT to PCW_CAB_E12_DAT.CAB
    6. Double click the cab to access the .dll's
    7. Copy the files needed to the appropriate Jetstress directory
  • Error "Cannot open Mailbox" when attempting to open an Exchange 2007 mailbox from Exchange 2010

    The scenario is that you are logged into a Exchange 2010 mailbox and want to access a shared calendar or mailbox on Exchange 2007.

     

    When attempting to open the mailbox, you may receive the following error/ (full call stack below):

    Request

    Url:
    https://server.company.com:443/owa/proxyLogon.owa

     

    Exception

    Exception type:
    Microsoft.Exchange.Data.Storage.StoragePermanentException

    Exception message: Cannot open mailbox /o=Company/ou=Administrative Group/cn=Recipients/cn=testuser1.

     

    First, we want to look at the Exception that failed inside of the callstack.

    In the Inner Exception:

    Exception type: Microsoft.Mapi.MapiExceptionCallFailed

    Exception message: MapiExceptionCallFailed: Unable to make
    connection to the server. (hr=0x80004005, ec=2084) Diagnostic context: Lid:
    23065 EcDoConnectEx called [length=86] Lid: 17913 EcDoConnectEx returned
    [ec=0x824][length=56][latency=58] Lid: 19778 Lid: 27970 StoreEc: 0x824 Lid:
    17730 Lid: 25922 StoreEc: 0x824

     

    80004005 = Generic Error (MAPI_E_CALL_FAILED)
    2084 = ERROR_DS_CANT_REM_MISSING_ATT (An attribute cannot be retrieved from AD for the logon)

     

    In troubleshooting the issue, we were able to figure out that the attribute that was missing was SharedCalendarTimezoneSetting.

    Background:

    There was new functionality that was added to Exchange 2007 SP3 RU1. This new functionality forces Exchange 2007 to check the delegate user's SharedCalendarTimeZone, which is used to determine what time zone to show the mailbox in. This works fine against an Exchange 2007 delegate mailboxes, but unfortunately it doesn’t work against Exchange 2010 mailboxes. The failure happens when the Exchange 2010 user attempts to access the Exchange 2007 mailbox and on login, we attempt to check this value in an attempt to learn how to present the data. This data doesn't exist and therefore the error is generated.

    Resolution:

    On Exchange 2007, set the default time zone setting:

    set-organizationalconfig -sharecalendartimezonesetting principal

    Note: This can be set to principal or delegate as the article explains, either will resolve the issue if we are running into this problem.

    If the parameter value is set to Principal, the time zone is shown in the principal’s time zone. If the parameter value is set to Delegate, the time zone is shown in the Delegate’s time zone.

    The Full Call stack:

     Microsoft.Exchange.Data.Storage.ConnectionCachePool.OpenMailbox(String
    serverDn, String userDn, String mailboxDn, Guid mailboxGuid, Guid mdbGuid,
    Object identity, ConnectFlag connectFlag, OpenStoreFlag openStoreFlag,
    CultureInfo cultureInfo, String clientInfoString, Boolean secondTry)

    Microsoft.Exchange.Data.Storage.ConnectionCachePool.OpenMailbox(String
    serverDn, String userDn, String mailboxDn, Guid mailboxGuid, Guid mdbGuid,
    Object identity, ConnectFlag connectFlag, OpenStoreFlag openStoreFlag,
    CultureInfo cultureInfo, String clientInfoString, Boolean secondTry)

    Microsoft.Exchange.Data.Storage.ConnectionCachePool.OpenMailbox(String
    serverDn, String userDn, String mailboxDn, Guid mailboxGuid, Guid mdbGuid,
    Object identity, ConnectFlag connectFlag, OpenStoreFlag openStoreFlag,
    CultureInfo cultureInfo, String clientInfoString)

    Microsoft.Exchange.Data.Storage.MailboxSession.Initialize(LogonType
    logonType, ExchangePrincipal owner, DelegateLogonUser delegateUser, Object
    identity, OpenMailboxSessionFlags flags)

    Microsoft.Exchange.Data.Storage.MailboxSession.CreateMailboxSession(LogonType
    logonType, ExchangePrincipal owner, DelegateLogonUser delegateUser, Object
    identity, OpenMailboxSessionFlags flags, CultureInfo cultureInfo, String
    clientInfoString)

    Microsoft.Exchange.Data.Storage.MailboxSession.Open(ExchangePrincipal
    mailboxOwner, IntPtr authenticatedUserHandle, CultureInfo cultureInfo, String
    clientInfoString)

    Microsoft.Exchange.Clients.Owa.Core.OwaClientSecurityContextIdentity.CreateMailboxSession(ExchangePrincipal
    exchangePrincipal, CultureInfo cultureInfo)

    Microsoft.Exchange.Clients.Owa.Core.UserOptions.LoadSharedCalendarTimezoneSetting(TimezoneSetting&
    setting)

    Microsoft.Exchange.Clients.Owa.Core.UserOptions.Load(IList`1
    properties)

    Microsoft.Exchange.Clients.Owa.Core.UserOptions.LoadAll()

    Microsoft.Exchange.Clients.Owa.Core.UserContext.Load(OwaContext
    owaContext)

    Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.CreateUserContext(OwaContext
    owaContext, UserContextKey userContextKey, UserContext& userContext)

    Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.PrepareRequestWithoutSession(OwaContext
    owaContext, UserContextCookie userContextCookie)

    Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.InternalDispatchRequest(OwaContext
    owaContext)

    Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.DispatchRequest(OwaContext
    owaContext)

    System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

    System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
    Boolean& completedSynchronously)

     

    Inner Exception

    Exception type: Microsoft.Mapi.MapiExceptionCallFailed

    Exception message: MapiExceptionCallFailed: Unable to make
    connection to the server. (hr=0x80004005, ec=2084) Diagnostic context: Lid:
    23065 EcDoConnectEx called [length=86] Lid: 17913 EcDoConnectEx returned
    [ec=0x824][length=56][latency=58] Lid: 19778 Lid: 27970 StoreEc: 0x824 Lid:
    17730 Lid: 25922 StoreEc: 0x824

     

    Call stack

     

    Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String
    message, Int32 hresult, Int32 ec, DiagnosticContext diagCtx)

    Microsoft.Mapi.ExRpcConnection.Create(ConnectionCache
    connectionCache, ExRpcConnectionCreateFlag createFlags, ConnectFlag connectFlags,
    String serverDn, String userDn, String user, String domain, String password,
    String httpProxyServerName, Int32 ulConMod, Int32 lcidString, Int32 lcidSort,
    Int32 cpid, Int32 cReconnectIntervalInMins, Int32 cbRpcBufferSize, Int32
    cbAuxBufferSize)

    Microsoft.Mapi.ConnectionCache.OpenMapiStore(String
    mailboxDn, Guid mailboxGuid, Guid mdbGuid, ClientIdentityInfo clientIdentity,
    String userDnAs, OpenStoreFlag openStoreFlags, CultureInfo cultureInfo, String
    applicationId)

    Microsoft.Mapi.ConnectionCache.OpenMailbox(String mailboxDn,
    Guid mailboxGuid, Guid mdbGuid, ClientIdentityInfo clientIdentity, String
    userDnAs, OpenStoreFlag openStoreFlags, CultureInfo cultureInfo, String
    applicationId)

    Microsoft.Exchange.Data.Storage.ConnectionCachePool.OpenMailbox(String
    serverDn, String userDn, String mailboxDn, Guid mailboxGuid, Guid mdbGuid,
    Object identity, ConnectFlag connectFlag, OpenStoreFlag openStoreFlag,
    CultureInfo cultureInfo, String clientInfoString, Boolean secondTry)

  • Microsoft Exchange Transport Log Search service will not start and a series of 4999 events are logged

    Problem

    On Exchange 2010, you may notice the below event firing rapidly. In our scenerio we were seeing the service attempt to start and go down approximatly 420 times an hour, logging the below 4999 every time. The only action that was taken prior to this problem appearing was the instalation of Exchange 2010 Sp2. It has been noted that this same problem has occured while installing various RollUps (RUs) as well.

     Log Name:      Application
    Source:        MSExchange Common
    Event ID:      4999
    Task Category: General
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Description:
    Watson report about to be sent for process id: #, with parameters: E12, c-RTL-AMD64, 14.02.0247.005, MSExchangeTransportLogSearch, MSExchangeTransportLogSearch, M.E.T.L.S.MailFlowStatistics.InitializeRecord, System.OutOfMemoryException, a3ee, 14.02.0247.003.
    ErrorReportingEnabled: False

     

    Resolution

    When we have seen the problem in the past, the problem has happened when a function attempted to format information from these files. The end result is a IndexOutofRangeException when trying to read the contents of temporary stored statistics.

    1. Rename the following directory (to preserve existing data for root cause if desired):

           Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ActiveUsersStats\Backup

    2. Restart the Microsoft Exchange Transport Log Search service


    Upon restarting the service a new Backup directory is created by the service and the error will not persist.

     

  • Troubleshooting EWS requests using IIS logs with Logparser

    The problem:

     We have very valuable data inside of the IIS logs that can greatly assist in troubleshooting Exchange Web Service clients.  The problem is that all of the data exists in one field (cs-uri-query) inside of the IIS logs.

    An example cs-uri-query field for a EWS call:

    ;RC:111111ac-1111-1111-1111-111112c1111;Init>>Conn:0,HangingConn:0,AD:30000/30000/0%,CAS:54000/54000/0%,AB:30000/30000/0%,RPC:36000/36000/0%,FC:1000/0,Policy:DefaultThrottlingPolicy_3333333-3333-3333-3333-333333333333,Norm,Sub:5000/0;SoapAction=GetUserAvailability;AddressCount=1;MessageId=urn:uuid:db01111-da7c-4f46-b89d-1111be7aaaaa;Requester=S-3-3-33-3333223333-3333333333-3333673333-3323333;local=1;Threads.Worker.Available=1198;Threads.Worker.InUse=0;Threads.IO.Available=1194;Threads.IO.InUse=1;Failures=0;MailboxRPC.TimeTaken=0;MailboxRPC.RequestCount=0;AD.TimeTaken=0;AD.RequestCount=2;Request.CPU.Main=0;Local.FirstThreadExecute=0;Local.LongPole.Elapsed.TimeTaken=53;Local.LongPole.Elapsed.Destination=server.company.com;LocalLongPole.TimeTaken=3;LocalLongPole.RequestCount=28;LocalLongPole.Destination=server2.company.com;TotalLocal.TimeTaken=53;TotalLocal.RequestCount=1;Thread.CPU.LongPole.TimeTaken=15;Thread.CPU.LongPole.Destination=LocalRequest.Execute;Request.Phase.PreQuery=5;Request.Phase.RequestDispatcher.BeginInvoke=0;Request.Phase.RequestDispatcher.Complete=54;Request.Phase.PostQuery=0;Request.CPU.Total=15;TimeInAS=59;[C]Queues:0msec/Execute:59msec;End(61ms)>>Conn:1,HangingConn:0,AD:30000/29996/1%,CAS:54000/53940/1%,AB:30000/30000/0%,RPC:36000/35972/1%,FC:1000/0,Policy:DefaultThrottlingPolicy_333333-3333-3333-3333-aaaaaaaaaaaa,Norm[Resources:(DC)dc.company.comHealth:-1%,HistLoad:0),(DC)dc2.company.com(Health:-1%,HistLoad:0),(Mdb)DatabaseName(Health:-1%,HistLoad:0),],Sub:5000/0;

     

    The solution:

    We will utilize logparser purely for speed

    Download Log Parser

     

    The LogParser Query:

    It took a bit of time to work around some of the logic, but this works well.

    Logparser.exe -i:iisw3c "SELECT time, date, cs-username, substr(substr(cs-uri-query, index_of(cs-uri-query, 'Impersonate')),0,index_of(substr(cs-uri-query, index_of(cs-uri-query, 'Impersonate')),';')) AS [Impersonate], substr(substr(cs-uri-query, index_of(cs-uri-query, 'SoapAction')),0,index_of(substr(cs-uri-query, index_of(cs-uri-query, 'SoapAction')),';')) AS [SoapAction], substr(substr(cs-uri-query,index_of(cs-uri-query, 'RC')),0,index_of(substr(cs-uri-query, index_of(cs-uri-query, 'RC')),';')) AS [RC Data], cs-uri-stem, substr(substr(cs-uri-query, index_of(cs-uri-query, 'Execute')),0,index_of(substr(cs-uri-query, index_of(cs-uri-query, 'Execute')),';')) AS [Time to Execute] INTO c:\logs\out.csv FROM c:\logs\*.log Where cs-username = 'Domain\ServAcct' AND cs-uri-query LIKE '%SoapAction%'"

    Note: output goes into the file specified after the INTO clause above. Input is taken from the FROM clause. Notice we are grabbing all .log files in a directory. We are also filtering for requests coming from one user, typipcally applications will authenticate as one user and Impersonate the intended target.

     

    What this query does:

    -Only fields that are sent by a specific user (Domain\ServAcct above)

    Splits the csi-uri-query to pull out:

    • who the above user is impersonating as
    • what the soapaction is
    • the RC field
    • The Execution time

     It took me a bit to understand the built in functions to sort the data we needed.

    The output:

     

     

    How fast is this?

    On my (rather speedy) laptop with about 650 megs of logs:

    Statistics:

    -----------

    Elements
    processed: 827827

    Elements
    output:    325218

    Execution
    time:     11.02 seconds

     

    Great, i see the data in Excel.... How can i make it useful?

     

    Sorting and Charting in Excel is extremely helpful, I'll go through a few scernios that shed some light on our issue

    Counts for each user:

     

    Row Labels

    Count of SoapAction

    Impersonate:Domain\User1

    1102

    SoapAction=m:ConvertId

    293

    SoapAction=m:CreateItem

    1

    SoapAction=m:FindFolder

    22

    SoapAction=m:FindItem

    310

    SoapAction=m:GetFolder

    11

    SoapAction=m:GetItem

    377

    SoapAction=m:UpdateItem

    88

    Impersonate:Domain\User2

    1013

    SoapAction=m:ConvertId

    285

    SoapAction=m:CreateItem

    1

    SoapAction=m:FindFolder

    22

    SoapAction=m:FindItem

    352

    SoapAction=m:GetFolder

    11

    SoapAction=m:GetItem

    286

    SoapAction=m:UpdateItem

    56

     

    Counts for each Action:

     

    Row Labels

    Count of SoapAction

    SoapAction=GetUserAvailability

    31

    SoapAction=m:ConvertId

    65685

    SoapAction=m:CreateItem

    1560

    SoapAction=m:DeleteItem

    1013

    SoapAction=m:ExpandDL

    12

    SoapAction=m:FindFolder

    49536

    SoapAction=m:FindItem

    102752

    SoapAction=m:GetFolder

    24804

    SoapAction=m:GetItem

    70584

    SoapAction=m:ResolveNames

    76

    SoapAction=m:UpdateItem

    9165

    Grand Total

    325218

     

     

    That looks great, how do I get that level of detail out of the logs?

    Note: I am using Excel 2010

     

    To Calculate Counts for each user:

     

    •  Open the .csv output in Excel
    • Without selecting any cells, click insert, PivotTable
    • At Select a Table or Range, the default should be all Cells, click New Worksheet
    • On the new worksheet with the PivotTable click Impersonate and SoapAction under PivotTable Field List (upper right)

     

    • Now drag SoapAction to the (Sum) Values box at the bottom right

    • Now we will want to fix the sort to list the user with the highest number of requests first
      • Highlight all of the values inside of “Count of SoapAction” column (not gathering the header or the total at the bottom)
      • Click the Data tab

    • Select Z to A to sort Largest to Smallest (Next to Sort, upper right)

    To Calculate Counts for each Action:

     

    • Open the .csv output in Excel
    • Without selecting any cells, click insert, PivotTable
    • At Select a Table or Range, the default should be all Cells, click New Worksheet
    • On the new worksheet with the PivotTable click SoapAction under PivotTable Field List (upper right)

     

    • Now drag SoapAction to the (Sum) Values box at the bottom right

     

    Now look at the worksheet with the Pivot Table, you should see the data sorted correctly. Using the same technique you can sort or chart the data by time to get an idea of when the bulk of requests are coming in

     

    -CaseyS

  • Exchange 2003\Redbull Connector\Permissions not migrated when we migrate resource mailboxes

    When attempting to migrate resource mailboxes across via the Exchange 2003 Lotus Notes Connector (Redbull) you may notice that permissions are not migrated correctly. This issue is by design, you will need to set these permissions manually at this time.