When running docker compose up -d
, the cd
container shows as unhealthy. It was functioning properly yesterday.
I am seeing these errors when the CD container is starting up, and I can see the site shutting down and starting back up in a continuous loop:
[LOGMONITOR] ERROR: Error in log file monitor. Failed to query file information. File: \\?\c:\inetpub\wwwroot\App_Data\logs\log.20230614.143115.txt. Error: 50
[LOGMONITOR] ERROR: Error in log file monitor. Failed to query file ID. File: \\?\c:\inetpub\wwwroot\App_Data\logs\log.20230614.143115.txt. Error: 50
2023-06-14 15:01:29 2800 15:01:19 INFO **************************************************
2023-06-14 15:01:29 2800 15:01:19 WARN Sitecore shutting down
2023-06-14 15:01:29 2800 15:01:19 WARN Shutdown message: Initialization Error
2023-06-14 15:01:29 HostingEnvironment initiated shutdown
2023-06-14 15:01:52 [2023-06-14T21:01:52.000Z][LOGMONITOR] ERROR: Error in log file monitor. Failed to query file information. File: \\?\c:\inetpub\wwwroot\App_Data\logs\log.20230614.150152.txt. Error: 50
2023-06-14 15:01:52 [2023-06-14T21:01:52.000Z][LOGMONITOR] ERROR: Error in log file monitor. Failed to query file ID. File: \\?\c:\inetpub\wwwroot\App_Data\logs\log.20230614.150152.txt. Error: 50
2023-06-14 15:02:19 2023-06-14 21:01:09 ::1 GET /healthz/ready - 80 - ::1 Mozilla/5.0+(Windows+NT;+Windows+NT+10.0;+en-US)+WindowsPowerShell/5.1.17763.3770 - 500 0 0 18197
Due to this issue, I am unable to access any of the sites.
I tried:
- Restarting Docker client
- Cleaning out the
docker/data/cd
folder - Running
docker system prune
- Rebuilding the containers via
docker compose up --build
The only (inconclusive) references I could find related to this error are:
- https://github.com/microsoft/windows-container-tools/issues/125
- https://github.com/microsoft/windows-container-tools/issues/34
EDIT - Solution
Using the information provided by others on this post, I was able to drill down and location the issue: my Web/Master/Core databases were missing from the mssql
container entirely (despite them being present in the \docker\data\mssql
directory), which was resulting in the error:
Exception Details: System.Data.SqlClient.SqlException: Cannot open database Sitecore.Web;requested by the login. The login failed. Login failed for user 'sa'
Not sure how this happened, but good to know that such database issues can cause endless restarts of CD.