Working together With Microsoft support we found that the error was related to the XDS database was not updated or contained the correct information.
What I did to solve this and remove the error from the event log was the following:
On the XDS database we tried to remove the poolID With this SQL command:
The query to delete the row should like this, but double check it just in case
DELETE FROM rtc.dbo.pool
this gave me an Error like this:
Msg 547, Level 16, State 0, Line 1
The DELETE statement conflicted with the REFERENCE constraint "FK_PoolId". The conflict occurred in database "rtc", table "dbo.MeetingIdAuthority", column 'PoolId'.
The statement has been terminated.
Then I went into this table and deleted the FK from there.
Then I tried the first command again.
Then I got an other error referring to some other table that gave me an error on the Forreign Keys. Tried to find out who I should delete but was not sure since the reference for this was just numbers and they did not make any sence.
Then I did an restart of the Filetransfer service and Master replica and replicator services on the Lync 2013 Frontend, and checked the event log and the error was gone.
Now I did not understand a thing......this was strange, very strange.
It's important if you tries to fix an error like this, please take an backup of your XDS database so that you can be sure to restore your database if anything goes wrong.