SharePoint Patch trouble shooting

 

PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources -cmd services -install

 

 

UPGRADED SharePoint 2010,patch upgrade  from  May 2015 CU January 2016 CU :

 

Copied ubersrv2013-kb3114497-fullfile-x64-glb.exe under c:\\SP1 folder

 

ERROR:1

 

Getting error- “The expected version of the product was not found on the system”

 

Open PowerShell as Administrator.

 

Change Directory to where you ubersrv2013-kb3114497-fullfile-x64-glb.exe file is placed.  Execute the following command. e.g.

 

.\ubersrv2013-kb3114497-fullfile-x64-glb.exe PACKAGE.BYPASS.DETECTION.CHECK=1

 

CU Installation will start.

 

ERROR:2

 

While patching one of my SharePoint 2013 farms with the April 2013 Cumulative Update, I kept receiving an error:

 

“The installation of this package failed”.

 

“The installation of this package failed” in middle

 

FIX:Ran the CU installer again, and it worked.

 

The best workaround for this issue is to simply run the installation package 3 times. The package will fail to install with the above error on the first two attempts, but should be successful on the third attempt.  The installation will not be corrupt and there are no other known issues once you have the update package successfully installed.

————————–

First install CU in all servers and after restart

RUn Psconfig in the server which has CA

 

Work flow as follows for PS config

APP

Search

Web

 

Error:

psconfig

failed to add the service connection point for this farm

The exclusive inplace upgrader timer job failed

 

FIX

Open power shell

navigate to CD “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN”

 

add-pssnapin microsoft.sharepoint.powershell

 

PSConfig.exe -cmd upgrade -inplace b2b -wait -force

 

PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

 

(get-spfarm).buildversion

 

  1. Update binary installation failure.
    • Version incompatibility error.
    • Installation error or failure (“product: Something SharePoint could not be installed. Error code 1603. Additional information is available in the log file something.LOG”).
  2. PSConfig/SharePoint Configuration Wizard critical error.
    • Application content install (rare).
    • SharePoint services provisioning failure.
  3. Farm/databases upgrade error.
    • Service applications.
    • Content database.

 

 

 

 

 

 

PSCONFIGUI.EXE is the UI based configuration wizard which performs several tasks one after the other after installing fixes.
PSCONFIG.EXE is the command line tool which gives users granular control over all tasks that are executed and which is therefor often quicker than PSCONFIGUI.EXE.

On the other hand that means that it is up to the user which operations are performed by PSCONFIG.EXE

Most customers just ran the following command

 

 

PSCONFIG -cmd upgrade -inplace b2b -wait

But that command only performs a subset of operations performed by PSCONFIGUI.EXE. E.g. it will not update the files in the _app_bin directory of the web applications!

 

Looking into the list of operations that can be done using PSCONFIG.EXE gives you an idea about which operations are possible. The yellow marked operations are those that are automatically performed by PSCONFIGUI.EXE after installing a fix.

Usage:
psconfig.exe -cmd <Command> [Parameters]
psconfig.exe -help [Command]
psconfig.exe -?
Commands:
setup
standaloneconfig
configdb
helpcollections
secureresources
services
installfeatures
adminvs
upgrade
evalprovision
applicationcontent
quiet

 

 

The following issues which were reported in the last couple of weeks could have been avoided by using PSCONFIGUI.EXE rather than PSCONFIG.EXE:

– MethodNotFoundException in Microsoft.Office.Server.UserProfiles.ServerStub.dll

– Search not working due to incorrect version of the Microsoft.Office.Server.Search.ServerProxy.dll

In case you need to use PSCONFIG.EXE to automate some tasks you should use the following command:

PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources -cmd services -install

 

 

 

 

 

 

 

 

 

 

 

Step1: Works with around 70-80% success

a) Locks the farm for upgrade
stsadm -o setproperty -pn command-line-upgrade-running -pv No

Note: At times, the command might fail. Run the command again and it will work. 

b) Upgrade the SharePoint farm

PSConfig.exe -cmd upgrade -inplace b2b -wait –force

Step2: When 20% fails:

While executing above commands, you might get this error

Add -cmd installcheck –noinstallcheck parameters.

FIX:
So execute these commands as follows:
a)  stsadm -o setproperty -pn command-line-upgrade-running -pv No
b) PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck -noinstallcheck

Step3:

You might get this error after executing above commands:
a) stsadm -o setproperty -pn command-line-upgrade-running -pv No 
b) PSConfig.exe -cmd upgrade -inplace b2b -wait –force

An exception of type System.DirectoryServices.DirectoryServicesCOMException was thrown.  Additional exception information: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

As usual the error message are confusing.  After a lot of research, tail and error in my development environment.

NOTE: All environments are different environments and depends on current SharePoint patch level, SQL Server patch level etc.

FIX:
Ensure following servers have been STARTED across all the SharePoint servers:

  • IISAdmin service
  • SharePoint Timer service
  • SharePoint Admin service
  • WWW Publishing service

Run the following commands:

a) stsadm -o setproperty -pn command-line-upgrade-running -pv Yes
b) PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck –noinstallcheck

Patching was successful.

 

 

 

 

 

 

 
Step4:
You might get this error after executing following commands:
a) stsadm -o setproperty -pn command-line-upgrade-running -pv No 
b) PSConfig.exe -cmd upgrade -inplace b2b -wait –force 

Unable to create a Service Connection Point in the current Active Directory domain. Verify that the SharePoint container exists in the current domain and that you have rights to write to it.

Microsoft.SharePoint.SPException: The object LDAP://CN=Microsoft SharePoint Products,CN=System,DC=contoso,DC=.east,DC=com doesn’t exist in the directory
at Microsoft.SharePoint.Administration.SPServiceConnectionPoint.Ensure(String serviceBindingInformation)
at Microsoft.SharePoint.PostSetupConfiguration.UpgradeTask.Run()

After checking with the Active Directory admin, there is NO entry for Microsoft SharePoint Products. Obliviously, the error message thrown is misleading.

FIX:
Ensure following servers have been STARTED across all the SharePoint servers:

  • IISAdmin service
  • SharePoint Timer service
  • SharePoint Admin service
  • WWW Publishing service

Run the following commands:

  1. a) stsadm -o setproperty -pn command-line-upgrade-running -pv No
    b) PSCONFIG -CMD UPGRADE -INPLACE B2B -WAIT -cmd installcheck –noinstallcheck

 

 

PS C:\> $spprod = Get-SPProduct
PS C:\> $spprod.Servers | ? { $_.InstallStatus -eq “InstallRequired” } | % { $_.RequiredButMissingPatches }

 

 

To many factors which influence it (e.g. previous CU level, network speed, CPU, other activities on SQL server, …).
You can speed things up by detaching all content databases before running PSConfig and then reattach them in parallel using multiple powershell windows to perform DB upgrade in parallel for multiple DBs

 

 

I can’t accomplish successfully psconfig -cmd upgrade -inplace b2b -wait (after SP2010 April 2016 CU) command as all the time I’m receiving error. From the logs I can see that there is some conflict: Failed to upgrade SharePoint Products.
An exception of type Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException was thrown. Additional exception information: An update conflict has occurred, and you must re-try this action. The object SPClaimProviderManager Name=ClaimProviderManager was updated by domain\account, in the PSCONFIG (3668) process, on machine SERVERNAME. View the tracing log for more information about the conflict. I searched many sites but I couldn’t find any hints. Is there any command which should accomplish SharePoint upgrade successfully ?

 

 

Stop the timer service, go to C:\ProgramData\Microsoft\SharePoint\Config\GUID, delete all XML files (you should have many xml files and one ini file; leave the ini file), open the ini file in notepad, replace the number with 1 and start the timer. Watch out, because it will generate a lot of IO, so just give it a few minutes to calm down and run psconfig again.

 

 

 

 

Whenever I run -cmd secure resources the command fails with UnauthorizedAccessException:

Exception: System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl)
at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext)
at System.Security.AccessControl.FileSystemSecurity.Persist(String fullPath)
at System.IO.FileInfo.SetAccessControl(FileSecurity fileSecurity)
at Microsoft.SharePoint.Administration.SPResourceAccess.SetFileAccessRule()
at Microsoft.SharePoint.Administration.SPResourceAccess.SecureResources(Boolean isSingleBox, EventHandler`1 progressUpdateEvent)
at Microsoft.SharePoint.PostSetupConfiguration.SecurityTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

The above was gathered from SharePoint Error logs at …Web Server Extensions\15\LOGS. Running SharePoint 2013 Standard.

I am seeing the following message even though 7/8 steps were successful (secureresources was the failure): “Configuration of SharePoint products failed” successful configuration settings: 7, unsuccessful configuration settings: 1
sounds to me as if the current user is not a local administrator on the box.
 

 

Binary Installation Failure

This is where the binaries haven’t made it onto the server for one reason or another. This could happen for one of two reasons; either the installer rejects the patch because you’ve not got what it expects already installed or the upgrade fails midway through. In either case, I’ll let my fellow blogger navigate you through these troubles – http://blogs.technet.com/b/arudell/archive/2012/12/05/sharepoint-installer-troubleshooting.aspx

One small note from me; I’ve resolved unexpectedly failing installations by running “Get-SPProduct –Local” before as it basically forces the local machine to refresh the packages installed.

 

Bootstrap in web application

Add below tags to get

<head>
<meta charset=”utf-8″>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>

 

 <link href=”/css/bootstrap.min.css” rel=”stylesheet”>
</head>

Register client script

 
String scriptMessage = “function ViewCRMOTN(){document.getElementById(‘btnViewCRMDetails’).disabled = false;}”;
if (!ClientScript.IsClientScriptBlockRegistered(“ViewCRMOTN”))
{
ClientScript.RegisterClientScriptBlock(this.GetType(), “ViewCRMOTN”, scriptMessage.ToString());
}

Log Message in c#

public void LogMessage(string Message, string LOG_FOR)
{
string LOG_UPDATE = “Y”;
string LOG_FOLDER = “”;
if (LOG_UPDATE == “Y”)
{
string writeText = “”;
string _FileName = “”;
System.IO.StreamWriter F1;

_FileName = LOG_FOR + “_” + System.DateTime.Today.ToShortDateString();
//_FileName += “_” + System.DateTime.Today.ToShortTimeString();
_FileName = _FileName.Replace(“:”, “”);
_FileName = _FileName.Replace(“/”, “”);
_FileName = _FileName.Replace(” “, “”);

 

LOG_FOLDER = ConfigurationManager.AppSettings[“LOG_FOLDER”].ToString();//getAppSettings(“LOG_FOLDER”);

if (LOG_FOLDER == “”)
{
LOG_FOLDER = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
LOG_FOLDER = LOG_FOLDER.Replace(“file:\\”, “”);
LOG_FOLDER += “/../Log/”;
}

if (!System.IO.Directory.Exists(LOG_FOLDER))
{
System.IO.Directory.CreateDirectory(LOG_FOLDER);
}

_FileName = LOG_FOLDER + _FileName + “.txt”;

 

System.IO.FileInfo _FileInfo = new System.IO.FileInfo(_FileName);
//if (_FileInfo.Exists && _FileInfo.Length > 1024)
//{
// _FileName = System.DateTime.Today.ToShortDateString();
// _FileName += “_” + System.DateTime.Today.ToShortTimeString();
// _FileName = _FileName.Replace(“:”, “”);
// _FileName = _FileName.Replace(“/”, “”);
// _FileName = _FileName.Replace(” “, “”);
// _FileName = LOG_FOLDER + _FileName + “.txt”;

//}

F1 = new System.IO.StreamWriter(_FileName, true);
writeText = System.DateTime.Now.ToString() + “:” + Message;
F1.WriteLine(writeText);
F1.Close();

}

}

Failed to create designer ‘crystaldecisions.web.crystalreportviewer

Suffered a lot with this issue in UAT it is working and in PROD having issue

Install “CRforVS_13_0_2” both 64 bit and 32 bit installers in the server to resolve this issue

then you can see the designer and it will work smoothly

Verify other Crystal versions shouldn’t be same public keytoken example

if Crystal report with 12 version and Crystal report with 14 version in same server it will not work

Maintain single crystal report version in the server