【发布时间】:2020-10-01 03:45:28
【问题描述】:
当我尝试在 Windows 10 Home 上使用 Docker 和 WSL2 运行 eShopOnContainers 时,我遇到了这个错误:
src_sqldata_1 exited with code 255
以下是 Docker 中的一些错误消息:
2020-09-30 09:47:22.45 spid3s Starting up database 'msdb'.
2020-09-30 09:47:22.48 spid3s Error: 17204, Severity: 16, State: 1.
2020-09-30 09:47:22.48 spid3s FCB::Open failed: Could not open file d:\dbs\sh\sqfs\0612_201659\cmd\1r\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf for file number 1. OS error: 2(The system cannot find the file specified.).
2020-09-30 09:47:22.54 spid3s Error: 5120, Severity: 16, State: 101.
2020-09-30 09:47:22.54 spid3s Unable to open the physical file "d:\dbs\sh\sqfs\0612_201659\cmd\1r\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf". Operating system error 2: "2(The system cannot find the file specified.)".
2020-09-30 09:47:22.60 spid3s Error: 17207, Severity: 16, State: 1.
2020-09-30 09:47:22.60 spid3s FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'd:\dbs\sh\sqfs\0612_201659\cmd\1r\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBLog.ldf'. Diagnose and correct the operating system error, and retry the operation.
2020-09-30 09:47:22.68 spid3s File activation failure. The physical file name "d:\dbs\sh\sqfs\0612_201659\cmd\1r\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBLog.ldf" may be incorrect.
2020-09-30 09:47:23.96 spid8s Starting up database 'mssqlsystemresource'.
2020-09-30 09:47:24.01 spid8s The resource database build version is 14.00.3335. This is an informational message only. No user action is required.
2020-09-30 09:47:24.11 spid8s Starting up database 'model'.
2020-09-30 09:47:24.13 spid8s Error: 17204, Severity: 16, State: 1.
2020-09-30 09:47:24.13 spid8s FCB::Open failed: Could not open file d:\dbs\sh\sqfs\0612_201659\cmd\1r\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\model.mdf for file number 1. OS error: 2(The system cannot find the file specified.).
按照@mvelosop here 的建议,我还尝试使用docker-compose up sqldata 仅运行sqldata 容器,但我遇到了同样的错误:
2020-09-30 12:30:51.53 spid19s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2020-09-30 12:30:51.60 spid7s File activation failure. The physical file name "d:\dbs\sh\sqfs\0612_201659\cmd\1r\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\modellog.ldf" may be incorrect.
2020-09-30 12:30:51.64 spid7s Error: 945, Severity: 14, State: 2.
2020-09-30 12:30:51.64 spid7s Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
2020-09-30 12:30:51.68 spid7s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
src_sqldata_1 exited with code 255
这是我尝试仅运行 sqldata 容器时使用的机器资源。
您可以在该图像中看到我还有很多可用的 RAM。
我还有很多磁盘空间.. 驱动器 C 和 D 都超过 100GB。
请帮忙。我对 WSL 和 Docker 还不是很熟悉。
非常感谢。
【问题讨论】:
标签: c# .net sql-server docker wsl-2