1

I'm following the JSS walkthrough with container and I'm running into an issue running the up.ps1 script. Most of the script runs fine, but when it goes to start the containers the cm container doesn't start or doesn't attempt to start. This is preventing the traefik and rendering containers from starting and the rest of the script to fail. Running docker-compose ps I can confirm the CM container isnt' running.

Starting Sitecore environment...
time="2021-11-12T12:03:20-06:00" level=warning msg="`scale` is deprecated. Use the `deploy.replicas` element"
time="2021-11-12T12:03:20-06:00" level=warning msg="`scale` is deprecated. Use the `deploy.replicas` element"
[+] Running 13/13
 - Network jsssandbox_default                     Created                                                                0.3s
 - Container jsssandbox-mssql-1                   Started                                                               15.0s
 - Container jsssandbox-solr-1                    Started                                                               15.3s
 - Container jsssandbox-mssql-init-1              Started                                                               58.7s
 - Container jsssandbox-solr-init-1               Started                                                               62.2s
 - Container jsssandbox-id-1                      Started                                                               67.5s
 - Container jsssandbox-xconnect-1                Started                                                               81.5s
 - Container jsssandbox-xdbsearchworker-1         Started                                                              145.6s
 - Container jsssandbox-xdbautomationworker-1     Started                                                              145.5s
 - Container jsssandbox-cortexprocessingworker-1  Started                                                              145.8s
 - Container jsssandbox-cm-1                      Created                                                                0.1s
 - Container jsssandbox-traefik-1                 Created                                                                0.1s
 - Container jsssandbox-rendering-1               Created                                                                0.1s
no containers to start
Waiting for CM to become available...
Invoke-RestMethod : Unable to connect to the remote server
At F:\Projects\jss-sandbox\up.ps1:27 char:19
+ ...   $status = Invoke-RestMethod "http://localhost:8079/api/http/routers ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

PS F:\Projects\jss-sandbox> docker-compose ps
time="2021-11-12T12:09:07-06:00" level=warning msg="`scale` is deprecated. Use the `deploy.replicas` element"
time="2021-11-12T12:09:07-06:00" level=warning msg="`scale` is deprecated. Use the `deploy.replicas` element"
NAME                                  COMMAND                    SERVICE                  STATUS              PORTS
jsssandbox-cm-1                       "powershell C:/tools…"     cm                       created
jsssandbox-cortexprocessingworker-1   "C:\\LogMonitor\\LogMo…"   cortexprocessingworker   running (healthy)
jsssandbox-id-1                       "dotnet.exe .\\Siteco…"    id                       running (healthy)   80/tcp
jsssandbox-mssql-1                    "powershell -Command…"     mssql                    running (healthy)   0.0.0.0:14330->1433/tcp
jsssandbox-mssql-init-1               "powershell -Command…"     mssql-init               running (healthy)
jsssandbox-rendering-1                "cmd /S /C \"npm run …"    rendering                created
jsssandbox-solr-1                     "powershell -Command…"     solr                     running (healthy)   0.0.0.0:8984->8983/tcp
jsssandbox-solr-init-1                "powershell -Command…"     solr-init                exited (0)
jsssandbox-traefik-1                  "/traefik --ping --a…"     traefik                  created
jsssandbox-xconnect-1                 "C:\\LogMonitor\\LogMo…"   xconnect                 running (healthy)   0.0.0.0:8081->80/tcp
jsssandbox-xdbautomationworker-1      "C:\\LogMonitor\\LogMo…"   xdbautomationworker      running (healthy)
jsssandbox-xdbsearchworker-1          "C:\\LogMonitor\\LogMo…"   xdbsearchworker          running (healthy)

I am however able to start each container individually with docker start and after giving them time to startup confirm they are healthy and I can log into the CM site. Any ideas what could be be going on with docker-compose up in up.ps1 script?

PS F:\Projects\jss-sandbox> docker start jsssandbox-cm-1
jsssandbox-cm-1
PS F:\Projects\jss-sandbox> docker start jsssandbox-traefik-1
jsssandbox-traefik-1
PS F:\Projects\jss-sandbox> docker start jsssandbox-rendering-1
jsssandbox-rendering-1
PS F:\Projects\jss-sandbox> docker-compose ps
time="2021-11-12T12:12:00-06:00" level=warning msg="`scale` is deprecated. Use the `deploy.replicas` element"
time="2021-11-12T12:12:00-06:00" level=warning msg="`scale` is deprecated. Use the `deploy.replicas` element"
NAME                                  COMMAND                    SERVICE                  STATUS              PORTS
jsssandbox-cm-1                       "powershell C:/tools…"     cm                       running (healthy)   80/tcp
jsssandbox-cortexprocessingworker-1   "C:\\LogMonitor\\LogMo…"   cortexprocessingworker   running (healthy)
jsssandbox-id-1                       "dotnet.exe .\\Siteco…"    id                       running (healthy)   80/tcp
jsssandbox-mssql-1                    "powershell -Command…"     mssql                    running (healthy)   0.0.0.0:14330->1433/tcp
jsssandbox-mssql-init-1               "powershell -Command…"     mssql-init               exited (0)
jsssandbox-rendering-1                "cmd /S /C \"npm run …"    rendering                running             3000/tcp
jsssandbox-solr-1                     "powershell -Command…"     solr                     running (healthy)   0.0.0.0:8984->8983/tcp
jsssandbox-solr-init-1                "powershell -Command…"     solr-init                exited (0)
jsssandbox-traefik-1                  "/traefik --ping --a…"     traefik                  running (healthy)   0.0.0.0:443->443/tcp, 0.0.0.0:8079->8080/tcp
jsssandbox-xconnect-1                 "C:\\LogMonitor\\LogMo…"   xconnect                 running (healthy)   0.0.0.0:8081->80/tcp
jsssandbox-xdbautomationworker-1      "C:\\LogMonitor\\LogMo…"   xdbautomationworker      running (healthy)
jsssandbox-xdbsearchworker-1          "C:\\LogMonitor\\LogMo…"   xdbsearchworker          running (healthy)
2
  • Note, I was able to complete the setup by commenting out the docker pieces in up.ps1 after manually starting the containers, but I'm still trying to find the cause of this as starting starting the services manually is not ideal long term.
    – NDaigle
    Nov 12, 2021 at 18:29
  • Do make sure your environment is not blocking any endpoints and clean up enough memory space. Nov 16, 2021 at 6:40

1 Answer 1

0

The issue was the nodejs and solution containers had scale set to 0 by default which excludes them from the running environment. CM depends on the solution container and the rendering container depends on the nodejs container. Since those weren't running the CM and rendering containers never attempt to start preventing other containers from running. Deleting the scale setting corrects the issue.

2

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.