gpt4 book ai didi

sql-server - 升级到 WSL2 后映射卷时 MSSQL 容器无法启动

转载 作者:行者123 更新时间:2023-12-05 08:13:49 27 4
gpt4 key购买 nike

将 Docker Desktop 更改为使用 WSL2 后,我无法使用 Docker-compose 启动 mssql 镜像。

如果我不映射容器启动的卷。

Docker-compose

services:
db:
image: "mcr.microsoft.com/mssql/server:2019-latest"
container_name: mssql
environment:
SA_PASSWORD: "***********"
ACCEPT_EULA: "Y"
ports:
- 1433:1433
volumes:
- ~/docker/sql/mssql/:/var/opt/mssql/
- ~/docker/sql/sqlserver/:/var/opt/sqlserver/
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$$SA_PASSWORD" -Q "SELECT 1" || exit 1
interval: 30s
timeout: 30s
retries: 3

错误

** ERROR: [AppLoader] Failed to load LSA: 0xc0070102
AppLoader: Exiting with status=0xc0070102
This program has encountered a fatal error and cannot continue running at Tue Dec 15 13:49:34 2020
The following diagnostic information is available:

Reason: 0x00000006
Message: Termination of \SystemRoot\system32\AppLoader.exe was due to fatal error 0xC0000001
Address: 0x3fffb0c551f1
Stack Trace:
file://package4/windows/system32/sqlpal.dll+0x000000000030E7D9
file://package4/windows/system32/sqlpal.dll+0x000000000030C769
file://package4/windows/system32/sqlpal.dll+0x0000000000255F1D
file://package4/windows/system32/sqlpal.dll+0x00000000002551F1
file://package4/windows/system32/sqlpal.dll+0x0000000000254A72
file://package4/windows/system32/sqlpal.dll+0x0000000000254B4B
file://package4/windows/system32/sqlpal.dll+0x0000000000202FE2
file://package4/windows/system32/sqlpal.dll+0x0000000000347898
file:///windows/system32/AppLoader.exe+0x0000000000003C90
file:///Windows/SYSTEM32/KERNEL32.DLL+0x0000000000014414
file:///windows/system32/ntdll.dll+0x0000000000075541
<unknown>+0x00000000FC3FE000
Process: 10 - sqlservr
Thread: 39 (application thread 0x68)
Instance Id: 7cfc9545-c829-4a7e-a461-83b481fe05e3
Crash Id: b747c621-d4e2-46ed-9122-f14a8d54386a
Build stamp: fd4eb1565f159d8f4b2d49c48e96d5797508c8bc5f222def3def149a28435962
Distribution: Ubuntu 18.04.5 LTS
Processors: 8
Total Memory: 13339308032 bytes
Timestamp: Tue Dec 15 13:49:34 2020

Ubuntu 18.04.5 LTS
Capturing core dump and information to /var/opt/mssql/log...
/bin/cat: /proc/10/maps: Permission denied
/bin/cat: /proc/10/environ: Permission denied
/usr/bin/find: '/proc/10/map_files': Permission denied
/usr/bin/find: '/proc/10/map_files': Permission denied
/usr/bin/find: '/proc/10/map_files': Permission denied
/usr/bin/find: '/proc/10/map_files': Permission denied
dmesg: read kernel buffer failed: Operation not permitted
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
Tue Dec 15 13:49:36 UTC 2020 Capturing program information
Tue Dec 15 13:49:36 UTC 2020 Attempting to capture a dump with paldumper for pid 10
WARNING: Capture attempt failure detected
Attempting to capture a filtered dump with paldumper for pid 10
WARNING: Attempt to capture dump failed. Reference /var/opt/mssql/log/core.sqlservr.10.temp/log/paldumper-debug.log for details

Tue Dec 15 13:49:36 UTC 2020 Attempting to capture a dump with gdb
Tue Dec 15 13:49:36 UTC 2020 Captured a dump with gdb
Tue Dec 15 13:49:36 UTC 2020 Capturing program binaries
Tue Dec 15 13:49:36 UTC 2020 Compressing the dump files

wsl --list --verbose

  NAME                   STATE           VERSION
* Ubuntu-20.04 Running 2
docker-desktop Running 2
docker-desktop-data Running 2

最佳答案

作为the documentation状态,整个/var/opt/mssql 文件夹无法映射,但可能您想要映射数据子目录/var/opt/mssql/data,其中包含 db 文件,您可以毫无困难地映射这些文件

...Host volume mapping for Docker on Windows does not currently support mapping the complete /var/opt/mssql directory. However, you can map a subdirectory, such as /var/opt/mssql/data to your host machine...

关于sql-server - 升级到 WSL2 后映射卷时 MSSQL 容器无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65307784/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com