r/skype4b•
eviladmin

Skype For Business appears to have lost backend DB access

I have a strange S4B problem that showed up at work one day when I was away. Another coworker promiscuously rebooted the front end servers and SQL server with a wild abandon.

I'll mention this now: I'm not entirely new at this, and have put a ton of time into it already. Read on if you are interested in helping. Otherwise, save yourself and look away now. And yes, I rebooted :)

VM Environment is as such: 2 Mediation GWs, 2 Edge servers, 3 FE servers, 1 SQL server (not multi tenant), Webapp server and an adjacent telephone software server called TRIO. It's not used anywhere much outside of northern Europe from what I know. S4b is running next-to-latest CU. It has been purring along under my care for a long time.

What They Tell Me:
Supposedly Trio went wonkey in the morning. By the afternoon, and a ton of SKYPE reboots later (because our trio partner said, "It's Skype! It's Skype!" nevermind it was working fine...) I get an email with little to no information. I'm in a totally different timezone so I can't get any more info, either. They claimed "everything" was down.

What's working and what's not working: Address book & Presence does not work, but messaging does including the notification of typing action. Calling out may or may not give you audio, but it does work. Calling in directly does work and it works well. Can connect to the autodiscover page. All services except for call park start and run. I manually have to start Response Group. I strongly believe that RG has to do with modifications from TRIO, but I was not involved in that.

Things I have done: *Server FW is off *Verified all time services are in good order across hosts & VMs *Telnet to 1433 from remote machine works to the SQL server *None of the DBs are in recovery or in an obvious (to me) abnormal state. *All DBs in multiUser mode *Trace shows my mssql service account logging in OK (this account as added permissions now to update SPNs added via adsiedit) *UDL checked that I cannot connect to SQLSvr. Oddly, TRIO can UDL to FE3 RTCLOCAL db. That makes no sense, but it's interesting. *SQLsvr1 can UDL to another SQL server and to itself. The second SLQ server cannot connect to SQLsvr1. *SLQsvr2 is just another one and not really involved here. *Manually updated the SPN *DBCC SQLPERF (LOGSPACE) shows that no one is using more than 50% of the limit. RTCXDS is a low percentage. (per this: http://www.confusedamused.com/notebook/lync-2013-and-the-rtcxds-16-gb-transaction-log-limit) *The same command shows temp db on FE server to be using 70%, but the limit is very very small anyway.
*There do not appear to be any space issues.

Errors I am getting: -Replication, SPN, SSPI context (I thought we were NTLM, must be some magic here I don't understand) -Error encountered pulling data from RtcXds Blob Store -Failed to update pool state in backup database. Pool: s4bpool01.MyDomain.local. State: 1. Era: 0. Execution Error: 0x800407D0(ERROR_INVALID_PIXEL_FORMAT). -Exception: [Could not connect to SQL server : [Exception=System.Data.SqlClient.SqlException (0x80131904): The target principal name is incorrect. Cannot generate SSPI context. -Using most S4B powershell test commands produce some sort of SSPI error or similar error indicating no db connection.
-Unable to download topology.

Any thoughts? This feels like a broken SQL server, but if I knew what was wrong for sure I'd have fixed it by now. :) I'm giving it another 6 hours before a restore. DR Avoidance is my motto....

Edit: making bullets for more clarity

Posted Oct 8, 2016, 10:38 PM UTC · edited

09
eviladminOP•

Thanks folks for the tips. Here's the resolution:

It was not enough to add the SPN, because I had done that (without getting an error I might note).

SCOM's Managed Service Account had registered SPNs sometime on Friday. Including all the Skype Front End servers, the SQL server, the TRIO server, and some other SQL servers. There went many hours of my life I will never get back. But, hopefully this will help someone else :)

Running: Ldifde -d "DC=MinDomene,DC=local" -l ServicePrincipalName -F C:\SPN.txt and searching lead to:

dn: CN=SCOM_SVC,CN=Managed Service Accounts,DC=MinDomene,DC=local changetype: add servicePrincipalName: MSSQLSvc/S4BMED02.MinDomene.local:50000 servicePrincipalName: MSSQLSvc/S4BMED01.MinDomene.local:49398 servicePrincipalName: MSSQLSvc/S4BFE03.MinDomene.local:49403 servicePrincipalName: MSSQLSvc/S4BFE02.MinDomene.local:49489 servicePrincipalName: MSSQLSvc/S4BFE01.MinDomene.local:61698 servicePrincipalName: MSSQLSvc/S4BSQL01.MinDomene.local:1433

So, that resolved everything in just a few minutes. Those few minutes occurred many many hours after I started with this. /facepalm.

And this lack of change management and communication, kids, is why we can't have nice things.

EDIT: A coworker did this manually. Apparently the SCOM logs told him to :-S

3
agm_105•

Check SQL error logs Set spn if needed.

2
pablotweek•

I wonder if someone renamed the SQL server or if for another reason the server name in the connection string does not match the hostname. In that case the error can be fixed by adding a SQL alias on the SQL server in config manager.

1
eviladminOP•

Thanks for your reply. Anything is possible. I've not added an alias here, I will give it a shot. My ego won't let me do a restore yet since we're not in production hours. I really want to figure this out.

1
BrokenBeerBits•

We had the same symptoms when our rtcxds database went belly up after a Lync CU got slipped into monthly security patching.

The solution was to uninstall and then re-install the rtcxds related database(s) via PowerShell. Once the databases were back in a clean state, the FE's restored the data the backend databases and our problems went away.

I can't say for sure if you have the same problem, but they sound similar.

1
eviladminOP•

Thanks for the tip! That sounds promising--I'm not exactly clear on the procedure though. I'll see what I can find.

1
Neoburner•

Not too sure if related, but could be another fix if needed or below doesn't work!

I once had a similar issue with the master db being corrupt and not pointing correct to the DB's underneath, this caused connection issues, but typical catch messages didn't relate to anything!

Praise for backups the night before!

1
eviladminOP•

That sounds horrible. Did anything or any event precipitate that?

1
Neoburner•

Nothing - It took a good while to even click that it was the problem, tables opened up etc

I only came over it while I queried a table for more than 10 rows I then discovered malformed data. It did sit on a SAN so possibly the RC

1