0

I already have 2 instances running on my machine with Solr version 6.6.2 for POC purpose I am installing Sitecore 9.0.1 instance with Solr version 6.6.3.Solr is installed using the powershell script but while running the sitecore script i am getting the error saying that "Unable to connect to remote server".But the solr is up and running on the web page. enter image description here

Xconnect-solr log file

**********************
PSVersion: 5.1.18362.1171
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.18362.1171
BuildVersion: 10.0.18362.1171
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\Windows\system32\xconnect-solr.210409 (10).log
                                                 ************************************
                                                      Sitecore Install Framework
                                                           Version - 1.2.1
                                                 ************************************


WorkingDirectory  : C:\Windows\system32
LogPath           : C:\Windows\system32\xconnect-solr.210409 (10).log
WhatIf            : False
Verbose           : SilentlyContinue

Debug             : SilentlyContinue
WarningAction     : Continue
ErrorAction       : Stop
InformationAction : Continue




[------------------------------------------------------- StopSolr : ManageService --------------------------------------------------]
[StopSolr]:[Updating] Solr-6.6.3
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to stop...

Status   Name               DisplayName
------   ----               -----------
Stopped  solr-6.6.3         Solr-6.6.3



[----------------------------------------------------- CleanCores : EnsurePath -----------------------------------------------------]
[CleanCores]:[Clean] C:\SOLR633\solr\solr-6.6.3\server\solr\sitecore633_xdb
[CleanCores]:[Clean] C:\SOLR633\solr\solr-6.6.3\server\solr\sitecore633_xdb_rebuild
[CleanCores]:[Create] C:\SOLR633\solr\solr-6.6.3\server\solr\sitecore633_xdb
[CleanCores]:[Create] C:\SOLR633\solr\solr-6.6.3\server\solr\sitecore633_xdb_rebuild

[----------------------------------------------- PrepareCores [1] : Copy -----------------------------------------------------------]
[PrepareCores [1]]:[Copying] C:\SOLR633\solr\solr-6.6.3\server\solr\configsets\basic_configs\* => C:\SOLR633\solr\solr-6.6.3\server\solr\sitecore633_xdb

[----------------------------------------------- PrepareCores [2] : Copy -----------------------------------------------------------]
[PrepareCores [2]]:[Copying] C:\SOLR633\solr\solr-6.6.3\server\solr\configsets\basic_configs\* => C:\SOLR633\solr\solr-6.6.3\server\solr\sitecore633_xdb_rebuild

[------------------------------------------------------ StartSolr : ManageService --------------------------------------------------]
[StartSolr]:[Updating] Solr-6.6.3
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...
WARNING: Waiting for service 'Solr-6.6.3 (solr-6.6.3)' to start...

Status   Name               DisplayName
------   ----               -----------
Running  solr-6.6.3         Solr-6.6.3



[------------------------------------------------ CreateCores [1] : ManageSolrCore -------------------------------------------------]
[CreateCores [1]]:[Requesting] https://solr:8986/solr
**********************
Command start time: 20210409132955
**********************
PS>TerminatingError(Invoke-WebRequest): "Unable to connect to the remote server"
WARNING: [1/5] Request Failed: Unable to connect to the remote server
[CreateCores [1]]:[Requesting] https://solr:8986/solr
**********************
Command start time: 20210409132959
**********************
PS>TerminatingError(Invoke-WebRequest): "Unable to connect to the remote server"
WARNING: [2/5] Request Failed: Unable to connect to the remote server
[CreateCores [1]]:[Requesting] https://solr:8986/solr
**********************
Command start time: 20210409133003
**********************
PS>TerminatingError(Invoke-WebRequest): "Unable to connect to the remote server"
WARNING: [3/5] Request Failed: Unable to connect to the remote server
[CreateCores [1]]:[Requesting] https://solr:8986/solr
**********************
Command start time: 20210409133008
**********************
PS>TerminatingError(Invoke-WebRequest): "Unable to connect to the remote server"
WARNING: [4/5] Request Failed: Unable to connect to the remote server
[CreateCores [1]]:[Requesting] https://solr:8986/solr
**********************
Command start time: 20210409133012
**********************
PS>TerminatingError(Invoke-WebRequest): "Unable to connect to the remote server"
WARNING: [5/5] Request Failed: Unable to connect to the remote server
**********************
Command start time: 20210409133012
**********************
PS>TerminatingError(): "Could not complete request for https://solr:8986/solr - Unable to connect to the remote server"
>> TerminatingError(Invoke-ManageSolrCoreTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Could not complete request for https://solr:8986/solr - Unable to connect to the remote server"
>> TerminatingError(Invoke-ManageSolrCoreTask): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Could not complete request for https://solr:8986/solr - Unable to connect to the remote server"
Install-SitecoreConfiguration : Could not complete request for https://solr:8986/solr - Unable to connect to the remote 
server
At D:\backup\Install-Sitecore901.ps1:31 char:1
+ Install-SitecoreConfiguration @solrParams
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
Install-SitecoreConfiguration : Could not complete request for https://solr:8986/solr - Unable to connect to the remote server
At D:\backup\Install-Sitecore901.ps1:31 char:1
+ Install-SitecoreConfiguration @solrParams
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:01:50
**********************
Windows PowerShell transcript end
End time: 20210409133049
**********************

The script i am following

#define parameters
$prefix = "sitecore633"
$PSScriptRoot = “C:\Users\abc\Sitecore9.0.1\Resources663” 
$XConnectCollectionService = "$prefix.xconnect"
$sitecoreSiteName = "$prefix.local"
$SolrUrl = "https://solr:8986/solr"
$SolrRoot = "C:\SOLR633\solr\solr-6.6.3"
$SolrService = "Solr-6.6.3"
$SqlServer = "abc"
$SqlAdminUser = "rtytt"
$SqlAdminPassword = "abc"

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

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

# deploy xconnect instance 
$xconnectParams = 
@{
    Path = "$PSScriptRoot\xconnect-xp0.json"
    Package = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (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

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

# install sitecore instance 
$xconnectHostName = "$prefix.xconnect"
$sitecoreParams = 
@{
    Path = "$PSScriptRoot\sitecore-XP0.json"
    Package = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (OnPrem)_single.scwdp.zip"
    LicenseFile = "$PSScriptRoot\license.xml"
    SqlDbPrefix = $prefix 
    SqlServer = $SqlServer 
    SqlAdminUser = $SqlAdminUser 
    SqlAdminPassword = $SqlAdminPassword 
    SolrCorePrefix = $prefix
    SolrUrl = $SolrUrl 
    XConnectCert = $certParams.CertificateName 
    Sitename = $sitecoreSiteName 
    XConnectCollectionService = "https://$XConnectCollectionService"
}

Install-SitecoreConfiguration @sitecoreParams

I am using the existing SIF which I have used for other 2 instances.

Please suggest what am I doing wrong.

Thank you

7
  • The Solr 6.6.2 instance is running on which port? Commented Apr 9, 2021 at 9:34
  • one instance on 8983 and another one on 8985.@PeterProchazka
    – Vinaya
    Commented Apr 9, 2021 at 10:00
  • Can antivirus block this? blog.martinmiles.net/post/… Commented Apr 9, 2021 at 10:27
  • Also based on your screenshot, I would recommend not running ps1 installation scripts from C:\Windows\System32 .... Commented Apr 9, 2021 at 10:28
  • Installation scripts are in D drive only the resources are in C drive @PeterProchazka
    – Vinaya
    Commented Apr 9, 2021 at 10:32

1 Answer 1

0

Looks like your Solr instance start up time is a bit higher than usual.

You should increase PostDelay settings.

Inside of installation package, search for sitecore-solr.json and modify PostDelay setting to 30 seconds:

"StartSolr": {
"Description" : "Starts the Solr service.",
            "Type": "ManageService",
            "Params":{
                "Name": "[parameter('SolrService')]",
                "Status": "Running",
                "PostDelay": 30000
            }
        },
1
  • No it is still failing @Peter Prochazka
    – Vinaya
    Commented Apr 9, 2021 at 10:25

Your Answer

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

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