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

docker-compose up -d doesn't work #46

Open
Antonytm opened this issue Jan 18, 2022 · 3 comments
Open

docker-compose up -d doesn't work #46

Antonytm opened this issue Jan 18, 2022 · 3 comments

Comments

@Antonytm
Copy link

Steps to reproduce:

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

Expected result: containers up and running
Actual result:

Creating docker-examples_solr_1  ... done
Creating docker-examples_mssql_1 ... done
Creating docker-examples_mssql-init_1 ... done
Creating docker-examples_solr-init_1  ... done
Creating docker-examples_xconnect_1   ... done
Creating docker-examples_id_1         ... done
Creating docker-examples_cm_1         ... done
Creating docker-examples_hrz_1        ... done

ERROR: for traefik  Container "a544e3fe3ff7" is unhealthy.

ERROR: for xdbsearchworker  Container "6b2cc5dcc865" is unhealthy.

ERROR: for cortexprocessingworker  Container "6b2cc5dcc865" is unhealthy.

ERROR: for xdbautomationworker  Container "6b2cc5dcc865" is unhealthy.
ERROR: Encountered errors while bringing up the project.

I ignore traefik as it will be unhealthy if at least one container is unhealthy

Investigations:

  1. run docker logs 6b2cc5dcc865 (xdbsearchworker)

Error present in logs:

2022-01-18 10:30:59.886 +02:00 [Error] Health check "XConnect SolrCloud cluster live collection health check" completed after 26.9359ms with status Unhealthy and '"SolrCloud Cluster health check failed."
2022-01-18 10:32:00.534 +02:00 [Error] Health check "XConnect SolrCloud cluster live collection health check" completed after 1.8999ms with status Unhealthy and '"SolrCloud Cluster health check failed."'
@Antonytm
Copy link
Author

Antonytm commented Jan 20, 2022

It looks like there is an issue with solr-init image configuration on master branch.
Folder custom-images\docker\data\solr is not populated with Solr cores. However, I expect that it should be populated.
I expect that there should be present Solr cores configurations, e.g.: sitecore_marketingdefinitions_master_shard1_replica_n1, sitecore_marketingdefinitions_web_shard1_replica_n1, sitecore_web_index_shard1_replica_n1, etc.

I have switched to v10.1.0.1 tag and everything works there. Solr cores folder is populated. Containers start with no errors. Sitecore is up and running.

@Antonytm
Copy link
Author

solr-init container log:

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

@Antonytm
Copy link
Author

Antonytm commented Jan 20, 2022

I dug into Strart.ps1>Download-SolrConfig.ps1

There is an function Download-FileItem

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

It downloads files from ZooKeeper response:
The problem is that the ZooKeeper response from 8.4.0 to 8.8.2 was changed!
http://localhost:8984/solr/admin/zookeeper?detail=true&path=/configs/_default&jwt=json

image

It means that for solr-init images for 10.2.0-ltsc2019 for XP and XM Download-FileItem function should be changed to:

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)
}

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

1 participant