Error during upgrade CU5 to CU18 / Exchange 2016

Kurt Stichelmans 481 Reputation points
2020-11-22T13:55:18.883+00:00

We did already two times the update from cu5 to cu18 (exchange 2016). We prepared everything as it should and that is not the issue. I know cu5 to cu18 is a lot of cu between but we want to upgrade this way.
After executing setup /mode:upgrade /Iacceptexchangeserverlicenseterms it went well until it comes to upgrade the case mailbox service. It goes to 100%.

It stopts with this error (part of but I think the most important part).
First it tells us that the ECP already exists and then it tells us that it cannot be found? Very confusion.

part of the error log.
[11/21/2020 12:48:21.0776] [2] [ERROR] The virtual directory 'ecp' already exists under 'ex02.Ixx.Mxx.ixx/Exchange Back End'.
Parameter name: VirtualDirectoryName
[11/21/2020 12:48:21.0791] [2] Ending processing new-EcpVirtualDirectory
[11/21/2020 12:48:21.0791] [2] Active Directory session settings for 'Set-EcpVirtualDirectory' are: View Entire Forest: 'True', Configuration Domain Controller: 'AD03.Ixx.Mxx.ixx', Preferred Global Catalog: 'AD03.Ixx.Mxx.ixx', Preferred Domain Controllers: '{ AD03.Ixx.Mxx.ixx }'
[11/21/2020 12:48:21.0791] [2] User specified parameters: -Identity:'EX02\ECP (Exchange Back End)' -FormsAuthentication:'False' -WindowsAuthentication:'True'
[11/21/2020 12:48:21.0791] [2] Beginning processing set-EcpVirtualdirectory
[11/21/2020 12:48:21.0791] [2] Searching objects "EX02\ECP (Exchange Back End)" of type "ADEcpVirtualDirectory" under the root "$null".
[11/21/2020 12:48:21.0791] [2] Previous operation run on domain controller 'AD03.Ixx.Mxx.ixx'.
[11/21/2020 12:48:21.0791] [2] [ERROR] The operation couldn't be performed because object 'SRVINFEX02\ECP (Exchange Back End)' couldn't be found on 'AD03.Ixx.Mxx.ixx'.

I hope there is someone amongst all of you that know this issue and can lead us to a possible solution.
Many thanks in advance.

Best regards
Kurt

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,210 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,369 questions
0 comments No comments
{count} votes

Accepted answer
  1. kurt stichelmans 76 Reputation points
    2020-12-18T15:59:46.37+00:00

    A short end.

    After creating the keys for the ecp in AD we could try the update again.
    Set-ADServerSettings -ViewEntireForest $true
    Get-Mailbox -Arbitration
    f:\Setup.exe /IAcceptExchangeServerLicenseTerms /Mode:Upgrade

    But then another error appeared: cannot find exchangeserver.msi.
    I didn't know what to do and so I tried running the setup with the file itself.
    It went through all the 17 steps and all went well.

    I could restart and everything was ok: I saw the cu18 everywhere I looked.

    So this case can be closed.

    Another little issue is that some users get a popup while opening their Outlook and they have to logon with their own credentiasl as the account they use to logon into their windows/citrix profile. but it is not for every account and once filled in it stays until another logoff/logon. But maybe it is better to make a new Q&A for that.


5 additional answers

Sort by: Most helpful
  1. Andy David - MVP 142.3K Reputation points MVP
    2020-11-22T14:19:36.603+00:00

    This is usually caused by an orphaned virtual directory that exists in IIS for example, but not in AD
    Do you see it defiend in AD using ADSEDIT?
    ADSI Edit => CN=Configuration,DC=,DC= => CN=Services=> CN=Microsoft Exchange => CN=First Organization => CN=Administrative Groups => CN=Exchange Administrative Group => CN=Servers => CN=server name => CN=Protocols => CN=HTTP > ECP (Exchange Back End)"

    This may clean it up to remove it from Exchange before upgrading

    https://learn.microsoft.com/en-us/powershell/module/exchange/remove-ecpvirtualdirectory?view=exchange-ps

    Then recreate it again ( Or simply let setup create it)
    You can see in that setup log that its trying to create it.

    https://learn.microsoft.com/en-us/powershell/module/exchange/new-ecpvirtualdirectory?view=exchange-ps

    2 people found this answer helpful.

  2. Yuki Sun-MSFT 40,871 Reputation points
    2020-11-23T04:11:32.083+00:00

    Hi @Kurt Stichelmans ,

    Considering that it's a public forum, I edited the server name in your post for privacy concern.

    As per the error you shared, agree with Andy that it's suggested to try manually removing the ecp virtual directory via EMS and run the setup again to check if it works.

    Remove-EcpVirtualDirectory -Identity <virtualdirectory> -Confirm:$false  
    

    Please have a go at your end and feel free to post back should you would like further assistance on this.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Kurt Stichelmans 481 Reputation points
    2020-11-23T09:11:44.427+00:00

    Thank you, Andy and YukiSun, for your feedback.
    As this is a production environment I will execute this next weekend.
    So if something went wrong (again) I can restore it from a snapshot.

    After that I will post the outcome here (good or less good).

    kind regards
    Kurt


  4. Kurt Stichelmans 481 Reputation points
    2020-11-28T14:51:30.437+00:00

    After a new attempt....

    So I saw that in the AD there was no ECP (Exchange Back End) and in the IIS there was.

    Some things I tried.
    Remove-EcpVirtualDirectory -Identity “server\ecp (Exchange Back End)” it says that there is no key as such and so = error. That is true because in AD (adsiedit) I see that there isn't a key.
    43491-adsiedit28-11-2020.jpg

    Some used commandos:
    Remove-WebApplication -Site "Exchange Back End" -Name ecp.
    New-WebApplication -Site "Exchange Back End" -Name ecp -PhysicalPath "C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp" -ApplicationPool MSExchangeECPAppPool
    This was without error but did not add a key in AD.

    Then I found a website with "what if a key is not in AD but in IIS..." So I used METABASE Explorer to remove that value in IIS.
    43267-metabase-explorer.jpg
    I recreated ecp (default site and back end) but after iisreset and a restart I did not see an ECP key in adsiedit.

    So how could I cretae a ECP (Exchange Back End) key in adsiedit so I can execute CU18. Because of not seeing the key I did not run cu18 for now.
    Searching on the internet creates many possible todos but I keep my focus on the answers here.

    So the open question (to be clear): How to create a value in ADSIEDIT with ECP (Exchange Back End)?

    thank you for following up!!!!!