Friday, May 31, 2013

Vue en mode feuille de données (activeX)

Encore ce problème... :) Recap : si pas accesss sur la machine, downloader le runtime access 2007. (gratuit) Sinon, reparer office qui contient access. Sinon, supprimer la clef. La clef est “HKLM\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{65BCBEE4-7728-41A0-97BE-14E1CAE36AAE}” Que l’on trouve sur http://technet.microsoft.com/fr-fr/library/cc262506(v=office.12).aspx,  STSLIST.DLL Feuille de données de liste Microsoft Office 12 Pour le mécanisme, http://support.microsoft.com/kb/240797 Un correctif de sécurité ou un composant office 2003 désactive explicitement cette version de composant, par contre je ne sais pas lequel.

Friday, March 15, 2013

CONFIGURATION DE LA TOPOLOGIE DE RECHERCHE SHAREPOINT 2013

Les GEDs SharePoint dépassent couramment le million de documents. Dans ce contexte, il faut créer (au moins) deux indexeurs en équilibre de charge, ce qui nous permettra en plus d’offrir de la tolérance de panne. 1. Préambule La source d’info : On retrouve logiquement une grande partie du paramétrage de fast sur http://technet.microsoft.com/fr-fr/library/jj219705.aspx Les prérequis : Pas de tests en prod ! - Deux serveurs SharePoint 2013 sur lesquels on n’a pas encore crée de service de recherche (de toute façons, vous ne voulez pas du wizard pour une install en production ;) o Le service de recherche ne doit pas être démarré sur les autres nœuds. Si oui, il faut faire un STOP service( ?) - Un répertoire local de stockage sur chaque serveur ou (mieux) plusieurs répertoires sur un espace partagé. Ils doivent exister et êtres vides. o Sur ces répertoires, le compte de ferme doit avoir le contrôle. Ceci se fait en accordant une permission au groupe local WSS_ADMIN_WPG qui le contient. o Un bug fait que les répertoires sont testés localement sur le serveur ou on lance le script. Ils doivent donc être tous être crées sur ce nœud si le stockage est local. - Classiquement : o Ouvrir une session avec le compte d’Install de la ferme o Lancer Powershell en mode administrateur Si vous avez créé un service de recherche avec une topologie incorrecte, ou que le script échoue, une chance, dropper un service applicatif prend deux lignes  $spapp = Get-SPServiceApplication -Name "Search Service Application" Remove-SPServiceApplication $spapp -RemoveData A faire avant chaque tentative. Gardez aussi à l’esprit que l’ordonnanceur interne de SharePoint n’est pas en temps réel, il vaut mieux donc attendre 5 mn avant de relancer le script au cas où un job serait encore dans la file du SPTIMER. 2. Les rôles On doit répartir les rôles query, admin, stats et content sur nos deux nœuds. Dans mon exemple, je suivrais la matrice suivante : ROLE SPIDX1 (Principal) SPIDX2 (Backup) CRAWL X X ADMIN X CONTENT X X STATS X QUERY X X 3. Les partitions - Le minimum pour l’équilibrage est deux partitions (0/1) - Le minimum pour la tolérance de panne est de découper en un maitre et un replica pour chaque partition (0/1 répliqué en 1/0) On aura donc quatre composants Index. 4. Le script Partant de cette configuration, on peut commencer à écrire le script : J’ai utilisé la nomenclature du technet. # RAZ! # Supprime le service applicatif et les BDD existantes $spapp = Get-SPServiceApplication -Name "Search Service Application" Remove-SPServiceApplication $spapp -RemoveData #============================================================== #Configuration Search Service Application (SSA) #============================================================== $SearchApplicationPoolName = "SearchAdminApplicationPool" $SearchApplicationPoolAccountName = "SP2013\SP_SEARCH" $SearchServiceApplicationName = "Search Service Application" $SearchServiceApplicationProxyName = "Search Service Application Proxy" $DatabaseInstance = "SQL2012\SPSQL2013" $DatabaseName = "Sharepoint2013_SearchService" #Nom des serveurs d’index $App1 = “SPIDX1” $App2 = "SPIDX2" #Reps Exemples. Attention à mettre deux reps differents en Stockage partagé! $IndexLocationServer1 = "D:\IDX_HostA" $IndexLocationServer2 = "D:\IDX_HostB" # Création des reps (avec le bug local) New-Item -Path "\\SPIDX1\d$\IDX_HOSTA" -type directory -force New-Item -Path "\\SPIDX1\d$\IDX_HOSTB" -type directory -force New-Item -Path "\\SPIDX2\d$\IDX_HOSTB" -type directory -force   #============================================================== # Création du Pool s’il n’existe pas #============================================================== Write-Host -ForegroundColor DarkGray "Test – Pool SSA" $SPServiceApplicationPool = Get-SPServiceApplicationPool -Identity $SearchApplicationPoolName -ErrorAction SilentlyContinue if (!$SPServiceApplicationPool) { Write-Host -ForegroundColor Yellow "Création – Pool SSA" $SPServiceApplicationPool = New-SPServiceApplicationPool -Name $SearchApplicationPoolName -Account $SearchApplicationPoolAccountName -Verbose } #============================================================== #Search Service Application #============================================================== Write-Host -ForegroundColor DarkGray "Test - SSA" $SearchServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity $SearchServiceApplicationName -ErrorAction SilentlyContinue if (!$SearchServiceApplication) { Write-Host -ForegroundColor Yellow "Création - SSA" $SearchServiceApplication = New-SPEnterpriseSearchServiceApplication -Name $SearchServiceApplicationName -ApplicationPool $SPServiceApplicationPool.Name -DatabaseServer $DatabaseInstance -DatabaseName $DatabaseName } Write-Host -ForegroundColor DarkGray "Test - SSA Proxy" $SearchServiceApplicationProxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity $SearchServiceApplicationProxyName -ErrorAction SilentlyContinue if (!$SearchServiceApplicationProxy) { Write-Host -ForegroundColor Yellow "Création - SSA Proxy" New-SPEnterpriseSearchServiceApplicationProxy -Name $SearchServiceApplicationProxyName -SearchApplication $SearchServiceApplicationName } #============================================================== # Démarrer le service – IDX1 #============================================================== $HostA = Get-SPEnterpriseSearchServiceInstance -Identity $App1 Write-Host -ForegroundColor DarkGray "Test – SSI 1" if($HostA.Status -ne "Online") { Write-Host -ForegroundColor Yellow "Démarrage – SSI 1" Start-SPEnterpriseSearchServiceInstance -Identity $HostA While ($HostA.Status -eq "Online") { Start-Sleep -s 5 } Write-Host -ForegroundColor Yellow "SSI 1 Démarré" } #============================================================== # Démarrer le service – IDX2 #============================================================== $HostB = Get-SPEnterpriseSearchServiceInstance -Identity $App2 Write-Host -ForegroundColor DarkGray " Test – SSI 2" if($HostB.Status -ne "Online") { Write-Host -ForegroundColor Yellow " Démarrage– SSI 2" Start-SPEnterpriseSearchServiceInstance -Identity $HostB While ($HostB.Status -eq "Online") { Start-Sleep -s 5 } Write-Host -ForegroundColor Yellow "SSI 2 Démarré" } #============================================================== # Créer une nouvelle topologie vide pour pouvoir la modifier, et la remplir. #============================================================== $InitialSearchTopology = $SearchServiceApplication | Get-SPEnterpriseSearchTopology -Active $NewSearchTopology = $SearchServiceApplication | New-SPEnterpriseSearchTopology #============================================================== # Composants IDX1 : Stats, Index, Crawl, Admin, Query #============================================================== New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostA New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostA New-SPEnterpriseSearchCrawlComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostA New-SPEnterpriseSearchAdminComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostA New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostA #============================================================== # Composants IDX2: Index, Crawl, Query (noeud de backup) #============================================================== New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostB New-SPEnterpriseSearchCrawlComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostB New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostB #============================================================== # Création de deux indexs, deux partitions = 4 replicas # spécifier les répertoires permet d'éviter de le stocker dans "Office Servers..." # A = 0/1 B= 1/0 #============================================================== New-SPEnterpriseSearchIndexComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostA -IndexPartition 0 -RootDirectory $IndexLocationServer1 New-SPEnterpriseSearchIndexComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostB -IndexPartition 1 -RootDirectory $IndexLocationServer2 New-SPEnterpriseSearchIndexComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostA -IndexPartition 1 -RootDirectory $IndexLocationServer1 New-SPEnterpriseSearchIndexComponent -SearchTopology $NewSearchTopology -SearchServiceInstance $HostB -IndexPartition 0 -RootDirectory $IndexLocationServer2 #============================================================== # Enregistrement de la topologie #============================================================== Write-Host -ForegroundColor Yellow "Enregistrement tolologie" Set-SPEnterpriseSearchTopology -Identity $NewSearchTopology #============================================================== # Suppression de l’ancienne #============================================================== Write-Host -ForegroundColor DarkGray "Suppression tolologie.old" Remove-SPEnterpriseSearchTopology -Identity $InitialSearchTopology -Confirm:$false Write-Host -ForegroundColor Yellow "Supprimée" #============================================================== #Check Search Topology #============================================================== Get-SPEnterpriseSearchStatus -SearchApplication $SearchServiceApplication -Text Write-Host -ForegroundColor Yellow "Topologie configurée!" 5. Résultat attendu : On peut aussi tester en ligne de commande par, par exemple, Get-SPEnterpriseSearchStatus –SearchApplication « Serch Service Application" Emmanuel ISSALY Architecte Infrastructure Sharepoint MCNEXT

Thursday, February 28, 2013

Erreurs de certificats - CRL

Bonjour, Si vous constatez un délai persistant à chaque chargement d’une appli (typiquement en lançant stsadm, ça met 30 secondes à répondre) C’est normal en production : chaque dll signée est vérifiée par .NET (en java c’est pareil) sur un site de révocation au cas où elle serait compromise. Si la connexion est coupée, on se prend des timeouts systématiques. Un site .NET peut ainsi mettre plus d’une minute à démarrer (sans parler du stsadm qui se prend les 30 secondes à chaque fois) Solution brutale, mettre « 127.0.0.1 crl.microsoft.com » dans le fichier hosts de la machine (ou un tag dans les web.config). Attention, plus de vérifications du tout alors. Ne pas faire en production avec des composants signés tierce partie. Cela génère également des warnings dans les logs, surtout en SharePoint 2013. Il vaut mieux donc enregistrer au moins les certifs pour les composants SharePoint. (si le certificat d’une dll est présent en local, .NET ne va pas essayer de le checker sur un site) Je préfère cette donc dernière méthode, que l’on exécute comme suit : 1. Obtain the “SharePoint Root Authority” certificate as a physical (.cer) file a. Launch the SharePoint 2010 PowerShell window as Administrator b. $rootCert = (Get-SPCertificateAuthority).RootCertificate c. $rootCert.Export("Cert") | Set-Content C:\SharePointRootAuthority.cer -Encoding byte 2. Import the “SharePoint Root Authority” certificate to the Trusted Root Certification store a. Start | Run | MMC | Enter b. File | Add/Remove Snap-in c. Certificates | Add | Computer account | Next | Local computer | Finish | OK d. Expand Certificates (Local Computer), expand Trusted Root Certification Authorities e. Right-click Certificates > All tasks > Import f. Next | Browse | navigate to and select C:\SharePointRootAuthority.cer | Open | Next | Next | Finish | OK Manip avec copies d’écran : http://www.sharepointblues.com/2012/01/09/sharepoint-certificate-errors/ KB officielle : http://support.microsoft.com/kb/2639348