Pages

Thursday, January 6, 2011

Error Microsoft Lync Server 2010 publishing topology with Event ID: 17836 error on SQL / Backend Server

Ran into an interesting problem while publishing a Microsoft Lync Server 2010 topology earlier this week that had very little to Lync but rather the network. The following are the errors:

You’ve completed filling in the required information for your new Lync Server 2010 topology and initiate the Publish Topology option:

image

The following errors are shown in the Publishing in progress window:

Ensure that <yourSQLserverName is a valid SQL instance.

Exception of type ‘Microsoft.Rtc.Management.Deployment.DeploymentException’ was thrown.

Exception of type ‘Microsoft.Rtc.Management.Deployment.DeploymentException’ was thrown.

Exception of type ‘Microsoft.Rtc.Management.Deployment.DeploymentException’ was thrown.

Exception of type ‘Microsoft.Rtc.Management.Deployment.DeploymentException’ was thrown.

Exception of type ‘Microsoft.Rtc.Management.Deployment.DeploymentException’ was thrown.

image

Shortly after these error messages are shown, you will find the following window presented:

image

Viewing the logs will show you something like this:

Error: Error connecting to "sql02.domain.com\Lync2010" while installing "CentralMgmtStore". Verify that the SQL instance is running, connections are not being blocked by a firewall, and that you have SQL administrator permissions. For details, see the following log file: "C:\Users\tluk\AppData\Local\Temp\Create-CentralMgmtStore-sql02.domain.com_Lync2010-[2011_01_05][18_39_34].log"

Error: An error occurred: "Microsoft.Rtc.Common.Data.SqlConnectionException" "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

image

Opening up the SQL logs will show you the following errors:

Running script: C:\Windows\system32\cscript.exe //Nologo "C:\Program Files\Common Files\Microsoft Lync Server 2010\DbSetup\xdssetup.wsf" /dbexists /sqlserver:sql02.domain.com\Lync2010 /publisheracct:domain\RTCUniversalServerAdmins /replicatoracct:domain\RTCUniversalConfigReplicator /consumeracct:domain\RTCUniversalReadOnlyAdmins /role:master /verbose
---------------
Installed SQL Server 2005 Backward Compatibility version is 8.05.2312
Connecting to SQL Server on sql02.domain.com\Lync2010
Error connecting (
name: Error
description:
number: -2147221504
message:
)
Attempting to start SQL Server and connect...
Error starting SQL Server on sql02.domain.com\Lync2010
Error (
name: Error
description:
number: -2147023840
message:
)
Ensure that sql02.domain.com\Lync2010 is a valid SQL instance.
---------------
Exit code: ERROR_START_SQLSERVICE (-1)
When running /dbexists, non-zero exit codes are not necessarily errors
---------------
Running script: C:\Windows\system32\cscript.exe //Nologo "C:\Program Files\Common Files\Microsoft Lync Server 2010\DbSetup\xdssetup.wsf" /sqlserver:sql02.domain.com\Lync2010 /publisheracct:domain\RTCUniversalServerAdmins /replicatoracct:domain\RTCUniversalConfigReplicator /consumeracct:domain\RTCUniversalReadOnlyAdmins /dbpath:D:\CsData\CentralMgmtStore\Lync2010\dbpath /logpath:E:\CsData\CentralMgmtStore\Lync2010\logpath /role:master /verbose
---------------
Installed SQL Server 2005 Backward Compatibility version is 8.05.2312
Connecting to SQL Server on sql02.domain.com\Lync2010
Error connecting (
name: Error
description:
number: -2147221504
message:
)
Attempting to start SQL Server and connect...
Error starting SQL Server on sql02.domain.com\Lync2010
Error (
name: Error
description:
number: -2147023840
message:
)
Ensure that sql02.domain.com\Lync2010 is a valid SQL instance.
---------------
Exit code: ERROR_START_SQLSERVICE (-1)
---------------

image

So here I am wondering what went wrong since this isn’t the first time I’ve installed Lync and I’ve never ran into this issue before. A quick search on the internet had people saying changing the FQDN to just the NetBIOS name fixed this issue so I gave that a go but still had the exact same failure.

Resolution

What ended up being the problem was actually the network and what tipped me off was the Event ID: 17836 error on SQL / Backend Server’s Application logs:

Length specified in network packet payload did not match number of bytes read; the connection has been closed. Please contact the vendor of the client library. [CLIENT: 172.25.1.40]

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

http://social.technet.microsoft.com/Forums/en-US/ocsplanningdeployment/thread/7f178c93-50b9-4ff9-aa40-0e5dfb0fa2f5/

image

The front-end server and the backend server were actually on different subnets that traversed through quite a few routers so what I ended up doing was relocate the SQL server so that it was on the same subnet as the front-end server and the error quickly went away.  I’ll also most likely have to revisit this issue with one of our networking engineers to do some traces on both ends to determine what the root cause is.

Quick note about defining a New SQL Store in Microsoft Lync Server 2010

Though this isn’t much of a surprise but I noticed that whenever you make a change for the SQL store under the Associations section for your pool in Microsoft Lync Server 2010’s Topology Builder, a new node representing the created SQL store will be created. 

image

This means that if you’re troubleshooting an issue during the initial setup and end up changing the SQL store multiple times then back to one that you’ve used before without deleting the it from the Lync Server 2010 tree, you’ll end up getting the following error:

A SQL Store named ‘SQLInstanceName’ already exists in pool ‘sqlServer.domain.com’

image

Also, if you try to delete a SQL store that’s currently assigned to a pool, you’ll receive the following error message:

This SQL store is being used. Remove the dependencies before deleting the store. Affected services:

Roles ‘UserServices, ApplicationServer, CentralMgmt’ on pool ‘poolName’

image

Yes, it’s not exactly that complicated or surprising but in case anyone new to Lync is wondering why they see these errors, the reasons outlined are why.

Pre/Post tasks for P2V-ing a physical host to a virtual machine

Throughout the years that I’ve been involved with virtualizing environments, I’ve realized that there are actually many pre and post tasks that should be completed when virtualizing a physical host.  While I always had scattered notes that I referred to for these projects, it was not until 2 years ago when I combined mine with the notes of my current practice lead.  The following list probably doesn’t cover everything but should serve as a good start:

**Note: Sorry about the images.  I have the tables in an email but it doesn’t paste properly in Windows Live Writer.

Hot Cloning

image

Cold Cloning 

image

Cloning Process

image

Completion of Cloning

image

image

image

“The IP address x.x.x.x you have entered for this network adapter is already assigned to another adapter…” when assigning a NIC’s IP address.

While this informational message can be caused by various reasons, here’s the list that I could think of off the top of my head:

  1. You’ve just completed virtualizing a server to a virtual machine and new NICs were created replacing the old ones.
  2. You’ve physically removed NICs from a physical server and replaced it with new ones.
  3. You’ve just completed the installation of MSCS (Microsoft Clustering Services) within a VMware VI3 environment and you noticed the IP addresses are gone so you make an attempt to re-enter them only to get this message.

image

There’s probably more but those are the ones I can think of now. Earlier in the days when I was a cowboy and pretty much hacked away at everything, I used to just go into the registry and delete all the keys with the IP address that was assigned to the old NIC before I went ahead to re-enter it into the new ones. This worked but searching through the registry and constantly hitting the F3 key for Find Next is cumbersome and prone to human error. The easier way to fix this is to actually use the following KB: http://support.microsoft.com/kb/315539 to reveal the hidden/missing adapters and uninstall it. This provides a much cleaner method of cleaning this missing adapter out.

“Unable to obtain hardware information for the selected machine” with vCenter Converter 4.x

I’ve been meaning to get some screenshots of this problem because I’ve been asked about this error a few times and since I had some P2V work tonight with a client that had the setup I needed, I took the opportunity to mimic this error on their vSphere environment.  Now before I proceed, please be aware that the reason to this error message in this blog post is only ONE of the MANY possibilities so if this does not apply to your situation, I would suggest that the converter logs be exported and parsed to determine the root cause.

Problem

You need to v2v a virtual machine currently sitting on a VMware Server 1.0 or 2.0 so you proceed with logging into vCenter with the vCenter Converter installed, right click on your cluster, choose Import and then choose VMware Workstation or other VMware virtual machine for the Select source type field.  You browse to the network path for the vmx file, enter the credentials to connect to the share but once you click on View source details, you receive the following error:

Unable to obtain hardware information for the selected machine

image

image

Resolution

One of the reasons why you would get this error is if the virtual machine is powered on.  This conversion process requires the source to be powered off and if you would like to virtualize it live, you should install the converter agent on the virtual machine and live clone it.  Once you’ve shutdown the virtual machine, you should see something similar to the following:

image

For further troubleshooting, you can click on the Export diagnostic logs… link at the bottom left hand corner to extract a zip package with line by line information about the failure.

image

Wednesday, January 5, 2011

Quick note about reconfiguring an ESX 4.x server’s vmkernel ports to off of a Nexus 1000v

To follow up with a post I made yesterday about reconfiguring an ESX 4.x server’s service console to different vmnics:

Quick note about reconfiguring an ESX 4.x server’s service console to different vmnics

http://terenceluk.blogspot.com/2011/01/quick-note-about-reconfiguring-esx-4x.html

… I realized later that night that I haven’t moved the vmkernel ports over from the Nexus 1000v which meant all the virtual machines that required access to the iSCSI store was offline.  I also noticed that the document I had provided with all the commands I used only did not have the esxcfg commands to show how to remove a vmk (vmkernel) port from a Nexus 1000v or distributed switch.  With a bit more time and a clearer head, I managed to take some screenshots during the process so the following serves to show how it’s done in a step-by-step manner:

To identify which port the vmk (vmkernel) is configured on the Nexus 1000v, we should execute the command:

esxcfg-vswitch -l | more

Note: The “| more” should be used because whenever you have a distributed switch or Nexus 1000v, you’re bound to have so many ports printed that a single screen won’t be able to display.

image

Once you execute the command above, you will see the following output:

image

image

image

The port we would like to remove is the one shown above with the:

DVS Name: N1KV

DVPort ID: 164

Client: vmk0

In addition to use the esxcfg-vswitch command, we should also execute the esxcfg-vmknic command to review the properties of the vmkernel port.  This is important because we will need the IP when we reconfigure the vmkernel port on a regular vSwitch:

esxcfg-vmknic -l

image

Write down the IP listed above (172.20.5.187) and issue the following command to remove the vmkernel port from the Nexus 1000v:

esxcfg-vmknic -d -s N1KV -v 164

image

The format of this command is actually:

esxcfg-vmknic -d -s <DVS Name> -v <DVPort ID>

image

As shown in the screenshot above, executing the command to remove the port doesn’t actually output anything so to check and see if the port’s removed from the Nexus 1000v, simply execute:

esxcfg-vmknic -l

or

esxcfg-vswitch -l | more

… and you will find that the port is no longer be there.  From here on, I chose to use the GUI to recreate the VMkernel port but it is possible to use the esxcfg-vmknic command for this as well.  Once you’ve recreated the vmkernel port on your regular vSwitch, simply do a rescan of your storage and you should now see the iSCSI datastores again.

image

Hope this helps anyone out there scrambling to find the commands to remove a vmkernel port from a distributed or Nexus 1000v switch.

Tuesday, January 4, 2011

Quick note about reconfiguring an ESX 4.x server’s service console to different vmnics

So I had quite the “kick off” on my first day back at work for the year 2011. To cut a long story short, I was asked to figure out why 3 of our UCS blades were knocked offline from vCenter and the rest of the network even though accessing them from UCSM’s KVM console showed that they were up. Aside from spending over an hour reviewing logs and finally realizing that someone managed to delete the the service profiles for the UCS blades (I’ll write a post about the troubleshooting process and resolution at a later time), I found myself at the point where I had to shuffle around the 2 vmnics (this UCS has a menlo card) from a Nexus 1000v switch back to a regular vSwitch all through the CLI. I’d have to say I’m not much of an expert with the commands and while I do know the basics, I can never remember the switches. What I ended up using the following Cisco document that includes all the commands I ended up using to:

  1. Remove a vmnic from a Nexus 1000v.
  2. Delete a vswif interface mapped to a port on the Nexus 1000v.
  3. Create a regular vSwitch.
  4. Recreate a vswif interface on a regular vSwitch.
  5. Add the vswif to a Service Console port on the regular vSwitch.

http://www.cisco.com/en/US/prod/collateral/switches/ps9441/ps9902/white_paper_c11-558242.html

I’ve also pasted the section I used at the bottom in case I ever need to reference this again and the link is no longer available.

Update:  The information provided below doesn’t show you how to remove a vmkernel port from a Nexus 1000v or distributed switch so I have followed up with another blog post to show how to do this: http://terenceluk.blogspot.com/2011/01/quick-note-about-reconfiguring-esx-4x_05.html

----------------------------------------------------------------------------------------------------------------------------------------------------

VMware ESX and ESXi Commands to Troubleshoot Cisco Nexus 1000V Series Switches in the Cisco Unified Computing System

In VMware ESX with a service console OS, these commands are in the /usr/sbin directory. Press ALT-F1 to display the service console login prompt, and press ALT-F11 to leave the prompt. To get to a misconfigured Cisco UCS blade for recovery, click the KVM item under the server view. This procedure assumes that the KVM IP addresses have been set up and assigned.

In VMware ESXi, the esxcfg-vswitch functions are all present as in VMware ESX. Since VMware ESXi does have a service console OS, use ALT-F2 and ALT-F11 key presses to go to and from the VMware ESXi command line. All the commands listed here for esxcfg-vswif will now be replaced with esxcfg-vmknic, and you can update specific details as required.

To List Information About the Current Configuration

esxcfg-vswif -l To list information about the current vswif interface

esxcfg-vswitch -l To list information about the current vSwitches and DVSs

To Manage the Existence of a vSwitch

esxcfg-vswitch -a vSwitch0 To add a vSwitch named vSwitch0 to the server

esxcfg-vswitch -d vSwitch0 To delete a vSwitch named vSwitch0 from the server

To Manage the Port Groups on a vSwitch

esxcfg-vswitch -A "Service Console" vSwitch0 To add a port group named Service Console to vSwitch0

esxcfg-vswitch -D "Service Console" vSwitch0 To remove a port group named Service Console from vSwitch0

To Assign VLAN Membership to a Port Group on a vSwitch

esxcfg-vswitch -p "Service Console" -v 102 vSwitch0 To set a port group named Service Console to user VLAN 102 on vSwitch0

To View the Available NICs That VMware ESX Can See

esxcfg-nics -l To see a list of VMNICs

To Manage Uplinks from the DVS or Cisco Nexus 1000V Series Switch

First run the list commands (esxcfg-vswif -l and esxcfg-vswitch -l ) to get the port numbers for the existing uplinks (vmnic0, vmnic1, etc.); this will be port#.

esxcfg-vswitch -Q vmnic0 -V [port#] myN1kDVS To remove the vmnic0 uplink from the DVS named myN1kDVS

esxcfg-vswitch -P vmnic0 -V [port#] myN1kDVS To add the vmnic0 uplink to the DVS named myN1kDVS

To add the VMNICs back into a DVS, the recommended approach is to use VMware vCenter and not the command line.

To Manage Uplinks to a vSwitch

esxcfg-vswitch -L vmnic0 vSwitch0 To add vmnic0 as an uplink to vSwitch0

esxcfg-vswitch -U vmnic0 vSwitch0 To remove vmnic0 as an uplink to vSwitch0

To remove a VMNIC from a vSwitch, the recommended approach is to use VMware vCenter and not the command line while migrating from a vSwitch to a Cisco Nexus 1000V Series DVS.

To Delete a vswif Interface from a VMware ESX Server Port Group

esxcfg-vswif -d vswif0 -p "Service Console" vSwitch0 To delete a vswif interface from the port group on vSwitch0

Esxcfg-vswif -d vswif0 -p "Service Console" -P xxx -V myN1kDVS To delete a vswif interface from the port group on the Cisco Nexus 1000V Series Switch

This deletion is a common task if an error situation arises and you lose connectivity to the VMware ESX server when migrating to the Cisco Nexus 1000V Series. You will have to add the port group to vSwitch0 and then add the vswif interface on it.

To Add a vswif Interface to the VMware ESX Server

esxcfg-vswif -a vswif0 -p "Service Console" -i 10.1.1.10 -n 255.255.255.0 To add vswif0 with IP 10.1.1.10/24 to port group Service Console

esxcfg-vswif -a vswif0 -p "Service Console" -i 10.1.1.10 -n 255.255.255.0 -P [port#]-V myN1kDVS To add vswif0 with IP 10.1.1.10/24 to port group Service Console to port = port# on DVS myN1kDVS. The port# value is usually just the last unused entry in the list of available port numbers when the DVS configuration is listed with esxcfg-vswitch -l.

To Manage a Default Gateway for the VMware ESX Server

On the VMware vCenter GUI, you can change the gateway directly, but on the command-line interface (CLI), you must edit the /etc/sysconfig/network file and update the vswif interface's default gateway. The file will look similar to this:

NETWORKING=yes

HOSTNAME=ESXServerBlade4.cisco.com

GATEWAY=10.1.1.1

After saving the file, you must reboot the VMware ESX server to implement the change.

Troubleshooting Commands

To Ping Test a VMware VMkernel Interface

esxcfg-route -l To get the routes on the VMware VMkernel network

vmkping X.X.X.X To ping an IP address on the VMware VMkernel network

To Test for the VEM Installation on a VMware ESX Host

vmkload_mod -l grep vem To verify that the appropriate VEM is loaded (the command should return the modules)