Sql-server – initdata: No memory for kernel buffers

linuxsql serversql-server-2019

I recently upgraded my SQL Server 2017 Developer Edition on RedHat Enterprise Linux 7.6 to SQL Server 2019 CTP 3.0.

The mssql-server service will no longer start. /var/opt/mssql/log/errorlog shows the following:

2019-06-12 09:36:31.98 Server Microsoft SQL Server 2019 (CTP3.0) – 15.0.1600.8 (X64)
May 17 2019 00:56:19
Copyright (C) 2019 Microsoft Corporation
Developer Edition (64-bit) on Linux (Red Hat Enterprise Linux)
2019-06-12 09:36:32.04 Server UTC adjustment: -5:00
2019-06-12 09:36:32.05 Server (c) Microsoft Corporation.
2019-06-12 09:36:32.07 Server All rights reserved.
2019-06-12 09:36:32.08 Server Server process ID is 32.
2019-06-12 09:36:32.09 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2019-06-12 09:36:32.10 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-06-12 09:36:32.15 Server Command Line Startup Parameters:
–accept-eula
2019-06-12 09:36:32.18 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.
2019-06-12 09:36:32.20 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2019-06-12 09:36:32.23 Server Detected 7856 MB of RAM. This is an informational message; no user action is required.
2019-06-12 09:36:32.24 Server Using conventional memory in the memory manager.
2019-06-12 09:36:32.28 Server Buffer pool extension is not supported on Linux platform.
2019-06-12 09:36:32.29 Server Error: 17128, Severity: 16, State: 1.
2019-06-12 09:36:32.29 Server initdata: No memory for kernel buffers.

/var/opt/mssql/mssql.conf contents:

[sqlagent]
enabled = false

systemctl status mssql-server shows:

mssql-server.service – Microsoft SQL Server Database Engine
Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Mon 2019-06-17 13:57:45 CDT; 26min ago
Docs: https://docs.microsoft.com/en-us/sql/linux
Process: 71357 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=1/FAILURE)
Main PID: 71357 (code=exited, status=1/FAILURE)
Tasks: 0
CGroup: /system.slice/mssql-server.service

Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: mssql-server.service: main process exited, code=exited, status=1/FAILURE
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: Unit mssql-server.service entered failed state.
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: mssql-server.service failed.
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: mssql-server.service holdoff time over, scheduling restart.
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: Stopped Microsoft SQL Server Database Engine.
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: start request repeated too quickly for mssql-server.service
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: Failed to start Microsoft SQL Server Database Engine.
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: Unit mssql-server.service entered failed state.
Jun 17 13:57:45 rhel72-sqlserver.localdomain systemd[1]: mssql-server.service failed.

I've tried yum remove mssql-server, followed by yum install mssql-server, but no change.

Any ideas?

Attempting to run the mssql-conf setup executable, as root, results in this:

[root@rhel72-sqlserver bin]# sudo ./mssql-conf setup
usermod: no changes
Choose an edition of SQL Server:
1) Evaluation (free, no production use rights, 180-day limit)
2) Developer (free, no production use rights)
3) Express (free)
4) Web (PAID)
5) Standard (PAID)
6) Enterprise (PAID) – CPU Core utilization restricted to 20 physical/40 hyperthreaded
7) Enterprise Core (PAID) – CPU Core utilization up to Operating System Maximum
8) I bought a license through a retail sales channel and have a product key to enter.

Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x409

Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.

Enter your edition(1-8): 2
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x409

The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409

Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server…

This is an evaluation version. There are [153] days left in the evaluation period.
This program has encountered a fatal error and cannot continue running at Mon Jun 17 14:35:43 2019
The following diagnostic information is available:

  Reason: 0x00000007  
  Status: 0xc0000218  
 Message: Cannot open or read the persistent registry: \SystemRoot\security.hiv.  

Stack Trace:
000000006bd347d0
000000006bd31af7
000000006bd31d3a
000000006bd30ea5
000000006bd2faf7
000000006bd73371
Process: 75209 – sqlservr
Thread: 75213 (application thread 0x4)
Instance Id: ffcf27f9-18a5-485a-8a9d-34482c5efe06
Crash Id: cb1238f4-2504-457c-bbb3-d7ecad750aec
Build stamp: fbef7d3acfbedcf62a42c8909366dbba3852b92cabb497c2169680835fd60276
Distribution: Red Hat Enterprise Linux
Processors: 4
Total Memory: 16637898752 bytes
Timestamp: Mon Jun 17 14:35:43 2019

Red Hat Enterprise Linux
Capturing core dump and information to /var/opt/mssql/log…
Hint: You are currently not seeing messages from other users and the system.
Users in the 'systemd-journal' group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.
Hint: You are currently not seeing messages from other users and the system.
Users in the 'systemd-journal' group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.
/usr/bin/tail: cannot open ‘/var/log/messages’ for reading: Permission denied
Attempting to capture a dump with paldumper
Captured a dump with paldumper
/usr/bin/find: ‘/usr/share/polkit-1/rules.d’: Permission denied
/usr/bin/find: ‘/usr/libexec/initscripts/legacy-actions/auditd’: Permission denied
Core dump and information are being compressed in the background. When
complete, they can be found in the following location:
/var/opt/mssql/log/core.sqlservr.06_17_2019_14_35_43.75209.tbz2
Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
in /var/opt/mssql/log for more information.
[root@rhel72-sqlserver bin]#

I'm logged into the server as root, so I don't understand why I'm seeing "access denied" errors.

Best Answer

So, being the smarty-pants I am, I thought it would be easier to just login to my RHEL system as root, then I wouldn't need to sudo every time.

Turns out that was a mistake.

I was able to fix my install by logging in using my "normal" Linux account, then run sudo commands per the docs to remove and re-install SQL Server binaries from the Microsoft repo. I also needed to run the following commands to reset ownership and group-membership for filesystem objects for my existing /var/opt/mssql/* folders:

chown -R mssql /var/opt/mssql/*
chgrp -R mssql /var/opt/mssql/*

Moral of the story, don't shoot yourself in the foot. It hurts. Oh well, I guess I've got another small chapter for my book:

Adventures in Linux, AKA, It's NEVER going to be the year of Linux on the desktop.