Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solr-init Image Should Be Updated for Usage with Solr 8.8.2 #746

Open
3 tasks done
Antonytm opened this issue Jan 20, 2022 · 1 comment
Open
3 tasks done

solr-init Image Should Be Updated for Usage with Solr 8.8.2 #746

Antonytm opened this issue Jan 20, 2022 · 1 comment

Comments

@Antonytm
Copy link

solr-init container doesn't initialize Solr cores

  • I have tried with the latest version of Docker for Windows (Stable or Edge) or Docker Enterprise.
  • Windows version is at least 1809 / ltsc2019.
  • Windows has the latest updates installed.

Expected behavior

sitecore-xp0-solr-init 10.2.0-ltsc2019 (sitecore-xm1-solr-init as well) should initialize Solr cores.

Actual behavior

sitecore-xp0-solr-init 10.2.0-ltsc2019 doesn't initialize Solr cores.
And throw exception to logs:

Downloading '_default' SOLR config set

Downloading '' file

C:\Download-SolrConfig.ps1 : Exception calling "WriteAllLines" with "2" 

argument(s): "Value cannot be null.

Parameter name: contents"

At C:\Start.ps1:68 char:1

+ .\Download-SolrConfig.ps1 -SolrEndpoint $SolrEndpoint -OutPath $solrB ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Download-SolrConfig.ps1], Met 

   hodInvocationException

    + FullyQualifiedErrorId : ArgumentNullException,Download-SolrConfig.ps1

Additional information

Tested on
10.2.0-ltsc2019 | 10.0.17763.2452 | ltsc2019 | amd64 | windows | sha256:4428959a3f23e959aa5e99441116816f4644656d3036a54c2c51f36226b4953c | 11/04/2021 08:34:49 | 01/19/2022 15:14:35|

Initially, I opened an issue in https://github.com/Sitecore/docker-examples repository.
Sitecore/docker-examples#46

But after digging, I figured out that Solr ZooKeeper response was changed from 8.4.0 to 8.8.2 version. It causes requests from solr-init to solr container fail because another format of data is expected.

That is why I duplicate an issue here.

Steps to reproduce the behavior

  1. Clone https://github.com/Sitecore/docker-examples
  2. Switch to master branch
  3. Initialize environment .\init.ps1 -LicenseXmlFile c:\license\license.xml
  4. cd custom-images\docker
  5. Run .\clean.ps1 to make sure that there are no artifacts from previous times
  6. cd custom-images
  7. run docker-compose up -d

Suggested fix

Change Download-SolrConfig.ps1 file, update Download-FileItem function:

function Download-FileItem {
    param(
        [string]$SolrEndpoint,
        $FileItem,
        [string]$OutPath
    )
    Write-Host "Downloading '$($FileItem.title)' file"
    $fileContent = (Invoke-RestMethod -Uri "$SolrEndpoint/$($FileItem.attr.href)" -Credential (Get-SolrCredential)).znode.data
    #File content should have "UTF-8 without BOM" encoding
    [System.IO.File]::WriteAllLines("$OutPath\$($FileItem.title)", $fileContent)
}
@andersdreyer
Copy link

@Antonytm Any updates on this? Did you solve it temporarily or just waiting for an official fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants