Showing posts with label Troubleshoot. Show all posts
Showing posts with label Troubleshoot. Show all posts

Tuesday, February 2, 2016

SharePoint 2013 Usage service trouble shooting

Recently my farm encountered an issue with the Usage statistics not showing up in my reports but the data was still getting captured in the database.  


first thing to check are some status for your service application


$app = Get-SPServiceApplication -Identity '{Your usage service app guid}'


the get the usageapplication for some properties and status:


$ua = Get-SPUsageApplication -Identity $app


$ua.Status




if everything looks good, then make sure your usage definitions have Receivers:


$aud = Get-SPUsageDefinition | where {$_.Name -like "Analytics*"}


$aud | fl


$prud = Get-SPUsageDefinition | where {$_.Name -like "Page Requests"}


$prud | fl




Look at your results to make sure you have the following
-------------
EnableReceivers : True

Receivers : {Microsoft.Office.Server.Search.Analytics.Internal.AnalyticsCustomRequestUsageReceiver}





EnableReceivers : True

Receivers : {Microsoft.Office.Server.Search.Analytics.Internal.ViewRequestUsageReceiver}






finally if that's all good then unprovision your usage app and then go provision using Central admin:


first to unprovision:


$app = Get-SPServiceApplication -Identity '{Your usage service app guid}'
$app.Unprovision()


then in Central Admin, Monitoring, Configure usage and health data collection
-enable
-check items you want collected
-database name
-windows auth
-Ok


-----------------------------------------------------------------------------------------------------------------
Some very helpful links:


http://blogs.msdn.com/b/sharepoint_strategery/archive/2015/04/15/sp2013-search-index-health-reports-for-monitoring-and-troubleshooting.aspx




https://gallery.technet.microsoft.com/scriptcenter/Builds-SP-Search-2013-10d72a25


https://gallery.technet.microsoft.com/scriptcenter/Get-SPSearchTopologyState-b7452c6a



Thursday, December 18, 2014

Troubleshoot Workflow in SharePoint 2013

Get logs from Service Bus:


Run Powershell:  Get-SBClientConfiguration
Get the Connection string.
Please download Service Bus Explorer from the below link-




 


you will find the Service Bus Explorer.exe tool in Service Bus Explorer\C#\bin\Debug\ folder


  1. Please run the tool as admin- > File- > connect- >Select “Enter connection String ” from the dropdown (“Service Bus Namespace”).
  2. Paste the connection string from the powershell Get-SBClientConfiguration
  3. Click on “OK”
------------------------------------------------------------------


Get logs from workflow:


-copy the command below (between the dashed lines) to a file and save as logcapture.cmd
-open command prompt and go to the folder of where you saved logcapture.cmd
-type:  logcapture start
-let it finish
-run the test/workflows, etc
-type:  logcapture stop
-your logs will be in the Logs folder
---------------------


@echo off


if not exist .\Logs (


mkdir .\Logs


)


if /i "%1"=="stop" (


goto :Stop


)


if /i "%1"=="start" (


goto :StartClean


)


exit /b 0


:Stop


ECHO Please wait...


WMIC /OUTPUT:.\logs\ProcessListE.txt PROCESS get Caption,Commandline,Processid


logman stop ServiceBusClientTracing -ets > NUL:


logman stop ServiceBusTracing -ets > NUL:


logman stop WorkflowTracing -ets > NUL:


logman stop WindowsFabric -ets > NUL:


logman stop WindowsFabricLease -ets > NUL:


wevtutil epl Application .\logs\application.evtx


wevtutil epl System .\logs\system.evtx


wevtutil epl Security .\logs\security.evtx


IF NOT EXIST "C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS\NUL" GOTO END


FOR /F %%i IN ('dir /b /a-d-h /o-d "C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS" ') DO (


SET a=%%i


goto :COPY


)


:COPY


SET b="C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS\"


SET file=%b%%a%


Copy %file% .\Logs\ > nul 2>&1


:END


ECHO The command completed successfully.


exit /b 0


:StartClean


ECHO Please wait...


del /F /S /Q .\Logs\*.* > NUL:


logman stop ServiceBusClientTracing -ets > NUL:


logman stop ServiceBusETWTracing -ets > NUL:


logman stop WorkflowETWTracing -ets > NUL:


logman stop WindowsFabric -ets > NUL:


logman stop WindowsFabricLease -ets > NUL:


REM cscript //nologo productlist.vbs > .\logs\productlist.txt


wmic /OUTPUT:.\logs\productlist.txt product get Description,Version,InstallDate


wmic /OUTPUT:.\logs\hotfixlist.txt qfe get HotFixID,Description,InstalledOn


WMIC /OUTPUT:.\logs\ProcessListS.txt PROCESS get Caption,Commandline,Processid


REM logman start ServiceBusClientTracing -p "Microsoft-ServiceBus-Client" 0xFF0000000000 0x4 -nb 256 1024 -bs 512 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusClientTrace.etl


logman start ServiceBusClientTracing -p {a307c7a2-a4cd-4d22-8093-94db72934152} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusClientTrace.etl


 


REM logman start ServiceBusTracing -p "Microsoft-ServiceBus" 0xFF0000000000 0x4 -nb 256 1024 -bs 512 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusTrace.etl


logman start ServiceBusTracing -p {3d05219e-3959-41c4-a2a7-ea6ca5b5c257} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\ServiceBusTrace.etl


logman start WorkflowTracing -p {B2885F6E-231C-43FF-BBEA-7516148FF6FE} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\WorkflowTrace.etl


logman start WindowsFabric -p {CBD93BC2-71E5-4566-B3A7-595D8EECA6E8} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\WindowsFabric.etl


logman start WindowsFabricLease -p {3F68B79E-A1CF-4B10-8CFD-3DFE322F07CB} -bs 64 -nb 120 320 -ets -ct perf -f bincirc -max 1000 -o .\Logs\WindowsFabricLease.etl


 


exit /b 0
------------------------------------------------------