SQL Server Linux Docker image keeps exiting - sql-server

Setup
Windows 10 Pro
Docker for Windows 1.13.0-beta38 (9805)
Dockerfile
FROM microsoft/mssql-server-linux:latest
ENV ACCEPT_EULA "Y"
ENV SA_PASSWORD "my_strong_Password!"
EXPOSE 1433
Issue
Temperamental container. Sometime it stays up for a few minutes. Other time is exits straight away.
Once the container has stopped I run docker start #containerID. The container will start and stay up for a few more minutes. However it will eventually exit.
I know the container lifecyle means that if no process is running in the container it will exit, so I can only assume this is happening.
I have examined the logs and I always get this message before it exits:
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
I've googled this message but can't find any useful information about it.
Does anyone know why the container keeps exiting?
Full SQL Server Linux Logs
This is an evaluation version. There are [141] days left in the evaluation period.
2017-01-23 17:42:33.90 Server Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)
Dec 10 2016 02:51:11
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
on Linux (Ubuntu 16.04.1 LTS)
2017-01-23 17:42:33.91 Server UTC adjustment: 0:00
2017-01-23 17:42:33.92 Server (c) Microsoft Corporation.
2017-01-23 17:42:33.92 Server All rights reserved.
2017-01-23 17:42:33.92 Server Server process ID is 4116.
2017-01-23 17:42:33.93 Server Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'.
2017-01-23 17:42:33.93 Server Registry startup parameters:
-d C:\var\opt\mssql\data\master.mdf
-l C:\var\opt\mssql\data\mastlog.ldf
-e C:\var\opt\mssql\log\errorlog
2017-01-23 17:42:34.08 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical
processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-01-23 17:42:34.09 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-01-23 17:42:34.09 Server Detected 3143 MB of RAM. This is an informational message; no user action is required.
2017-01-23 17:42:34.10 Server Using conventional memory in the memory manager.
2017-01-23 17:42:34.90 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2017-01-23 17:42:37.27 Server Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:42:38.70 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-01-23 17:42:38.70 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-01-23 17:42:39.11 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-01-23 17:42:39.11 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description o
f the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-01-23 17:42:39.13 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational m
essage only. No user action is required.
2017-01-23 17:42:39.14 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initial
ization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-01-23 17:42:39.16 Server Query Store settings initialized with enabled = 1,
2017-01-23 17:42:39.16 spid5s Starting up database 'master'.
2017-01-23 17:42:39.19 Server In-Memory OLTP initialized on lowend machine.
2017-01-23 17:42:40.27 Server Software Usage Metrics is disabled.
2017-01-23 17:42:40.79 spid5s 159 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:42:40.82 spid5s 0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:42:40.82 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2017-01-23 17:42:41.05 spid5s Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:42:41.06 spid5s Resource governor reconfiguration succeeded.
2017-01-23 17:42:41.06 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-01-23 17:42:41.07 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-01-23 17:42:41.80 spid5s SQL Trace ID 1 was started by login "sa".
2017-01-23 17:42:41.82 spid5s Server name is 'c0afcedc2500'. This is an informational message only. No user action is required.
2017-01-23 17:42:41.85 spid20s Starting up database 'msdb'.
2017-01-23 17:42:41.85 spid21s Starting up database 'MyTestDb'.
2017-01-23 17:42:41.85 spid6s Starting up database 'mssqlsystemresource'.
2017-01-23 17:42:41.89 spid6s The resource database build version is 14.00.100. This is an informational message only. No user action is required.
2017-01-23 17:42:41.99 spid6s Starting up database 'model'.
2017-01-23 17:42:44.68 spid21s Parallel redo is started for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:42:44.69 spid5s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
2017-01-23 17:42:44.85 spid21s 75 transactions rolled forward in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:42:44.91 spid5s 0 transactions rolled back in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:42:44.93 spid5s Parallel redo is shutdown for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:42:44.98 spid6s Polybase feature disabled.
2017-01-23 17:42:44.98 spid6s Clearing tempdb database.
2017-01-23 17:42:49.01 spid6s Starting up database 'tempdb'.
2017-01-23 17:42:49.03 spid17s A self-generated certificate was successfully loaded for encryption.
2017-01-23 17:42:49.24 spid17s Server is listening on [ 0.0.0.0 <ipv4> 1433].
2017-01-23 17:42:49.24 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2017-01-23 17:42:49.25 Server Dedicated admin connection support was established for listening locally on port 1434.
2017-01-23 17:42:49.25 spid17s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2017-01-23 17:42:50.95 spid6s The tempdb database has 1 data file(s).
2017-01-23 17:42:50.96 spid22s The Service Broker endpoint is in disabled or stopped state.
2017-01-23 17:42:50.96 spid22s The Database Mirroring endpoint is in disabled or stopped state.
2017-01-23 17:42:50.99 spid22s Service Broker manager has started.
2017-01-23 17:42:51.14 spid5s Recovery is complete. This is an informational message only. No user action is required.
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Capturing core dump and information for sqlservr (pid 11)...
cat: core.sqlservr.11.temp/log/debug.log: No such file or directory
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
ls: cannot access '/var/opt/mssql/log/log/errorlog*': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/exception.log': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.txt': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.mdmp': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/system_health*': No such file or directory
Packaging core dump and information into compressed files.
Core dump and information will be written to /var/opt/mssql/log/core.sqlservr.01_23_2017_17_43_37.11 and logs in /var/opt/mssql/log/core.sqlservr.01_23_2017_17_43_37.11.l
og
This is an evaluation version. There are [141] days left in the evaluation period.
2017-01-23 17:45:25.45 Server Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)
Dec 10 2016 02:51:11
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
on Linux (Ubuntu 16.04.1 LTS)
2017-01-23 17:45:25.45 Server UTC adjustment: 0:00
2017-01-23 17:45:25.45 Server (c) Microsoft Corporation.
2017-01-23 17:45:25.46 Server All rights reserved.
2017-01-23 17:45:25.46 Server Server process ID is 4116.
2017-01-23 17:45:25.46 Server Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'.
2017-01-23 17:45:25.46 Server Registry startup parameters:
-d C:\var\opt\mssql\data\master.mdf
-l C:\var\opt\mssql\data\mastlog.ldf
-e C:\var\opt\mssql\log\errorlog
2017-01-23 17:45:25.55 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical
processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-01-23 17:45:25.55 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-01-23 17:45:25.56 Server Detected 3143 MB of RAM. This is an informational message; no user action is required.
2017-01-23 17:45:25.56 Server Using conventional memory in the memory manager.
2017-01-23 17:45:26.40 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2017-01-23 17:45:28.55 Server Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:45:29.96 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-01-23 17:45:29.96 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-01-23 17:45:30.43 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-01-23 17:45:30.43 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description o
f the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-01-23 17:45:30.45 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational m
essage only. No user action is required.
2017-01-23 17:45:30.46 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initial
ization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-01-23 17:45:30.47 Server Query Store settings initialized with enabled = 1,
2017-01-23 17:45:30.47 spid5s Starting up database 'master'.
2017-01-23 17:45:30.49 Server In-Memory OLTP initialized on lowend machine.
2017-01-23 17:45:32.07 Server Software Usage Metrics is disabled.
2017-01-23 17:45:32.31 spid5s 5 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:45:32.36 spid5s 0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:45:32.36 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2017-01-23 17:45:32.64 spid5s Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:45:32.65 spid5s Resource governor reconfiguration succeeded.
2017-01-23 17:45:32.65 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-01-23 17:45:32.65 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-01-23 17:45:33.47 spid5s SQL Trace ID 1 was started by login "sa".
2017-01-23 17:45:33.49 spid5s Server name is 'c0afcedc2500'. This is an informational message only. No user action is required.
2017-01-23 17:45:33.53 spid6s Starting up database 'mssqlsystemresource'.
2017-01-23 17:45:33.54 spid20s Starting up database 'msdb'.
2017-01-23 17:45:33.55 spid21s Starting up database 'MyTestDb'.
2017-01-23 17:45:33.61 spid6s The resource database build version is 14.00.100. This is an informational message only. No user action is required.
2017-01-23 17:45:33.67 spid6s Starting up database 'model'.
2017-01-23 17:45:36.19 spid21s Parallel redo is started for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:45:36.43 spid21s 78 transactions rolled forward in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:45:36.53 spid6s Polybase feature disabled.
2017-01-23 17:45:36.53 spid6s Clearing tempdb database.
2017-01-23 17:45:36.59 spid5s 0 transactions rolled back in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:45:36.60 spid5s Parallel redo is shutdown for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:45:36.71 spid5s Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Capturing core dump and information for sqlservr (pid 12)...
cat: core.sqlservr.12.temp/log/debug.log: No such file or directory
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
ls: cannot access '/var/opt/mssql/log/log/errorlog*': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/exception.log': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.txt': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.mdmp': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/system_health*': No such file or directory
Packaging core dump and information into compressed files.
Core dump and information will be written to /var/opt/mssql/log/core.sqlservr.01_23_2017_17_45_37.12 and logs in /var/opt/mssql/log/core.sqlservr.01_23_2017_17_45_37.12.l
og

I had the same problem!
I used a really strong password and step by step of that link to solved the problem.
Quickstart: Run the SQL Server 2017 container image with Docker
Good luck.

sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Above message is related to Microsoft SQL Server bug (see: GH-23). Upgrade should help.
Microsoft SQL Server vNext (CTP1.2) - 14.0.200.24 (X64) solved this issue!

Try increasing the memory size of Docker's VM. Left click on the whale icon on the task bar, select Settings/Advanced and set the amount of memory to a fair size, like 4 Gigs, then start the container, wait and probe to see if the image is still running. I had this and other problems with my container and this fixed it. Good luck.

Related

Is there any other solution for "could not find the database engine startup handle' for MS SQL Server 2019

I have tried every method available online.
Uninstalling every MSSQL server
Removing keys from registry
Uninstalling and deleting files from program files
Start setup in administrator mode
selecting the server as nt authority system and also nt authority local service
Still I am getting that error. Please help
2021-05-16 18:01:59.78 Server Microsoft SQL Server 2019 (RTM) -
15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Home
Single Language 10.0 (Build 18363: )
2021-05-16 18:01:59.78 Server UTC adjustment: 5:30 2021-05-16
18:01:59.78 Server (c) Microsoft Corporation. 2021-05-16
18:01:59.85 Server All rights reserved. 2021-05-16 18:01:59.85
Server Server process ID is 2488. 2021-05-16 18:01:59.85 Server
System Manufacturer: 'ASUSTeK COMPUTER INC.', System Model: 'GL552VX'.
2021-05-16 18:01:59.85 Server Authentication mode is MIXED.
2021-05-16 18:01:59.85 Server Logging SQL Server messages in file
'F:\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2021-05-16 18:01:59.85 Server The service account is
'WORKGROUP\PRIYANSHU$'. This is an informational message; no user
action is required. 2021-05-16 18:01:59.85 Server Registry
startup parameters: -d F:\Microsoft SQL
Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf -e F:\Microsoft SQL
Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG -l F:\Microsoft SQL
Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\mastlog.ldf 2021-05-16
18:01:59.85 Server Command Line Startup Parameters: -s
"MSSQLSERVER" 2021-05-16 18:01:59.88 Server SQL Server detected 1
sockets with 4 cores per socket and 8 logical processors per socket, 8
total logical processors; using 8 logical processors based on SQL
Server licensing. This is an informational message; no user action is
required. 2021-05-16 18:01:59.88 Server SQL Server is starting at
normal priority base (=7). This is an informational message only. No
user action is required. 2021-05-16 18:01:59.88 Server Detected
8057 MB of RAM. This is an informational message; no user action is
required. 2021-05-16 18:01:59.88 Server Using conventional memory
in the memory manager. 2021-05-16 18:01:59.88 Server Page
exclusion bitmap is enabled. 2021-05-16 18:01:59.92 Server Buffer
Pool: Allocating 2097152 bytes for 1289161 hashPages. 2021-05-16
18:01:59.93 Server Default collation:
SQL_Latin1_General_CP1_CI_AS (us_english 1033) 2021-05-16 18:01:59.96
Server Buffer pool extension is already disabled. No action is
necessary. 2021-05-16 18:02:00.02 Server Query Store settings
initialized with enabled = 1, 2021-05-16 18:02:00.02 Server The
maximum number of dedicated administrator connections for this
instance is '1' 2021-05-16 18:02:00.02 Server This instance of
SQL Server last reported using a process ID of 6652 at 16-05-2021
17:55:56 (local) 16-05-2021 12:25:56 (UTC). This is an informational
message only; no user action is required. 2021-05-16 18:02:00.03
Server Node configuration: node 0: CPU mask: 0x00000000000000ff:0
Active CPU mask: 0x00000000000000ff:0. This message provides a
description of the NUMA configuration for this computer. This is an
informational message only. No user action is required. 2021-05-16
18:02:00.03 Server Using dynamic lock allocation. Initial
allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.
This is an informational message only. No user action is required.
2021-05-16 18:02:00.04 Server In-Memory OLTP initialized on
lowend machine. 2021-05-16 18:02:00.05 Server [INFO] Created
Extended Events session 'hkenginexesession'
2021-05-16 18:02:00.05 Server Database Instant File
Initialization: disabled. For security and performance considerations
see the topic 'Database Instant File Initialization' in SQL Server
Books Online. This is an informational message only. No user action is
required. 2021-05-16 18:02:00.05 Server Total Log Writer threads:
2. This is an informational message; no user action is required. 2021-05-16 18:02:00.06 Server clflushopt is selected for pmem
flush operation. 2021-05-16 18:02:00.06 Server Software Usage
Metrics is disabled. 2021-05-16 18:02:00.06 spid9s Starting up
database 'master'. 2021-05-16 18:02:00.28 spid9s 2 transactions
rolled forward in database 'master' (1:0). This is an informational
message only. No user action is required. 2021-05-16 18:02:00.31
Server CLR version v4.0.30319 loaded. 2021-05-16 18:02:00.34
spid9s 0 transactions rolled back in database 'master' (1:0).
This is an informational message only. No user action is required.
2021-05-16 18:02:00.37 Server Common language runtime (CLR)
functionality initialized using CLR version v4.0.30319 from
C:\Windows\Microsoft.NET\Framework64\v4.0.30319. 2021-05-16
18:02:00.44 spid9s Resource governor reconfiguration succeeded.
2021-05-16 18:02:00.44 spid9s SQL Server Audit is starting the
audits. This is an informational message. No user action is required.
2021-05-16 18:02:00.46 spid9s SQL Server Audit has started the
audits. This is an informational message. No user action is required.
2021-05-16 18:02:00.47 spid9s SQL Trace ID 1 was started by login
"sa". 2021-05-16 18:02:00.48 spid9s Server name is 'PRIYANSHU'.
This is an informational message only. No user action is required.
2021-05-16 18:02:00.50 spid25s Always On: The availability replica
manager is starting. This is an informational message only. No user
action is required. 2021-05-16 18:02:00.50 spid25s Always On: The
availability replica manager is waiting for the instance of SQL Server
to allow client connections. This is an informational message only. No
user action is required. 2021-05-16 18:02:00.50 spid9s Starting
up database 'msdb'. 2021-05-16 18:02:00.50 spid14s Starting up
database 'mssqlsystemresource'. 2021-05-16 18:02:00.50 spid9s
Error: 17204, Severity: 16, State: 1. 2021-05-16 18:02:00.50 spid9s
FCB::Open failed: Could not open file
d:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf
for file number 1. OS error: 3(The system cannot find the path
specified.). 2021-05-16 18:02:00.50 spid9s Error: 5120, Severity:
16, State: 101. 2021-05-16 18:02:00.50 spid9s Unable to open the
physical file
"d:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf".
Operating system error 3: "3(The system cannot find the path
specified.)". 2021-05-16 18:02:00.51 spid9s Error: 17207,
Severity: 16, State: 1. 2021-05-16 18:02:00.51 spid9s
FileMgr::StartLogFiles: Operating system error 2(The system cannot
find the file specified.) occurred while creating or opening file
'd:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBLog.ldf'.
Diagnose and correct the operating system error, and retry the
operation. 2021-05-16 18:02:00.51 spid9s File activation failure.
The physical file name
"d:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\MSDBLog.ldf"
may be incorrect. 2021-05-16 18:02:00.53 spid14s The resource
database build version is 15.00.2000. This is an informational message
only. No user action is required. 2021-05-16 18:02:00.65 spid22s A
self-generated certificate was successfully loaded for encryption.
2021-05-16 18:02:00.65 spid22s Server is listening on [ 'any'
1433]. 2021-05-16 18:02:00.65 spid22s Server is listening
on [ 'any' 1433]. 2021-05-16 18:02:00.66 spid22s Server
local connection provider is ready to accept connection on [
\.\pipe\SQLLocal\MSSQLSERVER ]. 2021-05-16 18:02:00.66 spid22s
Server named pipe provider is ready to accept connection on [
\.\pipe\sql\query ]. 2021-05-16 18:02:00.66 Server Server is
listening on [ ::1 1434]. 2021-05-16 18:02:00.66 Server
Server is listening on [ 127.0.0.1 1434]. 2021-05-16
18:02:00.66 Server Dedicated admin connection support was
established for listening locally on port 1434. 2021-05-16 18:02:00.66
spid22s SQL Server is now ready for client connections. This is an
informational message; no user action is required. 2021-05-16
18:02:00.66 Server SQL Server is attempting to register a Service
Principal Name (SPN) for the SQL Server service. Kerberos
authentication will not be possible until a SPN is registered for the
SQL Server service. This is an informational message. No user action
is required. 2021-05-16 18:02:00.66 Server The SQL Server Network
Interface library could not register the Service Principal Name (SPN)
[ MSSQLSvc/priyanshu ] for the SQL Server service. Windows return
code: 0xffffffff, state: 53. Failure to register a SPN might cause
integrated authentication to use NTLM instead of Kerberos. This is an
informational message. Further action is only required if Kerberos
authentication is required by authentication policies and if the SPN
has not been manually registered. 2021-05-16 18:02:00.69 Server
The SQL Server Network Interface library could not register the
Service Principal Name (SPN) [ MSSQLSvc/priyanshu:1433 ] for the SQL
Server service. Windows return code: 0xffffffff, state: 53. Failure to
register a SPN might cause integrated authentication to use NTLM
instead of Kerberos. This is an informational message. Further action
is only required if Kerberos authentication is required by
authentication policies and if the SPN has not been manually
registered. 2021-05-16 18:02:00.75 spid14s Starting up database
'model'. 2021-05-16 18:02:00.76 spid14s Error: 17204, Severity:
16, State: 1. 2021-05-16 18:02:00.76 spid14s FCB::Open failed:
Could not open file
d:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\model.mdf
for file number 1. OS error: 3(The system cannot find the path
specified.). 2021-05-16 18:02:00.76 spid14s Error: 5120, Severity:
16, State: 101. 2021-05-16 18:02:00.76 spid14s Unable to open the
physical file
"d:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\model.mdf".
Operating system error 3: "3(The system cannot find the path
specified.)". 2021-05-16 18:02:00.76 spid14s Error: 17207,
Severity: 16, State: 1. 2021-05-16 18:02:00.76 spid14s
FileMgr::StartLogFiles: Operating system error 2(The system cannot
find the file specified.) occurred while creating or opening file
'd:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\modellog.ldf'.
Diagnose and correct the operating system error, and retry the
operation. 2021-05-16 18:02:00.76 spid14s File activation failure.
The physical file name
"d:\dbs\sh\s19s\0924_133725\cmd\2\obj\x64retail\sql\mkmastr\databases\mkmastr.proj\modellog.ldf"
may be incorrect. 2021-05-16 18:02:00.76 spid14s Error: 945,
Severity: 14, State: 2. 2021-05-16 18:02:00.76 spid14s Database
'model' cannot be opened due to inaccessible files or insufficient
memory or disk space. See the SQL Server errorlog for details.
2021-05-16 18:02:00.76 spid14s SQL Trace was stopped due to server
shutdown. Trace ID = '1'. This is an informational message only; no
user action is required.

SQL Server docker container stop after initializing

I downloaded the latest version of the SQL Server image and I followed the instruction given in the docker hub page here
The problem is when I start container by running the below command, the container stops and I cannot find it in the running containers using docker ps
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=fakepassw0rd' -p 1433:1433 mcr.microsoft.com/mssql/server
The result :
2019-04-22 19:16:13.67 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2019-04-22 19:16:13.74 Server Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2019-04-22 19:16:13.75 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2019-04-22 19:16:13.76 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2019-04-22 19:16:13.77 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2019-04-22 19:16:13.79 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2019-04-22 19:16:13.82 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2019-04-22 19:16:13.93 Server Microsoft SQL Server 2017 (RTM-CU11) (KB4462262) - 14.0.3038.14 (X64)
Sep 14 2018 13:53:44
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
2019-04-22 19:16:13.94 Server UTC adjustment: 0:00
2019-04-22 19:16:13.95 Server (c) Microsoft Corporation.
2019-04-22 19:16:13.95 Server All rights reserved.
2019-04-22 19:16:13.95 Server Server process ID is 4120.
2019-04-22 19:16:13.95 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2019-04-22 19:16:13.95 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2019-04-22 19:16:13.96 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2019-04-22 19:16:13.97 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2019-04-22 19:16:13.98 Server Detected 1584 MB of RAM. This is an informational message; no user action is required.
2019-04-22 19:16:13.98 Server Using conventional memory in the memory manager.
2019-04-22 19:16:14.14 Server Buffer pool extension is already disabled. No action is necessary.
2019-04-22 19:16:14.27 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2019-04-22 19:16:14.28 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2019-04-22 19:16:14.29 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2019-04-22 19:16:14.32 Server The maximum number of dedicated administrator connections for this instance is '1'
2019-04-22 19:16:14.33 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2019-04-22 19:16:14.34 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2019-04-22 19:16:14.36 Server In-Memory OLTP initialized on lowend machine.
2019-04-22 19:16:14.46 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
ForceFlush is enabled for this instance.
2019-04-22 19:16:14.47 Server Query Store settings initialized with enabled = 1,
2019-04-22 19:16:14.48 spid7s Starting up database 'master'.
2019-04-22 19:16:14.49 Server Software Usage Metrics is disabled.
ForceFlush feature is enabled for log durability.
2019-04-22 19:16:14.71 spid7s 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.
2019-04-22 19:16:14.91 spid7s Converting database 'master' from version 862 to the current version 869.
2019-04-22 19:16:14.91 spid7s Database 'master' running the upgrade step from version 862 to version 863.
2019-04-22 19:16:14.99 spid7s Database 'master' running the upgrade step from version 863 to version 864.
2019-04-22 19:16:15.04 spid7s Database 'master' running the upgrade step from version 864 to version 865.
2019-04-22 19:16:15.05 spid7s Database 'master' running the upgrade step from version 865 to version 866.
2019-04-22 19:16:15.08 spid7s Database 'master' running the upgrade step from version 866 to version 867.
2019-04-22 19:16:15.09 spid7s Database 'master' running the upgrade step from version 867 to version 868.
2019-04-22 19:16:15.13 spid7s Database 'master' running the upgrade step from version 868 to version 869.
2019-04-22 19:16:15.44 spid7s Resource governor reconfiguration succeeded.
2019-04-22 19:16:15.46 spid7s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2019-04-22 19:16:15.46 spid7s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2019-04-22 19:16:15.56 spid7s SQL Trace ID 1 was started by login "sa".
2019-04-22 19:16:15.59 spid19s Password policy update was successful.
2019-04-22 19:16:15.60 spid7s Server name is '75d968b3f551'. This is an informational message only. No user action is required.
2019-04-22 19:16:15.64 spid21s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2019-04-22 19:16:15.65 spid8s Starting up database 'mssqlsystemresource'.
2019-04-22 19:16:15.66 spid7s Starting up database 'msdb'.
2019-04-22 19:16:15.66 spid21s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2019-04-22 19:16:15.68 spid8s The resource database build version is 14.00.3038. This is an informational message only. No user action is required.
2019-04-22 19:16:15.72 spid8s Starting up database 'model'.
2019-04-22 19:16:15.96 spid24s ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is too short. The password must be at least 8 characters..
2019-04-22 19:16:15.97 spid24s An error occurred during server setup. See previous errors for more information.
2019-04-22 19:16:15.97 spid24s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2019-04-22 19:16:16.03 spid19s A self-generated certificate was successfully loaded for encryption.
2019-04-22 19:16:16.04 spid19s Server is listening on [ 'any' <ipv4> 1433].
I tried the same and it works with 2 adjustments:
- I had to change the password to include an upper case letter as well: fakePassw0rd
- I added the "-d" flag before the image name
Password need to be strong password.
https://learn.microsoft.com/en-gb/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash
Specify your own strong password that is at least eight characters and
meets the SQL Server password requirements. Required setting for the
SQL Server image.

cant connect to sqlserver docker image

running the container
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Password_01!" -p 1433:1433 --name sql1 -d microsoft/mssql-server-linux:2017-latest
the container status is UP
trying to connect
docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password_01!
or using the docker machine ip insted of localhost
docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd -S 192.168.99.100 -U SA -P 'Password_01!'
i got this error:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Timeout error [258]. .
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Unable to complete login process due to delay in prelogin response.
this is the container log
$ docker logs sql1
2018-08-17 12:41:55.65 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2018-08-17 12:41:55.77 Server Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2018-08-17 12:41:55.78 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2018-08-17 12:41:55.81 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2018-08-17 12:41:55.91 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2018-08-17 12:41:56.01 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2018-08-17 12:41:56.17 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2018-08-17 12:41:56.26 Server Microsoft SQL Server 2017 (RTM-CU9-GDR) (KB4293805) - 14.0.3035.2 (X64)
Jul 6 2018 18:24:36
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
2018-08-17 12:41:56.27 Server UTC adjustment: 0:00
2018-08-17 12:41:56.27 Server (c) Microsoft Corporation.
2018-08-17 12:41:56.27 Server All rights reserved.
2018-08-17 12:41:56.27 Server Server process ID is 4120.
2018-08-17 12:41:56.27 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2018-08-17 12:41:56.27 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2018-08-17 12:41:56.28 Server SQL Server detected 1 sockets with 1 cores per socket and 1 logical processors per socket, 1 total logical processors; using 1 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2018-08-17 12:41:56.29 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2018-08-17 12:41:56.29 Server Detected 3160 MB of RAM. This is an informational message; no user action is required.
2018-08-17 12:41:56.30 Server Using conventional memory in the memory manager.
2018-08-17 12:41:56.70 Server Buffer pool extension is already disabled. No action is necessary.
2018-08-17 12:41:57.35 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2018-08-17 12:41:57.35 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2018-08-17 12:41:57.35 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2018-08-17 12:41:57.59 Server The maximum number of dedicated administrator connections for this instance is '1'
2018-08-17 12:41:57.59 Server Node configuration: node 0: CPU mask: 0x0000000000000001:0 Active CPU mask: 0x0000000000000001:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2018-08-17 12:41:57.72 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2018-08-17 12:41:57.80 Server In-Memory OLTP initialized on lowend machine.
2018-08-17 12:41:58.09 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
ForceFlush is enabled for this instance.
2018-08-17 12:41:58.13 Server Query Store settings initialized with enabled = 1,
2018-08-17 12:41:58.33 spid6s Starting up database 'master'.
2018-08-17 12:41:58.39 Server Software Usage Metrics is disabled.
ForceFlush feature is enabled for log durability.
2018-08-17 12:41:58.95 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.
2018-08-17 12:42:00.16 spid6s Converting database 'master' from version 862 to the current version 869.
2018-08-17 12:42:00.16 spid6s Database 'master' running the upgrade step from version 862 to version 863.
2018-08-17 12:42:00.62 spid6s Database 'master' running the upgrade step from version 863 to version 864.
2018-08-17 12:42:01.38 spid6s Database 'master' running the upgrade step from version 864 to version 865.
2018-08-17 12:42:01.76 spid6s Database 'master' running the upgrade step from version 865 to version 866.
2018-08-17 12:42:02.12 spid6s Database 'master' running the upgrade step from version 866 to version 867.
2018-08-17 12:42:02.56 spid6s Database 'master' running the upgrade step from version 867 to version 868.
2018-08-17 12:42:02.97 spid6s Database 'master' running the upgrade step from version 868 to version 869.
2018-08-17 12:42:05.05 spid6s Resource governor reconfiguration succeeded.
2018-08-17 12:42:05.06 spid6s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2018-08-17 12:42:05.07 spid6s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2018-08-17 12:42:05.36 spid6s SQL Trace ID 1 was started by login "sa".
2018-08-17 12:42:05.77 spid20s Password policy update was successful.
2018-08-17 12:42:06.15 spid6s Server name is '980bd8d92bc7'. This is an informational message only. No user action is required.
2018-08-17 12:42:06.35 spid23s Always On: The availability replica manager is starting. This is an informational message only. No user action is required.
2018-08-17 12:42:06.36 spid6s Starting up database 'msdb'.
2018-08-17 12:42:06.36 spid23s Always On: The availability replica manager is waiting for the instance of SQL Server to allow client connections. This is an informational message only. No user action is required.
2018-08-17 12:42:06.37 spid9s Starting up database 'mssqlsystemresource'.
2018-08-17 12:42:06.37 spid9s The resource database build version is 14.00.3035. This is an informational message only. No user action is required.
2018-08-17 12:42:06.51 spid9s Starting up database 'model'.
2018-08-17 12:42:06.89 spid6s The tail of the log for database msdb is being rewritten to match the new sector size of 4096 bytes. 512 bytes at offset 306688 in file /var/opt/mssql/data/MSDBLog.ldf will be written.
2018-08-17 12:42:06.95 spid20s A self-generated certificate was successfully loaded for encryption.
2018-08-17 12:42:07.08 spid20s Server is listening on [ 'any' <ipv4> 1433].
2018-08-17 12:42:07.09 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2018-08-17 12:42:07.09 Server Dedicated admin connection support was established for listening locally on port 1434.
2018-08-17 12:42:07.16 spid20s SQL Server is now ready for client connections. This is an informational message; no user action is required.
this i the refernece that i followed: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-2017
I've found more success with giving the container a hostname (-h option), then connecting to that hostname, if that's an option for you.

SQL Server 2016 Error: 18456, Severity: 14, State: 38

While trying to install SQL server 2016 in my machine I came across following error:
Msg 18456, Severity: 14, State: 38
Please have a look at the log:
2017-10-12 11:24:15.51 Server Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Express Edition (64-bit) on Windows 10 Enterprise 6.3 <X64> (Build 15063: )
2017-10-12 11:24:15.54 Server UTC adjustment: 5:30
2017-10-12 11:24:15.54 Server (c) Microsoft Corporation.
2017-10-12 11:24:15.54 Server All rights reserved.
2017-10-12 11:24:15.54 Server Server process ID is 4824.
2017-10-12 11:24:15.54 Server System Manufacturer: 'Dell Inc.', System Model: 'Precision Tower 7810'.
2017-10-12 11:24:15.54 Server Authentication mode is WINDOWS-ONLY.
2017-10-12 11:24:15.54 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
2017-10-12 11:24:15.54 Server The service account is 'NT Service\MSSQL$SQLEXPRESS'. This is an informational message; no user action is required.
2017-10-12 11:24:15.55 Server Registry startup parameters:
-d C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\master.mdf
-e C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Log\ERRORLOG
-l C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2017-10-12 11:24:15.55 Server Command Line Startup Parameters:
-s "SQLEXPRESS"
2017-10-12 11:24:17.64 Server SQL Server detected 2 sockets with 6 cores per socket and 6 logical processors per socket, 12 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-10-12 11:24:17.64 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-12 11:24:17.65 Server Detected 32692 MB of RAM. This is an informational message; no user action is required.
2017-10-12 11:24:17.66 Server Using conventional memory in the memory manager.
2017-10-12 11:24:18.14 Server Default collation: Latin1_General_CI_AI (us_english 1033)
2017-10-12 11:24:18.78 Server Buffer pool extension is already disabled. No action is necessary.
2017-10-12 11:24:19.62 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-10-12 11:24:19.62 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-10-12 11:24:20.73 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-10-12 11:24:20.75 Server This instance of SQL Server last reported using a process ID of 2476 at 12-10-2017 11:22:51 (local) 12-10-2017 05:52:51 (UTC). This is an informational message only; no user action is required.
2017-10-12 11:24:20.82 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-10-12 11:24:20.95 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2017-10-12 11:24:21.05 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-10-12 11:24:21.38 Server Query Store settings initialized with enabled = 1,
2017-10-12 11:24:21.82 spid5s Starting up database 'master'.
2017-10-12 11:24:24.04 Server CLR version v4.0.30319 loaded.
2017-10-12 11:24:24.57 spid5s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-10-12 11:24:24.62 spid5s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-10-12 11:24:25.29 spid5s SQL Trace ID 1 was started by login "sa".
2017-10-12 11:24:25.38 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2017-10-12 11:24:25.41 spid5s Server name is 'I7724\SQLEXPRESS'. This is an informational message only. No user action is required.
2017-10-12 11:24:25.55 spid5s Starting up database 'msdb'.
2017-10-12 11:24:25.56 spid6s Starting up database 'mssqlsystemresource'.
2017-10-12 11:24:25.63 spid6s The resource database build version is 13.00.4001. This is an informational message only. No user action is required.
2017-10-12 11:24:25.99 spid6s Starting up database 'model'.
2017-10-12 11:24:26.22 spid10s A self-generated certificate was successfully loaded for encryption.
2017-10-12 11:24:26.23 spid10s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].
2017-10-12 11:24:26.24 Server Software Usage Metrics is disabled.
2017-10-12 11:24:26.24 spid10s Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].
2017-10-12 11:24:26.26 spid10s Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2017-10-12 11:24:26.26 spid10s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2017-10-12 11:24:26.26 Server SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.
2017-10-12 11:24:26.37 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/I7724.ptcnet.ptc.com:SQLEXPRESS ] for the SQL Server service. Windows return code: 0x200b, state: 15. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2017-10-12 11:24:26.40 spid6s Polybase feature disabled.
2017-10-12 11:24:26.40 spid6s Clearing tempdb database.
2017-10-12 11:24:27.04 spid6s Starting up database 'tempdb'.
2017-10-12 11:24:27.43 spid18s The Service Broker endpoint is in disabled or stopped state.
2017-10-12 11:24:27.43 spid18s The Database Mirroring endpoint is in disabled or stopped state.
2017-10-12 11:24:27.62 spid18s Service Broker manager has started.
2017-10-12 11:24:27.62 spid5s Recovery is complete. This is an informational message only. No user action is required.
2017-10-12 11:29:41.85 spid51 Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
2017-10-12 11:29:41.98 spid51 Using 'xplog70.dll' version '2015.130.1601' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
2017-10-12 11:49:26.09 Logon Error: 18456, Severity: 14, State: 38.
2017-10-12 11:49:26.09 Logon Login failed for user 'PTCNET\I7724$'. Reason: Failed to open the explicitly specified database 'WM'. [CLIENT: <local machine>]
But When I am trying to install SQL Server 2012 just to verify where could be the possible error, I am getting the below log and in this case I am able to install SQl Server 2012.
2017-10-12 15:31:05.57 Server Microsoft SQL Server 2012 - 11.0.2100.60 (Intel X86)
Feb 10 2012 19:13:17
Copyright (c) Microsoft Corporation
Express Edition on Windows NT 6.2 <X64> (Build 9200: ) (WOW64)
2017-10-12 15:31:05.57 Server (c) Microsoft Corporation.
2017-10-12 15:31:05.57 Server All rights reserved.
2017-10-12 15:31:05.57 Server Server process ID is 9680.
2017-10-12 15:31:05.57 Server System Manufacturer: 'Dell Inc.', System Model: 'Precision Tower 7810'.
2017-10-12 15:31:05.57 Server Authentication mode is WINDOWS-ONLY.
2017-10-12 15:31:05.57 Server Logging SQL Server messages in file 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
2017-10-12 15:31:05.57 Server The service account is 'PTCNET\I7724$'. This is an informational message; no user action is required.
2017-10-12 15:31:05.57 Server Registry startup parameters:
-d C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\master.mdf
-e C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Log\ERRORLOG
-l C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2017-10-12 15:31:05.57 Server Command Line Startup Parameters:
-s "SQLEXPRESS"
2017-10-12 15:31:05.84 Server SQL Server detected 2 sockets with 6 cores per socket and 6 logical processors per socket, 12 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-10-12 15:31:05.84 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-12 15:31:05.84 Server Detected 32692 MB of RAM. This is an informational message; no user action is required.
2017-10-12 15:31:05.84 Server Using conventional memory in the memory manager.
2017-10-12 15:31:05.96 Server This instance of SQL Server last reported using a process ID of 8320 at 10/12/2017 3:31:02 PM (local) 10/12/2017 10:01:02 AM (UTC). This is an informational message only; no user action is required.
2017-10-12 15:31:05.96 Server Node configuration: node 0: CPU mask: 0x0000000f:0 Active CPU mask: 0x0000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-10-12 15:31:05.97 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2017-10-12 15:31:05.99 Server Software Usage Metrics is disabled.
2017-10-12 15:31:06.00 spid4s Starting up database 'master'.
2017-10-12 15:31:06.07 Server CLR version v4.0.30319 loaded.
2017-10-12 15:31:06.18 spid4s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-10-12 15:31:06.18 spid4s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-10-12 15:31:06.19 spid4s SQL Trace ID 1 was started by login "sa".
2017-10-12 15:31:06.20 spid4s Server name is 'I7724\SQLEXPRESS'. This is an informational message only. No user action is required.
2017-10-12 15:31:06.21 spid4s Failed to verify Authenticode signature on DLL 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Binn\ftimport.dll'.
2017-10-12 15:31:06.21 spid9s Starting up database 'mssqlsystemresource'.
2017-10-12 15:31:06.21 spid4s Starting up database 'msdb'.
2017-10-12 15:31:06.23 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework\v4.0.30319\.
2017-10-12 15:31:06.27 spid9s The resource database build version is 11.00.2100. This is an informational message only. No user action is required.
2017-10-12 15:31:06.36 spid12s A self-generated certificate was successfully loaded for encryption.
2017-10-12 15:31:06.36 spid12s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].
2017-10-12 15:31:06.36 spid12s Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].
2017-10-12 15:31:06.36 spid12s Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2017-10-12 15:31:06.36 spid12s SQL Server is now ready for client connections. This is an informational message; no user action is required.
2017-10-12 15:31:06.36 Server SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.
2017-10-12 15:31:06.38 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/I7724.ptcnet.ptc.com:SQLEXPRESS ] for the SQL Server service. Windows return code: 0x200b, state: 15. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2017-10-12 15:31:06.46 spid9s Starting up database 'model'.
2017-10-12 15:31:06.59 spid9s Clearing tempdb database.
2017-10-12 15:31:06.84 spid9s Starting up database 'tempdb'.
One thing which I observed is the difference in Service account name which is "PTCNET\I7724$" for SQL server 2012 whereas for SQL Server 2016 it is "NT Service\MSSQL$SQLEXPRESS".
Not sure if this is the reason for that and from where it is picking the different Service name. Any input will be highly appreciated.

MSSQLSERVER Stuck in 'Starting'

I'm running a Sharepoint installation over 3 VMs and my SQLVM can no longer start the MSSQLSERVER service. It gets stuck at 'Starting' and uses 100% of a processor core but seems to do nothing. The error log is as follows:
2017-04-12 11:28:50.86 Server Microsoft SQL Server 2014 - 12.0.4213.0 (X64)
Jun 9 2015 12:06:16
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
2017-04-12 11:28:50.86 Server UTC adjustment: 1:00
2017-04-12 11:28:50.86 Server (c) Microsoft Corporation.
2017-04-12 11:28:50.86 Server All rights reserved.
2017-04-12 11:28:50.86 Server Server process ID is 4660.
2017-04-12 11:28:50.86 Server System Manufacturer: 'Microsoft Corporation', System Model: 'Virtual Machine'.
2017-04-12 11:28:50.86 Server Authentication mode is MIXED.
2017-04-12 11:28:50.86 Server Logging SQL Server messages in file 'E:\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2017-04-12 11:28:50.86 Server The service account is 'LUNET\elsqlservice-svc'. This is an informational message; no user action is required.
2017-04-12 11:28:50.86 Server Registry startup parameters:
-d E:\MSSQL12.MSSQLSERVER\MSSQL\DATA\master.mdf
-e E:\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG
-l E:\MSSQL12.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2017-04-12 11:28:50.86 Server Command Line Startup Parameters:
-s "MSSQLSERVER"
2017-04-12 11:28:51.33 Server SQL Server detected 1 sockets with 4 cores per socket and 4 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-04-12 11:28:51.33 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-04-12 11:28:51.33 Server Detected 32765 MB of RAM. This is an informational message; no user action is required.
2017-04-12 11:28:51.33 Server Using conventional memory in the memory manager.
2017-04-12 11:28:51.47 Server Default collation: Latin1_General_CI_AS (us_english 1033)
2017-04-12 11:28:51.53 Server The maximum number of dedicated administrator connections for this instance is '1'
2017-04-12 11:28:51.53 Server This instance of SQL Server last reported using a process ID of 1612 at 12/04/2017 10:39:20 (local) 12/04/2017 09:39:20 (UTC). This is an informational message only; no user action is required.
2017-04-12 11:28:51.53 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-04-12 11:28:51.59 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2017-04-12 11:28:51.63 spid7s Starting up database 'master'.
2017-04-12 11:28:51.64 spid7s 1 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2017-04-12 11:28:51.64 spid7s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2017-04-12 11:28:51.65 Server CLR version v4.0.30319 loaded.
2017-04-12 11:28:51.74 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2017-04-12 11:28:51.74 Server Software Usage Metrics is enabled.
2017-04-12 11:28:51.77 spid7s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-04-12 11:28:51.77 spid7s SQL Server Audit has started the audits. This is an informational message. No user action is required.
After falling through the rabbit hole trying to solve this issue I highly recommend running Windows Sysinternals Process Monitor for anyone with a similar issue. This highlighted repeated access to a corrupt file that was the source of the problem.

Resources