Настройка сервера MSSQL в Ubuntu. Не удается открыть или прочитать постоянный реестр: \ SystemRoot \ security.hiv - PullRequest
1 голос
/ 01 апреля 2019

Я использую следующее руководство для установки сервера MSSQL на моем компьютере с Ubuntu 16.04 https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-2017

во время работы:

sudo /opt/mssql/bin/mssql-conf setup

независимо от типа SQL ServerЯ выбираю редакцию, получаю следующую ошибку:

    Confirm the SQL Server system administrator password: 
Configuring SQL Server...

This program has encountered a fatal error and cannot continue running at Mon Apr  1 16:06:07 2019
The following diagnostic information is available:

       Reason: 0x00000007
      Message: Cannot open or read the persistent registry: \SystemRoot\security.hiv.
      Process: 19600 - sqlservr
       Thread: 19604 (application thread 0x4)
  Instance Id: 7ebfcf27-db60-460d-afd3-6d852b70069e
     Crash Id: d99ba388-d323-43f3-b758-e116f42bb2e8
  Build stamp: 70437f6583b8ef39b1ef70539ef84690980315dc7a4436c9c40015f28610e4aa
 Distribution: Ubuntu 16.04.6 LTS
   Processors: 8
 Total Memory: 16673366016 bytes
    Timestamp: Mon Apr  1 16:06:07 2019

Ubuntu 16.04.6 LTS
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/syslog' for reading: Permission denied
Attempting to capture a dump with paldumper
Captured a dump with paldumper
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.04_01_2019_16_06_07.19600.tbz2
Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
in /var/opt/mssql/log for more information.

также я нашел этот пост , который выглядит так, как будто у этого парня была похожая проблема, но, к сожалению, нет решения

Кто-нибудь знает, как решить мою проблему?

Спасибо

Редактировать: после реализации ответа я получил еще одну ошибку:

Confirm the SQL Server system administrator password: 
Configuring SQL Server...

Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG in /var/opt/mssql/log for more information

Чтобы сделать некоторыеОчистить в беспорядок, который я имел в папке журнала, я решил полностью удалить его, используя

sudo rm -rf / var / opt / mssql / log

и повторно- запустите установку, очевидно, это решило мою последнюю проблему и, наконец: Установка успешно завершена.SQL Server теперь запускается.

1 Ответ

1 голос
/ 12 апреля 2019

Вы найдете дополнительную информацию в

/var/opt/mssql/log

Шахта сказала:

{
    "reason": "0x00000007",
    "processName": "sqlservr",
    "pid": "5773",
    "instanceId": "d7df749c-50e6-4f3b-b894-2aa7c743f33d",
    "crashId": "281e772a-5946-4349-aa9e-671cd0a3772c",
    "threadId": "5777",
    "libosThreadId": "0x4",
    "buildStamp": "70437f6583b8ef39b1ef70539ef84690980315dc7a4436c9c40015f28610e4aa",
    "message": "Cannot open or read the persistent registry: \\SystemRoot\\lsa.hiv.",
    "last_errno": "13",
    "last_errno_text": "Permission denied",
    "distribution": "Ubuntu 16.04.6 LTS",
    "processors": "4",
    "total_memory": "16732037120",
    "timestamp": "Fri Apr 12 22:02:44 2019"
}

Итак, я запустил locate, чтобы увидеть, где находится "systemroot":

найдите security.hiv
/var/opt/mssql/.system/system/security.hiv

Я не знал, какие разрешения следует применять, поэтому я просто дал «читать и писать» «другим».

то же самое с

lsa.hiv
licensing.hiv

повторно запустить

sudo /opt/mssql/bin/mssql-conf setup

и затем запускается sql-сервер, а разрешения для других снова исчезают.

Кстати, вы можете запустить sql-сервер без службы, тогда он будет работать даже при сбое службы:

/opt/mssql/bin/sqlservr
...