Error in Central Admin when accessing the Managed Metadata service application:
The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator.
Error in ULS log:
Failed to get term store for proxy 'Managed Metadata Service'. Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
Error in Event viewer:
The Managed Metadata Service 'Managed Metadata Service' is inaccessible.
I did investigate many suggested solutions out there, and the most similar description of the scenario I found here:
Previously I had tried to re-create the service application with the same database, but it failed in the same way. So this pointed me to that the error was within the database, not permissions in Central Admin, AppPool trouble, services etc.
As someone mentioned in the discussion above, you might have to create a new database and restore the data. In my case this was on a development environment, so backup/restore you said? Luckily i managed to make a way through this problem without scratching the database for good.
These steps solved the issue for me:
- Go to "Central Administration" and select "Manage service applications".
- Select your Managed Metadata service application, in my case with almost that name and the button "Properties":
- Locate the "Database name" and change this one to for example "SP2013_MetaData_NEW". Remember to take a note of the old database name for the next steps:
- Select "OK" and give it some time. SharePoint now creates a new database for you with the name selected above. When it has completed, try to open the service application (Manage) and it now should open without problems, but as expected with an empty term store.
- Go back to the list over service applications and repeat step 2. Now enter the old database name instead, in my case "SP2013_MetaData" and select "OK".
- Wait some more an access the service application again (Manage). For me it looked like nothing had changed and I now only saw the new database, but I was missing permissions.
- Locate the "Term store administrators" and at least add your admin user here:
- Select "Save" and now with the correct permissions you should have access to the existing Term Store and the service application would be back to normal.
Note: before performing these steps I had re-created the service application with the existing database. It can be possible that this was necessary to succeed.