Monday, August 17, 2015

NetIQ AppManager for SharePoint Monitoring

NetIQ AppManager for SharePoint Monitoring
 
This module expands NetIQ AppManager® to provide in-depth, real-time monitoring of mission-critical SharePoint Server services. It ensures the consistent performance of SharePoint Server by presenting a centralized view of server performance, database connectivity, space usage, Web page availability and more. It also uses Analysis Center to publish reports to SharePoint Server automatically.

Features & benefits

Ensures site performance.
Provides you with alerts to ensure issues are identified, often before your end-users are affected. In conjunction with Analysis Center, charts are created easily, detailing trend analysis of numerous factors in order to assist you with troubleshooting problems.

Eases administrative duties.
Delivers detailed reporting on the health of SharePoint Servers saving you additional time and effort. Flexible reporting enables comparative analysis of such key performance indicators as—system performance trends (hourly, daily, weekly, monthly), system utilization and capacity, database storage usage by different sites, performance of Web parts, SharePoint Server site user trends, service-level reporting and Web page availability.

Helps moderate administrative costs.
Monitors Web site space utilization to identify underutilized Web sites ensuring time and resources are focused on the appropriate sites. Sites occupying unnecessary space can be consolidated with another site or deleted altogether. Site consolidation reduces the costs associated with using SharePoint Server services.

Monitors SharePoint Server installations in a distributed environment.
AppManager supports the installation of Microsoft Office SharePoint Server 2007 on multiple servers in a distributed environment, also known as a server farm.

 

What's monitored

AppManager for Microsoft Office SharePoint Server provides out-of-the-box Knowledge Scripts that manage simple or complex events and collect data for diagnostics and real-time and historical performance analysis. Examples include:
BytesTransfer. Monitors the total number of bytes transferred per second to and from a Web site.
ConnectionsInterval. Monitors the number of Web site connections from anonymous and non-anonymous (or user) accounts.
DBSpaceUtil. Monitors the percentage of space utilized by the SharePoint content database.
HealthCheck. Monitors the operational status of active SharePoint services and Web applications.
IsolatedApps. Monitors the number of isolated applications in your SharePoint environment.
ServerUptime. Monitors the uptime of Web sites in your Microsoft Office SharePoint Server environment.
SiteInfo. Monitors date and space utilization information about each Web application on the SharePoint Server.
SiteUsage. Displays specific information about each site on the Microsoft Office SharePoint Server.
WebPagePerf. Monitors the availability and performance of a Web application's Web pages SharePoint Server.
WebPartInfo. Monitors the status and availability of Web parts used by SharePoint server.
Report_ServerUptime. Generates a report about the number of hours the Microsoft Office SharePoint Server has been operational since the last reboot.
Report_SiteInfo. Generates a report of information, sorted by date, about each site on the Microsoft Office SharePoint Server.
Report_SiteUsage. Generates a report that contains usage information about each Web site on the Microsoft Office SharePoint Server.
Report_WebPartInfo. Generates a report about the status and availability of Web parts used by the Microsoft Office SharePoint Server.
Discovery_SharePoint. Discovers configuration and resource information for SharePoint Portal Servers.
 

A COM+ application may stop working on SharePoint Server when the identity user logs off

Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards

Problem Description You have a SharePoint server and it is set to run as a particular user. After working for sometime on SharePoint service may stop working and keep failing. Unless you restart IIS or restart server, it won’t come back. In the meantime you may see an error like this in the application event log on the CLIENT machine:
Event Type:        Error
Event Source:    DCOM
Event Category:                None
Event ID:              10006
Date:                    
Time:                    
User:                     Domain\user
Computer:          *****
Description:
DCOM got error "Unspecified error " from the computer ‘servername’ when attempting to activate the server: {EF047BF9-F91A-4D5B-A18F-BED49553703B}

In this case the event message tells you that the error (E_FAIL or 80004005 or Unspecified error ) is returned from the server during activation vs. a method call. The component CLSID is {EF047BF9-F91A-4D5B-A18F-BED49553703B} 

Cause 
The identity user initially logged on to the server when the application launched. The issue happens when the identity user logs off and the COM+ application can no longer read registry keys in the profile of the identity user because of a new User Profile Service functionality of forcing the unload of the user profile on Windows 2008 when the user logs off. Note this new User Profile Service functionality is built into the OS by default.This is a situation where the functionality of forcing the unload of the user profile may break an application if registry handles are not closed in the process.

If you enable COM tracing, you’ll see the error ERROR_KEY_DELETED in the ole32 trace log:
[2] 0BA8.15D0::10/17/2009-13:07:54.390 [OLECOM](:CComRegCatalog::GetClassInfoW) CLSID:ecabafae-7f19-11d2-978e-0000f8757e2a 1018(ERROR_KEY_DELETED)
[2] 0BA8.15D0::10/17/2009-13:07:54.390 [OLECOM](:CComCatalog::GetClassInfoInternal) CLSID:ecabafae-7f19-11d2-978e-0000f8757e2a Flags:0 IID:00000000-0000-0000-c000-000000000046 0x800703fa(ERROR_KEY_DELETED)

You'll see events like this in the application event log:
Log Name:      Application
Source:        Microsoft-Windows-User Profiles Service
Date:          
Event ID:      1530
Task Category: None
Level:         Warning
Keywords:      Classic
User:          SYSTEM
Computer:      
Description:
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards. 

DETAIL -
1 user registry handles leaked from \Registry\User\S-1-5-21-1049297961-3057247634-349289542-1004_Classes:
Process 2428 (\Device\HarddiskVolume1\Windows\System32\dllhost.exe) has opened key \REGISTRY\USER\S-1-5-21-1049297961-3057247634-349289542-1004_CLASSES

Resolution
As a workaround it may be necessary to disable this feature which is the default behavior. The policy setting 'Do not forcefully unload the user registry at user logoff' counters the default behavior of Windows 2008/2012. When enabled, Windows 2008 does not forcefully unload the registry and waits until no other processes are using the user registry before it unloads it.

The policy can be found in the group policy editor (gpedit.msc)
Computer Configuration->Administrative Templates->System-> UserProfiles
Do not forcefully unload the user registry at user logoff

Change the setting from “Not Configured” to “Enabled”, which disables the new User Profile Service feature.
'DisableForceUnload' is the value added to the registry

Excel Apppool fails on SharePoint server, getting "The application requested process termination through System.Environment.FailFast"

Excel Apppool fails on SharePoint server,  getting "The application requested process termination through System.Environment.FailFast"

I came across an issue the other day where the Excel Services failed to start in SharePoint 2013.When a user clicked an *.xlsx file the following message was displayed in the browser
"We're sorry. We ran into a problem completing your request. Please try that again in a few minutes"
and the corresponding w3wp.exe process went down. I managed to reproduce this here and found the solution.
Basically this was down to a permission issue in the registry. Steps to see the issue and the solution below.
:: Removed "READ" permissions on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0 (in this case for the WSS_WPG group).
:: Did an IISReset to make sure all was properly reset and then tried to open a *.xlsx file. This produced the following:
# In the browser:
"We're sorry. We ran into a problem completing your request. Please try that again in a few minutes"
# In the ULS logs:
<date><time>   w3wp.exe (0x2D30)        0x1958      Excel Services Application            Web Front End            acbd        Critical   
Unable to reach Excel Calculation Services http://<servername>/e1413656e1ac4e948a91e26d5913011c/ExcelService*.asmx. [Session:  User: <account>]       
<date><time>   w3wp.exe (0x2D30)        0x1958      Excel Services Application            Web Front End            accf        Medium     
ServerSession.ProcessWebException: A Web exception during ExecuteWebMethod has occurred for server: http://<servername>/e1413656e1ac4e948a91e26d5913011c/ExcelService*.asmx, method:
GetHealthScore, ex: System.Net.WebException: The remote server returned an error: (503) Server Unavailable.    
 at System.Net.HttpWebRequest.GetResponse()    
 at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout), response: 'System.Net.HttpWebResponse', status ProtocolError, user name: <account>.           
<date><time>   w3wp.exe (0x2D30)        0x1958      Excel Services Application            Web Front End            acco        Critical   
There was an error in communicating with Excel Calculation Services http://<servername>/e1413656e1ac4e948a91e26d5913011c/ExcelService*.asmx exception: The remote server returned an error: (503) Server Unavailable. [Session:  User: <account>].
# In Event Viewer:
Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x5215df96
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0x80131623
Fault offset: 0x00007ffada0caf23
Faulting process id: 0x11e8
Faulting application start time: 0x01d03a1b81cbbc8c
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: unknown
Report Id: d0141935-a60e-11e4-80d1-00155d3a280a
Faulting package full name:
Faulting package-relative application ID:
...
An internal error occurred.
   at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
   at Microsoft.Win32.Registry.GetValue(String keyName, String valueName, Object defaultValue)
   at Microsoft.Office.Excel.Server.MossHost.MossHost.get_HostBinaryPath()
   at Microsoft.Office.Excel.Server.CalculationServer.ExcelServerApp.Initialize()
   at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
...
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message:
Stack:
   at System.Environment.FailFast(System.String)
   at Microsoft.Office.Excel.Server.HelperMethods.HandleShutdown(System.Exception, Boolean)
   at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean, TryBlock, FilterBlock, CatchBlock, FinallyBlock)
   at Microsoft.Office.Web.Common.ExceptionReporting.ReportOnExceptionTag(UInt32, Category, System.String, Boolean, Microsoft.Office.Web.Common.TryBlock, Microsoft.Office.Web.Common.CatchBlock, Microsoft.Office.Web.Common.FinallyBlock)
   at Microsoft.Office.Excel.Server.CalculationServer.ExcelServerApp..ctor()
   at Microsoft.Office.Excel.Server.CalculationServer.ExcelServerApp..cctor()
   at Microsoft.Office.Excel.Server.CalculationServer.ExcelServiceBase.SafeSetContext()
   at Microsoft.Office.Excel.Server.CalculationServer.ExcelServiceBase.BeginProcessOperation(Microsoft.Office.Excel.Server.CalculationServer.CommandParameter, Microsoft.Office.Excel.Server.WebMethodBehaviorAttribute, Microsoft.Office.Excel.Server.WebMethodType, System.AsyncCallback, System.Object, Microsoft.Office.Excel.Server.CalculationServer.Operations.UserOperation)
   at Microsoft.Office.Excel.Server.CalculationServer.ExcelServiceBase.BeginProcessOperation(Microsoft.Office.Excel.Server.CalculationServer.CommandParameter, Microsoft.Office.Excel.Server.WebMethodType, System.AsyncCallback, System.Object, Microsoft.Office.Excel.Server.CalculationServer.Operations.UserOperation)
   at Microsoft.Office.Excel.Server.CalculationServer.ExcelServiceSoap.BeginGetHealthScore(System.AsyncCallback, System.Object)

...

:: Adding back the READ permission on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0 (in this case for the WSS_WPG group) allows the *.xlsx to open again.
So if you come across the issue/errors shown above then make sure that the process account have the correct permissions in the registry.

Friday, August 14, 2015

SharePoint 2013 Insufficient SQL database permissions for user 'Name: NT AUTHORITY\IUSR SID -The EXECUTE permission was denied on the object

SharePoint 2013 -  Insufficient SQL database permissions for user 'Name: NT AUTHORITY\IUSR SID -The EXECUTE permission was denied on the object

This error basically deals with any SP database. There’s in sufficient access to the account.



“Insufficient SQL database permissions for user 'Name: NT AUTHORITY\IUSR SID: S-1-5-17 ImpersonationLevel: Impersonation' in database 'SharePoint_Admin_Content' on SQL Server instance 'Database Instance'.
Additional error information from SQL Server is included below.
The EXECUTE permission was denied on the object 'proc_SecAddAppPrincipal', database 'SharePoint_Admin_Content', schema 'dbo'.”


Cause:
====
Actually “NT Authority\IUSR” refer to application pool identity of SharePoint web app. So whenever user clicks on app related links, it tries to access central admin db(stored procedure) by impersonating privileges using app pool ccount.
 


Solution:
 =====

Check if 'WSS_Content_Application_Pools’ database role have “execute” permission and then grant access on SharePoint central Admin Content Database and specifically on stored procedure "proc_SecAddAppPrincipal", so that any authenticated user can access that object.