none
OOS 2016: Server Error We're sorry. An error has occurred. We've logged the error for the server administrator.

    Question

  • Hi All!

    So, it so interesting error. I've got it when OOS 2016 farm created (New-OfficeWebAppsFarm). Also have CPU Utilization over 99%. In ULS Logs found next: 

    Unhandled exception is being reported by SI platform. System.TypeInitializationException: The type initializer for 'Microsoft.Office.Web.Common.ServiceInstanceFinder' threw an exception. ---> Microsoft.Office.Web.Common.OfficeServiceException: ServiceInstanceFinderAdapter did not return data on first request ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)     at Microsoft.Office.Web.Apps.Environment.WacServer.WSServiceInstanceFinderAdapter..ctor()     --- End of inner exception stack trace ---     at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean...

    In Windows Application Logs all OOS applications being crashing. 

    In Sharepoint 2016, when tried to open any document got an error - Server Error We're sorry. An error has occurred. We've logged the error for the server administrator.

    Only one way to resolve it - rejoin instance to domain. But it not good method. 

    Thanks in advance for any suggestions.

    Wednesday, March 15, 2017 9:03 PM

Answers

  • Actually this issue is resolved. It took about 3 month :-).

    The main reason is  next - when I added VM to domain manually, system created record in registry in uppercase, but if its done by powershell - in lowercase. Then OOS farm will be crashed with unexpected exception if computername created in lowercase. I don't know why it happens. Possibly OOS developers provided some checks for avoid something. 

    The key path for this is next:

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName\

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\ComputerName\ComputerName

    ComputerName Key inside should be in uppercase. If you create OOS farm after that it will works fine.

    • Marked as answer by A_LexP Tuesday, May 30, 2017 12:30 PM
    Tuesday, May 30, 2017 12:30 PM

All replies

  • In Windows Application Logs all OOS applications being crashing. 

    The quickest way would be re-installing the OOS server, ensure you install the latest version:
    https://blogs.office.com/2016/11/18/office-online-server-november-release/



    Please remember to <b>mark the replies as answers</b> if they help. It will help other forum members to find the useful replies more easily, and inspire people to help each other.

    Thursday, March 16, 2017 9:03 AM
    Moderator
  • Hello Jessie!

    Thank you for your answer!

    Sure, I have installed last OOS 2016 November release. Also re-joined machine to OOS Farm but it doesn't help. Only re-joining to domain can fix this. But its really not applicable variant.

    Regards,


    Thursday, March 16, 2017 9:39 AM
  • It's great to hear the issue has been resolved! Thank you for kind sharing.:)

    Just want to let you know that I haven't seen similar fix in other scenarios so far, it would just a one-time issue. If you have any questions later, just ask on our forum.


    Please remember to <b>mark the replies as answers</b> if they help. It will help other forum members to find the useful replies more easily, and inspire people to help each other.

    Thursday, March 16, 2017 9:54 AM
    Moderator
  • Hi Jessie!

    Yep, its resolved. But it is a temporary solution. Because each time when I create OOS 2016 I need to re-join this VM to the domain. And it will be good to know why it happens and how to avoid this. Actually OOS 2016 ULS logs has entries like this: 

    Unhandled exception is being reported by SI platform. System.TypeInitializationException: The type initializer for 'Microsoft.Office.Web.Common.ServiceInstanceFinder' threw an exception. ---> Microsoft.Office.Web.Common.OfficeServiceException: ServiceInstanceFinderAdapter did not return data on first request ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)     at Microsoft.Office.Web.Apps.Environment.WacServer.WSServiceInstanceFinderAdapter..ctor()     --- End of inner exception stack trace ---     at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean...

    And it so interesting how I can fix this and how this relate to domain.

    Regards,

     

    Thursday, March 16, 2017 2:19 PM
  • Yep, its resolved. But it is a temporary solution. Because each time when I create OOS 2016 I need to re-join this VM to the domain.

    Have you tried to recreate this VM or install the OOS server on another VM?

    Based on the error message: The given key was not present in the dictionary. It's something about domain relationship or profile. If it happens every time you create OOS server, try to recreate the VM or just install another VM.



    Please remember to <b>mark the replies as answers</b> if they help. It will help other forum members to find the useful replies more easily, and inspire people to help each other.

    Friday, March 17, 2017 8:50 AM
    Moderator
  • Hello Jessie!

    I have tried both variants. Actually one way to fix this - re-join VM to domain and it so interesting how it relate to this error.

    Regards,

    Monday, March 20, 2017 2:57 PM
  • Actually this issue is resolved. It took about 3 month :-).

    The main reason is  next - when I added VM to domain manually, system created record in registry in uppercase, but if its done by powershell - in lowercase. Then OOS farm will be crashed with unexpected exception if computername created in lowercase. I don't know why it happens. Possibly OOS developers provided some checks for avoid something. 

    The key path for this is next:

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName\

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\ComputerName\ComputerName

    ComputerName Key inside should be in uppercase. If you create OOS farm after that it will works fine.

    • Marked as answer by A_LexP Tuesday, May 30, 2017 12:30 PM
    Tuesday, May 30, 2017 12:30 PM
  • Thank you so much for this! I was pulling out my hair trying to figure out why. It really was a matter of machine name being set in lowercase when joined to the domain via PowerShell and needing to update the registry entries to use uppercase instead. Wow! 
    Friday, December 15, 2017 7:32 AM