Issue in Distributed Cache Service in SharePoint 2019 - sharepoint

I am having SharePoint 2019 high availability environment wherein Distributed Cache is up & running on WFE1. However, when I am running the Configuration Wizard in WFE2, its failing with the error message - Configuration Wizard failed with error 'CacheHostInfo is null'.
I tried multiple PowerShell commands on WFE2 and referred below articles, however issue still persists.
enter link description here
enter link description here

Related

SharePoint 2016 - Copying content DB from Prod to Dev

I tried to copy the content DB from Prod to Dev server for the first time in my SP 2016 environment. Both the environments build versions are same (16.0.4705.1000). However in the prod under "Manage Patch Status" I see one extra Feature Pack 2 patch (16.0.4588.1001).
https://support.microsoft.com/en-us/help/4011127/descriptionofthesecurityupdateforsharepointserver2016september12-2017
Now when I am doing Mount-SPContentDatabase, I get the following error.
Mount-SPContentDatabase : An extension defined in the database is not registered with the farm.
In the ULS I see the following information. It says the project server database extensions are missing.
Following are my questions,
Is this because I have installed Feature Pack 2(link above) in Prod which has security updates for Project server? We don't have project server enabled in either of the environments.
Can I install the Feature Pack 2 in Dev now even though it has higher security update already installed? Isn't the later patch includes everything that was released in the previous patches?
This is just for my understanding. In the manage patch status why does the Install Status for feature pack 2 shows as "Superseded" even though I have other later patches?
Tried Restore-SPsite as well but getting error "The extension set does not match."
Had the same problem during the migration from 2016 -> 2019.
My solution:
Register the missing extension https://techcommunity.microsoft.com/t5/sharepoint-support-blog/upgrading-a-content-db-from-sharepoint-2016-to-sharepoint-2019/ba-p/1374209 (look at the bottom of the post)
remount the contentDB
Required code to perform the registration in step 1:
Check extensions in old farm
$contentservice=[Microsoft.sharepoint.Administration.SPwebservice]::ContentService
$contentservice.RegisteredDatabaseExtensionTypes >> SP2016Farm_registered_Extn.txt
Check extensions in new farm
$contentservice=[Microsoft.sharepoint.Administration.SPwebservice]::ContentService
$contentservice.RegisteredDatabaseExtensionTypes >>SP2019Farm_registered_Extn.txt
Register missing extension in new farm
$svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Project.Server.Database.Extension") | FL
$svc.RegisteredDatabaseExtensionTypes.EnsureAdded([Microsoft.Office.Project.Server.Database.Extension.ProjectDatabaseExtension])
$svc.Update($true)
In my case i did the steps below before i have registered the missing extension, but i think/hope there is no need to do that.
Powershell: Enable-ProjectServerLicense (Trail License)
Check running Sharepoint CA > ProjectServer Service
Check/create Sharepoint CA > ProjectServer Application

NuGet feed in Azure DevOps is not accessible anymore (TF246017 / TF30040)

I recently activated the new URL in Azure DevOps, moving from
https://xxx.visualstudio.com/
to
https://dev.azure.com/xxx
Consequently, the address to my NuGet feed also changed:
https://{xxx.pkgs.visualstudio.com/_packaging/feed.xxx.ca/nuget/v3/index.json
to
https://pkgs.dev.azure.com/xxx/_packaging/feed.xxx.ca/nuget/v3/index.json
Everything works except for one thing. Now, I am unable to access my NuGet feed (using Visual Studio, Visual Studio for Mac & Rider). I end up with the following error:
Attempting to gather dependency information for multiple packages with
respect to project 'iOS', targeting 'Xamarin.iOS,Version=v1.0' Unable
to load the service index for source
https://pkgs.dev.azure.com/xxx/_packaging/feed.xxx.ca/nuget/v3/index.json.
If I type the address in a browser, I get the following error:
{"$id":"1","innerException":null,"message":"TF246017: Azure DevOps
Server could not connect to the database. Verify that the instance is
specified correctly, that the server that is hosting the database is
operational, and that network problems are not blocking communication
with the
server.","typeName":"Microsoft.TeamFoundation.Framework.Server.DatabaseConnectionException,
Microsoft.TeamFoundation.Framework.Server","typeKey":"DatabaseConnectionException","errorCode":0,"eventId":3008}
Question
How do I fix it?
Update #1
There is a similar error described in this SO question. I am not using a proxy server.
Update #2
I am not seeing this error message when accessing the index.json:
{"$id":"1","innerException":null,"message":"TF30040: The database is
not correctly configured. Contact your Azure DevOps Server
administrator.","typeName":"Microsoft.TeamFoundation.Framework.Server.AzureClientIPRestrictedException,
Microsoft.TeamFoundation.Framework.Server","typeKey":"AzureClientIPRestrictedException","errorCode":0,"eventId":3007}
I posted the same question developercommunity.visualstudio.com and got it fixed. It was due a problem on Microsoft's side as shown on the dev.azure's status page.

ClickOnce application won't start

Only on this one Win 10 PC it doesn't work, it just won't start, no messages why, not even in the log. I've even disabled firewall and anti-virus. I've even tried copying exe file and starting it without deployment and it worked, so there are no issues with the program. What should I do next?
This is the log:
PLATFORM VERSION INFO
Windows : 10.0.17134.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.7.3056.0 built by: NET472REL1
clr.dll : 4.7.3110.0 built by: NET472REL1LAST_C
dfdll.dll : 4.7.3056.0 built by: NET472REL1
dfshim.dll : 10.0.17134.1 (WinBuild.160101.0800)
SOURCES
Deployment url : file:///C:/Users/Vlatka/Desktop/Sindikat.appref-ms%7C
Server : Microsoft-IIS/10.0
X-Powered-By : ASP.NET
Deployment Provider url : http://...
ERROR SUMMARY
No errors were detected during this operation.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
* The manifest for this application does not have a signature. Signature validation will be ignored.
OPERATION PROGRESS STATUS
* [25.5.2018. 11:09:29] : Activation of C:\Users\Vlatka\Desktop\Sindikat.appref-ms| has started.
* [25.5.2018. 11:09:29] : Performing necessary update check as specified by the deployment.
* [25.5.2018. 11:09:30] : Activation of C:\Users\Vlatka\Desktop\Sindikat.appref-ms| succeeded.
ERROR DETAILS
No errors were detected during this operation.
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
The problem was new Windows Defender with ClickOnce update before app start, I've just changed that it looks for an update after the app start. Defender didn't warn the user if he would like to allow the app to start, despite the picked Warn option.
Don't forget to select the "This is a full trust application" option in "Properties > Security" before publish.
If you're installing on a completely new computer with Windows 10 and .NET Framework 4.8 and it doesn't launch, you most likely need to install Visual Studio to install any old dependencies you app might need.
It's definitely not a perfect solution but at least it works.

Visual Studio Team Services Build Failed - Database Project to Azure SQL

I have a build in Team Services (was Visual Studio Online), with one MSBuild step that is configured to build and deploy a DB project, using a publish profile. I can't seem to succeed in authenticating it. When I queued the Team Services build definition, I am able to build the DB Project and produce the .dacpac. However, come publish time and this error comes:
C:\a\1\s\Source\ShopDatabase\bin\Output\MyDatabase.publish.sql(0,0): Error Deploy72002: Unable to connect to master or target server 'mydb'. You must have a user with the same password in master or target server 'mydb'.
We're certain the user exists in the mydb and the master db in Azure.
Target: Azure SQL Database
DB project Target Platform: Microsoft Azure SQL Database
When I run the publish profile directly from Visual Studio, it works. But in Team Services build definition, it doesn't. I tried these as MSbuild arguments:
/t:Build;Publish /p:SqlPublishProfilePath="myproject.Dev.publish.xml" /p:Password="mypassword"
and this:
/t:Build;Publish /p:SqlPublishProfilePath="myproject.Dev.publish.xml" /p:TargetConnectionString="Data Source=myproject.database.windows.net;Persist Security Info=True;User ID=myuser;Password=mypassword;" /p:VisualStudioVersion=14.0 /p:Username="myuser" /p:Password="mypassword"
and this:
/t:Build;Publish /p:SqlPublishProfilePath="myproject.Dev.publish.xml" /p:TargetConnectionString="Data Source=myproject.database.windows.net;Persist Security Info=True;User ID=myuser;Password=mypassword;" /p:VisualStudioVersion=14.0 /p:TargetUserName="myuser" /p:TargetPassword="mypassword"
But won't work. Please help me T_T been searching the net for 6 hours already
This is a poor error message that likely disguises the real issue: you need to open up your firewall for deployment to Azure SQL DB. It's working from Visual Studio because you have your IP range enabled. The steps in this guide to building & deploying from VSO, specifically the post on deploying from VSO here, should help. it specifically covers how to open up the firewall as part of deployment.
An obvious answer (sometimes in hindsight!) but for future googlers the error You must have a user with the same password in master or target server
also happens if you are pointing your deploy to an instance that doesn't exist.
ie: Server was not found.
Fwiw, was generating a script from visual studio. Running as admin made it stop being a douche about this. What a waste of my life just now...
We recently had this issue and we resolved it by removing the #server-name from the end of the Server Admin Login value in the SQL DB Details section of the SQL Deploy VSTS Task. Some guides online say you need this but it appears something changed recently and it is no longer required.

Error Deploying New Relic Instrumented Site to Azure from Github & VS.NET

I am getting the following error:
Error: The process cannot access the file 'C:\DWASFiles\Sites\mywebsitename\VirtualDirectory0\site\wwwroot\newrelic\NewRelic.Agent.Core.dll' because it is being used by another process.
In the Running deployment command... log file when attempting to deploy an Azure website from Github.
Would appreciate any pointers as to what could be causing this.
UPDATE: Turns out this is also failing when publishing directly from VS.NET with the following:
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Warning : An error was encountered when processing operation 'Create File' on 'NewRelic.Agent.Core.dll'.
1>Retrying operation 'Update' on object filePath (mywebsitename\newrelic\NewRelic.Agent.Core.dll). Attempt 1 of 2.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Error : Web deployment task failed. ((06/07/2013 23:54:58) An error occurred when the request was processed on the remote computer.)
This was working before and I am not sure why it would have stopped.
NewRelic recommend stopping the website to unload the file and allow the deployment to go through.
As an alternative, you can set COR_ENABLE_PROFILING to 0 in your app settings on the configure tab to temporarily disable the profiling, which should then allow you to continue with the deployment while leaving the website operational throughout.
Instead of stopping the website you can temporarily turn off New Relic monitoring via the Configure tab on manage.windowsazure.com:
Configure > developer analytics > select "OFF" > Save
Deploy
Configure > developer analytics > select "ADD-ON" > Choose Add-on from dropdown > Save
Worked for me, both with a regular deployment from VS and an automatic build from VSO.
This is a known issue with the New Relic .NET agent for Azure Websites when performing an upgrade of the agent. The workaround is to stop the website to release the dll, finish the deployment and then restart the instance.
https://newrelic.com/docs/dotnet/azure-web-sites#h2-1
Not really a solution but more of a work-around, in the publish dialog view a preview of the changes and uncheck the NewRelic.Agent.Core.dll file so that it doesn't get published.
None of these answers work for me anymore. I have an Azure Basic tier website plan, which hosts multiple actual websites.
If I don't stop the website, I get the error mentioned above (newrelic.agent.core.dll is in use)...
If I do stop the website (or all of them), I get an error saying that the publishing endpoint isn't available.
If I go to the configure tab and disable the AddOn, we still get the error mentioned above (newrelic.agent.core.dll is in use)...
Pretty much we just republish over and over again with different permutations of the above until if works. It took me hours the other day, took me 10 minutes today.
If you are using webdeploy, then you can configure your webdeploy settings so that it ignores the file. However, if you do that, you will manually have to deploy any updates to the new relic agent.
I had a similar issue with the new relic log file being locked, and solved it by:
Moving the new relic log file to a subdirectory of the web root (e.g. \newreliclogs)
Adding 2 lines to my powershell script that configured the skip directive to ignore that whole directory. e.g. (where destBaseOptions is of type Microsoft.Web.Deployment.DeploymentBaseOptions
$skipDirective = new-object Microsoft.Web.Deployment.DeploymentSkipDirective("NewRelicLog","objectName=dirPath,absolutePath=.*\newreliclogs$")
$destBaseOptions.SkipDirectives.Add($skipDirective)
Depending on how you are using webdeploy, the configuration is achieved slightly differently, I used the following links to help me piece it together:
https://technet.microsoft.com/en-us/library/dd569089(WS.10).aspx
https://msdn.microsoft.com/en-us/library/microsoft.web.deployment.deploymentskipdirective(v=vs.90).aspx
https://msdn.microsoft.com/en-us/library/dd543313(v=vs.90).aspx
http://blogs.iis.net/jamescoo/archive/2009/11/03/msdeploy-api-scenarios.aspx
http://forums.iis.net/p/1192163/2031814.aspx#2031813
And I used the powershell script from the Octopus Deploy Library at https://library.octopusdeploy.com/#!/step-template/actiontemplate-web-deploy-publish-website-(msdeploy).

Resources