Monthly Archives: September 2013

Quick Tip: Access to SQL Express Locally From Lync

This is a silly one, and you might not have run into it.  But, if you’ve ever built a PowerShell script that queries a local Lync 2013 database and tried to just double click it in the desktop it might fail on you with an error similar to mine:

Exception calling “ExecuteReader” with “0” argument(s): “The SELECT permission was denied on the object ‘Resource’,
database ‘rtc’, schema ‘dbo’.”
At C:\Users\cac-a\Desktop\MyQuery.ps1:19 char:1
+ $result = $command.ExecuteReader()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo         : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SqlException
Exception calling “Load” with “1” argument(s): “Value cannot be null.Parameter name: dataReader”

The funny thing is, it works just fine from another server.  Solution? Run it as Administrator.

Lync A/V Edge Server Failed To Start

We’ve been seeing a few of these LS A/V Edge Server 22021 and 22037 events pop up on TechNet recently. We regularly find that it’s due to port 443 being in use. You can check this by running “netstat -anob” and check to see what’s listening on port 443 of the IP and where your A/V edge should be listening.

You should see something like this:

  TCP    X.X.X.X:443              LISTENING       6780

Note that X.X.X.X is the IP that A/V Edge should be listening on per the topology builder.  But if you see that port in use by anything else, that’s the culprit that needs to be pulled off.  More often than not, it’s IIS.  This is due to people installing the front end prerequisites on their edge, or occasionally from an attempt to install ARR as a reverse proxy on the edge (don’t do it!).

Log Name: Lync Server
Source: LS A/V Edge Server
Event ID: 22021
Level: Error
LS A/V Edge Server failed to open a network endpoint.

Protocol TCP Address X.X.X.X Port 443
Cause: Either an invalid configuration or another process is using the resource.
Check the configuration of the LS A/V Edge Server and verify the network resource is available.


Log Name: Lync Server
Source: LS A/V Edge Server
Event ID: 22037
Level: Error
Failed to start kernel mode driver component.
Cause: An IP address and/or listening ports may be configured incorrectly.

Verify that the computer has the IP addresses specified in the topology configuration.
Determine whether any other application or service has already used the TCP/UDP ports specified in the topology configuration.

Hopefully this post helped you.  If you need further assistance, we’re waiting on the TechNet forums!