Sunday 27 November 2022

[Solved]: A server-side database availability group administrative operation failed. Error The operation failed. CreateCluster errors may result from incorrectly configured static addresses.

Environment Detail:

 Deploying Exchange server 2019, 6 servers on PR site and 3 servers on DR site. After installation and DAG creation PR site 6 servers were added to the DAG successfully but on the DR site 3 servers getting the following error while adding these servers from ECP or even from the servers powershell, using the following command.

Add-DatabaseAvailabilityGroupServer -Identity DAG19 -MailboxServer servername

Error:

A server-side database availability group administrative operation failed. Error The operation failed. CreateCluster errors may result from incorrectly configured static addresses.

 Error: An error occurred while attempting a cluster operation. Error: Cluster API failed: "AddClusterNode() (MaxPercentage=12) failed with 0x35. Error: The network path was not found". [Server: servername.cp.IG.com]


Solution:

uninstall the failover cluster feature with the following command.

Remove-windowsfeature failover-clustering

Restart the server

Try to add the server, Run the following powershell command on the required server.

Add-DatabaseAvailabilityGroupServer -Identity DAG19 -MailboxServer servername

 and server was added without any issue.

Solution details:

Nearly same issue is discussed here with same solution.

https://learn.microsoft.com/en-US/troubleshoot/windows-server/high-availability/duplicate-address-error-validate-failover-cluster

I have created the effected VMs from same image and per above link it seems the failover cluster feature was installed, and which have assigned same MAC address to the three VMs. may find the following lines in Microsoft article. 

"

  • The referenced servers are built from the same image and automatically create the Cluster NetFT adapter on each node with an identical MAC address. Failover clustering flags this as an error because it requires unique physical addresses.

"

with removing and re installing the failover cluster feature that MAC addresses were changed. 

Monday 15 August 2022

How to find the name of requester of a server component in exchange server 2013 and then make the server component active

 Some time you may need to put the exchange server in maintenance mode, in which one step is to put the servercomponents in inactive state and after the completion of the activity will have to remove the server from maintenance, in which one step is to use the following command in exchange powershell to make the servercomponents back in active state


Set-ServerComponentState <ServerName> -Component ServerWideOffline -State Active -Requester Maintenance


but some time the above command will not work and will still have some components in inactive state, even if try the above command again.

So in that case, you first have to identify requester and then use the command accordingly.

like in below command we are identifying the requester for AutoDiscoverProxy inactive state.


[PS] C:\Windows\system32>$Requester = Get-ServerComponentstate -Identity ex1301 -Component AutoDiscoverProxy

[PS] C:\Windows\system32>$Requester.LocalStates


Requester                                             State Timestamp                     Component

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

HealthApi                                          Inactive 6/23/2022 9:49:25 AM          AutoDiscoverProxy

Maintenance                                          Active 6/23/2022 10:35:04 AM         AutoDiscoverProxy

functional                                           Active 6/23/2022 10:33:34 AM         AutoDiscoverProxy



We can see that the HealthApi is the Requester for this component. so now we will use the following command.


Set-ServerComponentState Ex1301 -Component AutoDiscoverProxy -State Active -Requester HealthApi


after that, we can check the status of all server components again with following command.


Get-ServerComponentState <ServerName> | ft Component,State –Autosize 


and the required components should be in active state.

Tuesday 14 June 2022

Resolved: The remote Session was disconnected because there are no remote desktop servers available to provide a license.

 Issue:

Unable to RDP to server, getting error

"The remote Session was disconnected because there are no remote desktop servers available to provide a license."

Details:

had installed Remote desktop services on a server, have entered the keys as well but after 60 days (Grace period), was unable to RDP even to the Remote desktop server, getting the above error after accepting the credentials.

Solution:

I have workgroup environment to so did the following changes on the Remote Desktop server. but you have domain environment then may need to have domain GPO configured as below and apply.

open local group policy editor on the Remote desktop services Server with

GPedite.msc--->computer configuration--->Administrative Templates--->Windows components--->Remote Desktop Services--->Remote Desktop Session Host--->Licensing--->double click on "Use the specified Remote Desktop license servers"-->select enabled and in "license servers to use" type the name or IP of licensing server and click ok


Then double click on Set the Remote desktop licensing mode, select enabled option and select the licensing mode "per device or per user, etc.." per your licensing details. and click ok.


After that restart your server and try to RDP to this server. it should work.

.


Friday 3 June 2022

because of a protocol error (code: 0x112d), the remote session will be disconnected. please try connecting to the remote computer again.

 Issue:

while trying to RDP a server, getting the error "because of a protocol error (code: 0x112d), the remote session will be disconnected. please try connecting to the remote computer again."


Solution:

in my case the server was over loaded and with restart the issue was resolved.

Thursday 26 May 2022

SQL server 2014 SP1 services not starting after clean installation

Environment:

Installed SQL server 2014 few times on same machines and difference machines but the SQL services were not starting.

 while trying to start the services, getting the following errors.

Error:

"The SQL Server (MSSQLSERVER) service terminated with the following service-specific error:  The group or resource is not in the correct state to perform the requested operation."

Error:

"“Windows could not start SQL Server (SQLEXPRESS) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 5023.”"

Solution: 

Download the latest patches (SQLServer2014-KB4019099-x64 ) from  the following link to update the SQL

"KB3135244 - TLS 1.2 support for Microsoft SQL Server"


Referance 

1: Microsoft SQL Sever 2014 Express Advanced SP2 (version 12.2.5000.0) fails to start after TLS 1.0 is disabled. - Microsoft Q&A

2: TLS 1.2 Support for SQL Server 2008, 2008 R2, 2012 and 2014 | Microsoft Docs

3: KB3135244 - TLS 1.2 support for Microsoft SQL Server



Tuesday 12 April 2022

how to show the running and listening ports in windows server locally and on remote server

You can use the netstat command to show the current status of ports in command prompt.

like as below.

Netstat -a 

it will show all the running ports.

But we can use the Get-NetTCPConnection, in windows PowerShell as well, it have some more features.


1:

Get-NetTCPConnection -State Listen,Established

To show the same on remote computer, use the following command

2:

invoke-Command -Computername Server2 -ScriptBlock { Get-NetTCPConnection -State Listen,Established}

Sunday 30 January 2022

To show complete value of a property of a user without ...

Some time you want to see the value of an attribute of a user/mailbox through powershell command but the output you getting would be in ... at the end. so to get the complete value, should run the following command. 
Get-mailbox nawaz.khan* | select-object -expandproperty EmailAddresses

Thursday 6 January 2022

Resolved: pick an account + there was an issue with forgetting user@domain.com. please try later

My outlook app on on mobile device was not connecting to my office 365 mailbox as i had recently changed my UserPrinciple name and primarySMTPAddress in office 365, as it was business requirement.

Tried to reset my account but no luck.

Tried to forget my old account but no luck, getting the following error in the outlook app.  

pick an account + there was an issue with forgetting nawaz@olddomain.com, please try later

Tried to add the account with the new smtp address (nawaz@newdomain.com) but no luck, as it again and again asking for the credentials and picking to that old smtp address (nawaz@olddomain.com)

At the end, open the company portal app and found that there was no user signed in. 

so in the company portal app , re-sign in with new PrimarySMTPaddress nawaz@newdomain.com. once the new address verified there, was able to add the office 365 account in the outlook App.

Wednesday 5 January 2022

Your archive mailbox is almost full

  1. Connect to Exchange Online Powershell.
  2. Run the following commandlet for the user: Enable-Mailbox <user mailbox> -AutoExpandingArchive
  3. Run the following commandlet to confirm it is enabled for the user: Get-Mailbox <user mailbox> | FL AutoExpandingArchiveEnabled

 

As per below example:

Connect-ExchangeOnline

then run the following command to confirm the current "AutoExpandingArchiveEnabled" status. if it is not enabled/false. 

Get-Mailbox nawaz@domain.com| FL AutoExpandingArchiveEnabled

AutoExpandingArchiveEnabled : False


Lets enable it true with the following command.

PS C:\Users\Nawaz> Enable-Mailbox nawaz@domain.com -AutoExpandingArchive

Name                      Alias           Database                       ProhibitSendQuota    ExternalDirectoryObjectId

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

nawaz     EURPdfR07DG198-db121             99 GB (106,300,44... 788cddcf3-f92f-4497-b95c-2b1dcea6982dff


And lets check it again.

PS C:\Users\Nawaz> Get-Mailbox nawaz@domain.com | FL AutoExpandingArchiveEnabled

AutoExpandingArchiveEnabled : True


To force the MFA (Managed Folder Assistant) to immediately process a specified mailbox

run 

Start-ManagedFolderAssistant -Identity nawaz@domain.com