Mostrando entradas con la etiqueta User Profile Syncronization. Mostrar todas las entradas
Mostrando entradas con la etiqueta User Profile Syncronization. Mostrar todas las entradas

martes, 6 de enero de 2015

Sharepoint 2013 - User Profile Synchronization Status queda en un estado “Stopping” o “Syncronizing”

Si “Profile Syncronization Status” queda en un estado “Stopping” o “Syncronizing” por más de 1 hora, revisa si el servicio de “Forefront Identity Manager Service” está detenido

image

image

Este servicio es el que gestiona las sincronizaciones.

domingo, 22 de junio de 2014

Error con contadores en Sharepoint 2013–Troubleshooting

En el Event Viewer aparecerían los siguientes errores relacionados a contadores:

The Open Procedure for service "BITS" in DLL "C:\Windows\System32\bitsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

Windows cannot load the extensible counter DLL CcmFramework. The first four bytes (DWORD) of the Data section contains the Windows error code.

The Open Procedure for service "WmiApRpl" in DLL "C:\Windows\system32\wbem\wmiaprpl.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "FIMSynchronizationService" in DLL "D:\Appls\Microsoft\Sharepoint\15.0\Synchronization Service\Bin\mmsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

Para solucionarlo puedes revisar lo siguiente:

  • Revisar servicios de Windows, revisar si están iniciados

WMI Performance Adapter

Windows Management Instrumentation

Remote Registry

  • Verificar permisos sobre las siguientes claves de registro. Revisar si tiene permisos los grupos WSS_WPG/Performance Log Users y Local Services

KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BITS\Performance

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WmiApRpl\Performance

Puedes usar el siguiente script para dar permisos:

$regKeys = @("HKLM:\SYSTEM\CurrentControlSet\Services\BITS\Performance","HKLM:\SYSTEM\CurrentControlSet\Services\WmiApRpl\Performance")
$regAccount = "$env:COMPUTERNAME\WSS_WPG"
$regPermission = "FullControl"
$regPermToggle = "Allow"
foreach ($regKey in $regKeys){
    $acl = Get-Acl $regKey
    $rule = New-Object System.Security.AccessControl.RegistryAccessRule ($regAccount,$regPermission,"ContainerInherit","None",$regPermToggle)
    $acl.SetAccessRule($rule)
    $acl | Set-Acl -Path $regKey
    }

También puedes usar Process Monitor para evaluar access denied

Revisar si los grupos también tenien permisos sobre los folders donde están las definiciones de los contadores.

  • Si sigues teniendo problemas puedes habilitar de nuevo la dll o contador requerida.

Abre una línea de comando con permisos de administrador, ve (CD path) hasta el path donde está la dll que lanza el error, ej: C:\Windows\System32\ y ejecuta lo siguiente:

lodctr.exe /q:BITS

lodctr.exe /q:FIMSynchronizationService

lodctr.exe /q:WmiApRpl

image

image

image

Si alguno de los contadores está deshabilado ejecutar lo siguiente:

lodctr.exe /e:BITS

lodctr.exe /e:FIMSynchronizationService

lodctr.exe /e:WmiApRpl

También puedes usar el nombre de la DLL para habilitar los contadores

lodctr /e:<DLL name> donde DLL name puede ser por ejemplo bitsperf.dll

  • Si sigues teniendo problemas puedes reinstalar de nuevo el contador.
  • En una línea de comandos (run as a administrator),ejecutar lo siguiente:
    lodctr.exe "D:\Appls\Microsoft\Sharepoint\15.0\Synchronization Service\Bin\mmsperf.ini"
    Verificar el path donde está la librería de contadores (.ini)
    • Para finalizar reinstalamos todos los contadores (cuidado con esto)

    En una línea de comandos (run as a administrator),ejecutar lo siguiente:

    Lodctr /R

    sábado, 14 de junio de 2014

    Problemas con la creación de Sincronización de Perfiles (Populate Containers time-out issue)

    Al crear la conexión de sincronización de perfiles mediante el servicio de User Profile Syncronization, la consulta al AD para buscar los containers de OU´s, se quedaba en estado “Querying” y nunca terminaba.

    image

    Entonces lo que hice fue buscar en los logs (ULS Log Category: User Profiles) de Sharepoint para ver que estaba pasando. Vi el siguiente mensaje:

    image

    EditDSServer.PopulateContainers(): System.Threading.ThreadAbortException: Thread was being aborted.   
    at System.Web.UI.WebControls.TreeView.CollapseAll()   
    at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.EditDSServer._GetContainersAndFillTreeView(LdapConnection ldapConnection, Boolean useOnlyPreferredDomainControllers)   
    at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.EditDSServer.PopulateContainers(Object sender, EventArgs args).

    Getting Error Message for Exception System.Web.HttpException (0x80004005): Request timed out.

    System.Web.HttpException: Request timed out.

    Solución:

    Import-Module -Name ActiveDirectory

    Get-ADObject -Filter { ObjectClass -eq 'organizationalunit' } | Select-Object -Property DistinguishedName

    • Ejecuté lo siguiente a continuación:

    $upaAppProxy = Get-SPServiceApplicationProxy | ? {$_.name -like 'User Profile Service Proxy'}
    $upaAppProxy.LdapConnectionTimeout = 1800 //valor en segundos
    $upaAppProxy.Update()

    $upaApp = Get-SPServiceApplication | ? {$_.name -like ‘User Profile Service’}
    $upaApp.FIMWebClientTimeOut = 1800000  //valor en milisegundos
    upaApp.ImportConnAsyncTimeout
    $upaApp.Update()

    • Aumenté el tamaño de connection timeout de los sites de Central Administration y Sharepoint Web Services.

    image

    • Aumenté el tamaño de la propiedad httpRuntime en el web.config del site del Central Administration

    <httpRuntime maxRequestLength="204800" executionTimeout="999999" />

    • Para finalizar también aumenté la propiedad httpRuntime en el web.config de la siguiente ubicación: %DRIVE%\Program Files\Common Files\Microsoft Shared\Web server extensions\15\TEMPLATE\LAYOUTS

    Realizando estos cambios, pude hacer que se muestre las OU´s de nuestro AD, para seleccionar que querer importar.

    sábado, 19 de abril de 2014

    Permiso: Replicate Directory Changes

    Cuando realizamos una sincronización de perfiles de usuario del AD a Sharepoint, la cuenta de usuario que realiza la importación debe tener el permiso Replicate Directory Changes sobre el dominio sobre el cual queremos realizar la sincronización.

    NetBiosDomainNamesEnabled

    Para hacerlo podemos seguir el siguiente artículo:http://technet.microsoft.com/en-us/library/hh296982(v=office.15).aspx#RDCdomain

    Este permiso permite que una cuenta consulte por cambios en el directorio.

    Hay un caso especial donde se requerirá un permiso especial para poder importar correctamente la información. Veamos los dos casos posibles:

    1. El nombre NETBIOS de cualquier dominio con el que está realizando la sincronización es IGUAL a su nombre de dominio completo (FQDN)
    2. El el nombre NETBIOS de cualquier dominio con el que está realizando la sincronización es DIFERENTE de su nombre de dominio completo (FQDN)

    Cómo podemos saber el NETBIOS de nuestro dominio? Una posibilidad es usar “Active Directory Users and Computers”, click derecho sobre el dominio y “Properties”.

    También podems averiguarlo mediante nbtstat –n

    Para el caso 1, necesitaremos el permiso Replicate Directory Changes sobre el dominio sobre el cual queremos realizar la sincronización.

    Para el caso 2, necesitaremos un permiso especial más, además del seteado en el caso 1.

    Por ej: suponemos que nuestro dominio sea

    Domain netbios name: CONTOSO

    FQDN of Domain: contoso.corp.com

    El permisos que necesitaremos es el de Replicate Directory Changes sobre el container (CN) de configuration de nuestro dominio.(Procedimiento)

    CN=Configuration, DC=corp,DC=com

    clip_image007

    En el segundo caso también deberemos setear la propiedad NetBiosDomainNamesEnabled en el User Profile de nuestra granja.

    Ej:

    • Get-SPServiceApplication
      • Obtendremos el GUID del User Profile Service Application
    • $var = Get-SPServiceApplication –Identity GUID
      • El GUID es el obtenido del paso anterior Get-SPServiceApplication
    • $var.NetBiosDomainNamesEnabled = 1
      • En vez de 1 también podremos usar “True”
    • $var.update()
    • $var.NetBiosDomainNamesEnabled
      • Verifico si quedo correctamente seteado
    • Realizar un IISreset

    lunes, 4 de noviembre de 2013

    User Profile Synchronization Service – Starting

    Siempre aparece un nuevo error cuando configuramos el User Profile Syncronization. Cada implementación del user profile syncronization difiere de las anteriores.

    image

    Las mejores guías para solucionar el inicio del servicio de User Profile Syncronization:

    http://www.harbar.net/articles/sp2010ups2.aspx

    http://blogs.msdn.com/b/spses/archive/2012/12/17/proxy-configuration-issues-with-upa-in-sharepoint-2010-2013.aspx

    http://chrishattonnzlsp.wordpress.com/2010/11/30/hostid-is-not-registered-forefront-identity-manager/

    http://blogs.technet.com/b/steve_chen/archive/2010/09/20/user-profile-sync-sharepoint-2010.aspx

    http://blogs.technet.com/b/meamcs/archive/2013/02/18/sharepoint-2010-2013-user-profile-synchronization.aspx

    En este caso en particular, en el event viewer me aparecía el siguiente error:

    .Net SqlClient Data Provider: System.Data.SqlClient.SqlException: HostId is not registered
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader()
    at Microsoft.ResourceManagement.Data.DataAccess.RetrieveWorkflowDataForHostActivator(Int16 hostId, Int16 pingIntervalSecs, Int32 activeHostedWorkflowDefinitionsSequenceNumber, Int16 workflowControlMessagesMaxPerMinute, Int16 requestRecoveryMaxPerMinute, Int16 requestCleanupMaxPerMinute, Boolean runRequestRecoveryScan, Boolean& doPolicyApplicationDispatch, ReadOnlyCollection`1& activeHostedWorkflowDefinitions, ReadOnlyCollection`1& workflowControlMessages, List`1& requestsToRedispatch)
    Y en los logs de ULS de Sharepoint:
    Medium ILM Configuration: Post setup configuration. 
    High ILM Configuration: Post setup configuration failed with error code –532459699
    Para solucionarlo tuve que habilitar las opciones de “Auto Create Statistics” y “Auto Update Statistics” en la base de Sync. Después de habilitar estas opciones, reinicie el servicio de windows.
    image
    image
    image
    Para finalizar hice un iisreset, y el servicio cambio el estado a Started.
    image
     

    viernes, 6 de abril de 2012

    Link útiles #15–Sharepoint

    1-Características Sharepoint 2013

    http://www.learningsharepoint.com/2012/03/31/sharepoint-2013-features-and-resources/

    2- User profile synchronization service no se inicia

    http://melick-rajee.blogspot.com.ar/2012/04/user-profile-synchronization-service.html

    3-Despertar (warm up) los app pool de Sharepoint

    http://sharepointgeorge.com/2010/warm-sharepoint-web-applications-windows-2008-r2-iis-75-application-warmup-module/

    http://abdulrafaysbiztalk.wordpress.com/tag/iis-warm-up-module/

    http://blogs.iis.net/steveschofield/archive/2012/04/03/app-warm-up-module-released-for-windows-server-2008-r2.aspx

    4-Virtualizando Sharepoint 2010

    http://programming4.us/enterprise/3098.aspx

    5-Configurar la búsqueda para indexar contendio externo, ej: un share

    http://sharepoint.mindsharpblogs.com/Timothy/archive/2012/03/31/Finding-and-Targeting-Content.aspx

    6-Tesauros en Sharepoint 2010

    http://blogs.msdn.com/b/enterprisesearch/archive/2008/09/23/how-to-customize-the-thesaurus-in-sharepoint-search-and-search-server.aspx

    7-Mostrar el numero de fax en los resultados de búsqueda Sharepoint 2010

    http://sharepointsolutions.com/sharepoint-help/blog/2011/07/how-to-show-the-fax-number-in-people-search-results-in-sharepoint-2010/

    8-Indexando contenido case sensitive

    http://blogs.msdn.com/b/enterprisesearch/archive/2010/07/09/crawling-case-sensitive-repositories-using-sharepoint-server-2010.aspx

    9-Agregando controles safecontrols en Sharepoint con Visual Studio 2010

    http://weblogs.asp.net/jan/archive/2010/08/06/easily-adding-safecontrols-in-sharepoint-2010-with-visual-studio-2010.aspx

    10-Algunas tools en codeplex

    http://sharepointserviceman.codeplex.com/

    http://spposter.codeplex.com/

    http://spribbonvisibility.codeplex.com/

    11-Crear una custom health rule

    http://blog.scosby.com/post/2010/04/26/Custom-Health-Rules-in-SharePoint-2010.aspx

    12- Solucionar problema de vista mobile en Sharepoint 2010 para usuarios anónimos.

    http://blog.mastykarz.nl/inconvenient-sharepoint-2010-mobile-redirect/