1

We have upgraded our Sitecore solution from 8.2.4 to 9.0.2 using the guidelines from the Upgrade Guide. Now we are in progress with preparing the xDB data migration.

Using the following script to install the xConnect with SIF

Import-Module SitecoreFundamentals
Import-Module SitecoreInstallationFramework

#$global:ProgressPreference = 'silentlyContinue'

#define parameters 
$prefix = "sc90" 
$PSScriptRoot = "C:\xconnect-install"
$XConnectCollectionService = "$prefix.xconnect" 
$sitecoreSiteName = "$prefix" 
$InstallDirectory = "C:\inetpub\wwwroot\"
$SolrUrl = "https://localhost:8983/solr" 
$SolrRoot = "C:\solr\solr-6.6.2\" 
$SolrService = "solr-6.6.2" 
$SqlServer = "UXD8SITECOREDB" 
$SqlAdminUser = "sa" 
$SqlAdminPassword="MyPassword!23" 

#install client certificate for xconnect 
$certParams = @{     
    Path = "$PSScriptRoot\xconnect-createcert.json"     
    CertificateName = "$prefix.xconnect_client" 
    } 

Install-SitecoreConfiguration @certParams -Verbose 

#deploy xconnect instance 
$xconnectParams = @{     
    Path = "$PSScriptRoot\xconnect-xp0.json"     
    Package = "$PSScriptRoot\Sitecore 9.0.2 rev. 180604 (OnPrem)_xp0xconnect.scwdp.zip"     
    LicenseFile = "$PSScriptRoot\license.xml"     
    Sitename = $XConnectCollectionService     
    InstallDirectory = $InstallDirectory
    XConnectCert = $certParams.CertificateName     
    SqlDbPrefix = "$prefix"
    SqlServer = $SqlServer  
    SqlAdminUser = $SqlAdminUser     
    SqlAdminPassword = $SqlAdminPassword     
    SolrCorePrefix = $prefix     
    SolrURL = $SolrUrl      
    } 

Install-SitecoreConfiguration @xconnectParams -Verbose 

we ran into

Problem accessing /solr/sc90_xdb/schema. Reason Not Found

with the error stack trace

PS>TerminatingError(Invoke-ManageSolrSchemaTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: NotFound - https://localhost:8983/solr/sc90_xdb/schema?wt=json"

TerminatingError(Invoke-ManageSolrSchemaTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: NotFound - https://localhost:8983/solr/sc90_xdb/schema?wt=json" Install-SitecoreConfiguration : NotFound - https://localhost:8983/solr/sc90_xdb/schema?wt=json At C:\xconnect-install\xconnect-install.ps1:43 char:1 + Install-SitecoreConfiguration @xconnectParams -Verbose + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration Install-SitecoreConfiguration : NotFound - https://localhost:8983/solr/sc90_xdb/schema?wt=json At C:\xconnect-install\xconnect-install.ps1:43 char:1 + Install-SitecoreConfiguration @xconnectParams -Verbose + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : >Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

Could anyone give me a hint how to get past this issue?

8
  • I ran into similar issues during an upgrade from 8.2 to 9.1. Have you verified that $SolrUrl, $SolrRoot, and $SolrService are correct? For example, my solr installation is from Bitnami so the $SolrRoot value will be different.
    – Mikeyp
    Jan 23, 2019 at 14:09
  • They are correct, the $SolrUrl is secure and I have also updated the SolrRoot DefaultValue in the xconnect-solr.json file to match the $SolrRoot variable Jan 23, 2019 at 14:52
  • Do your xdb and xdb_rebuild cores have a schema set (either directly or a reference to a shared schema)? Both of these cores use the OOTB managed schema that comes with Solr.
    – jrap
    Jan 23, 2019 at 15:18
  • No, I did not create any of the cores mentioned. I was under the impression the script will create all that is needed with xConnect Jan 23, 2019 at 15:57
  • Yes, the script should create the cores. Have you verified if those cores exist?
    – Mikeyp
    Jan 23, 2019 at 16:13

2 Answers 2

0

Your issue is that you are using the script from Sitecore. It has a flaw that is uses two parameter sets that both use the $solrParams. So as the script loads it sets $solrParams as the xconnect-solr.json install. But then it immediately resets it again as the sitecore-solr.json install. So when you install xConnect SOLR you are actually running the parameter set of the Sitecore solr install. Your failure is that it expects to find the xDB SOLR that should have been there during the xConnect install.

Notice below the double solrParams.

Bad script with double solrParams

$solrParams = @{
 Path = "$PSScriptRoot\xconnect-solr.json"
 SolrUrl = $SolrUrl
 SolrRoot = $SolrRoot
 SolrService = $SolrService
 CorePrefix = $prefix
}
Install-SitecoreConfiguration @solrParams


$xconnectParams = @{
 Path = "$PSScriptRoot\xconnect-xp0.json"
 Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002
(OnPrem)_xp0xconnect.scwdp.zip"
 LicenseFile = "$PSScriptRoot\license.xml"
 Sitename = $XConnectCollectionService
 XConnectCert = $certParams.CertificateName
 SqlDbPrefix = $prefix
SqlServer = $SqlServer
SqlAdminUser = $SqlAdminUser
 SqlAdminPassword = $SqlAdminPassword
 SolrCorePrefix = $prefix
 SolrURL = $SolrUrl

}
Install-SitecoreConfiguration @xconnectParams


$solrParams = @{
 Path = "$PSScriptRoot\sitecore-solr.json"
 SolrUrl = $SolrUrl
 SolrRoot = $SolrRoot
 SolrService = $SolrService
 CorePrefix = $prefix
}
Install-SitecoreConfiguration @solrParams

Good script with xConnect SOLR renamed

Below you can see I renamed solrParams to xConnectSolrParams. This will fix your issue.

$xConnectSolrParams = @{
 Path = "$PSScriptRoot\xconnect-solr.json"
 SolrUrl = $SolrUrl
 SolrRoot = $SolrRoot
 SolrService = $SolrService
 CorePrefix = $prefix
}
Install-SitecoreConfiguration @xConnectSolrParams


$xconnectParams = @{
 Path = "$PSScriptRoot\xconnect-xp0.json"
 Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002
(OnPrem)_xp0xconnect.scwdp.zip"
 LicenseFile = "$PSScriptRoot\license.xml"
 Sitename = $XConnectCollectionService
 XConnectCert = $certParams.CertificateName
 SqlDbPrefix = $prefix
SqlServer = $SqlServer
SqlAdminUser = $SqlAdminUser
 SqlAdminPassword = $SqlAdminPassword
 SolrCorePrefix = $prefix
 SolrURL = $SolrUrl

}
Install-SitecoreConfiguration @xconnectParams


$solrParams = @{
 Path = "$PSScriptRoot\sitecore-solr.json"
 SolrUrl = $SolrUrl
 SolrRoot = $SolrRoot
 SolrService = $SolrService
 CorePrefix = $prefix
}
Install-SitecoreConfiguration @solrParams

Final note

Take a look at Thomas Eldblom's scripts for installing Sitecore. Really cleans up the script a bunch.

https://github.com/Eldblom/sifdemos

0

I'd advice you to double check the values you have on the above config and the one on the xconnect-solr.json.

Sometimes (and it happened to me) the URL looks like the same but they are not. Instead of localhost I had solr as the hostname. Those config files can be a little bit confusing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.