在升级期间,数据库引发了异常9002

时间:2017-10-06 08:05:32

标签: sql-server database docker docker-machine

我正在尝试使用Docker在Ubuntu主机上运行MSSQL容器。容器启动但在几秒钟内就崩溃了。

以下是指向文件系统或磁盘问题的容器日志:

2017-10-06 07:23:10.95 Server      Query Store settings initialized    
with enabled = 1, 
2017-10-06 07:23:10.99 spid6s      Starting up    
database 'master'. 
2017-10-06 07:23:11.00 Server      Software Usage    Metrics is disabled. 
2017-10-06 07:23:12.20 spid6s      The tail of    the log for database master is being rewritten to match the new    sector size of 4096 bytes.  3072 bytes at offset 418816 in file    /var/opt/mssql/data/mastlog.ldf will be written. 
2017-10-06    07:23:13.71 spid6s      Converting database 'master' from version 862    to the current version 869. 
2017-10-06 07:23:13.72 spid6s         Database 'master' running the upgrade step from version 862 to    version 863. 
2017-10-06 07:23:14.51 spid6s      Database 'master'    running the upgrade step from version 863 to version 864. 
2017-10-06    07:23:14.83 spid6s      Error: 17053, Severity: 16, State: 1.    
2017-10-06 07:23:14.83 spid6s      /var/opt/mssql/data/mastlog.ldf:    Operating system error 31(A device attached to the system is not    functioning.) encountered. 
2017-10-06 07:23:15.84 spid6s      Error:    928, Severity: 20, State: 1. 
2017-10-06 07:23:15.84 spid6s         During upgrade, database raised exception 9002, severity 17, state 0,    address 0000000484CD26DE. Use the exception number to determine the    cause. 
2017-10-06 07:23:15.86 spid6s      Error: 9002, Severity: 17,    State: 0. 
2017-10-06 07:23:15.86 spid6s      The transaction log for    database 'master' is full due to 'NOTHING'.

以下是我的泊坞窗配置

prashanthadiyodi@dev-ubuntu14:~$ docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 1
Server Version: 17.09.0-ce
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 12
 Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 3.13.0-129-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 7.798GiB
Name: dev-ubuntu14
ID: FALX:S7M7:H6RN:7JQF:FZM7:ZL2T:RCRN:RGON:XYU6:WEEO:2JLC:TBAH
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

我正在运行以下命令来启动容器

sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=adi1982' -p 1433:1433 -d --name mssqlcon -v mydata:/data  microsoft/mssql-server-linux:2017-GA

请注意,我使用了不同的指定数据分区的变体,但没有运气。

需要社区帮助了解根本原因。

1 个答案:

答案 0 :(得分:0)

错误9002

当事务日志变满时,将发生错误9002。因此,您可能希望释放包含事务日志文件的磁盘驱动器上的磁盘空间。

请参阅:Troubleshoot a Full Transaction Log (SQL Server Error 9002)

检查密码要求

您的密码(例如adi1982)不符合complexity requirements。因此,请尝试添加非字母数字字符,例如感叹号(!)。

检查日志

要检查错误,请运行:docker logs ID(其中IDdocker ps的容器ID)。