Server: mssql Error: 17113, Severity: 16, State: 1. Error 87(The parameter is incorrect.)

Created on 14 May 2018  ·  7Comments  ·  Source: bitwarden/server

New bitwarden setup and unfortunately on the first run mssql is acting up.

/var/opt/mssql/log/errorlog

2018-05-14 04:07:08.03 Server      Microsoft SQL Server 2017 (RTM-CU5) (KB4092643) - 14.0.3023.8 (X64) 
        Mar  2 2018 18:24:44 
        Copyright (C) 2017 Microsoft Corporation
        Express Edition (64-bit) on Linux (Ubuntu 16.04.4 LTS)
2018-05-14 04:07:08.03 Server      UTC adjustment: 0:00
2018-05-14 04:07:08.03 Server      (c) Microsoft Corporation.
2018-05-14 04:07:08.03 Server      All rights reserved.
2018-05-14 04:07:08.03 Server      Server process ID is 4124.
2018-05-14 04:07:08.03 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2018-05-14 04:07:08.03 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-05-14 04:07:08.03 Server      Error: 17113, Severity: 16, State: 1.
2018-05-14 04:07:08.03 Server      Error 87(The parameter is incorrect.) occurred while opening file '/var/opt/mssql/data/master.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.

Most helpful comment

这个样修改
volumes: - ../data/mssql:/var/opt/mssql

改成
volumes: - ../data/mssql:/var/opt/mssql - /var/opt/mssql/data

All 7 comments

I searched a bit more and found the answer https://github.com/Microsoft/mssql-docker/issues/13

Issue is caused by ZFS.

Closing since issue is tracked upstream.

这个样修改
volumes: - ../data/mssql:/var/opt/mssql

改成
volumes: - ../data/mssql:/var/opt/mssql - /var/opt/mssql/data

Y-

这个样修改
volumes: - ../data/mssql:/var/opt/mssql

改成
volumes: - ../data/mssql:/var/opt/mssql - /var/opt/mssql/data

在哪个文件中 ???

Hey guys,
I started using the Docker on my Macbook,
when i needed a SQL Server container, unfortunately, the file mapping did not work and the machine was not mounted, showing the same error described above in the logs.

That's when I found out what @Y-YJ was saying, so I took my docker-composite file and added the line in "volumes:"

docker-compose.yml

version: '3'
services:
    ....
    volumes:
        - nameDirectory:/var/opt/mssql/data
    ....
volumes:
    nameDirectory:

Note that 'nameDirectory' is just the name of the directory that will be created in '
/var/lib/docker/volumes/ '
SQL Server data will be persisted here '
/var/lib/docker/volumes/nameDirectory '

That way, even if you remove your container and start again, the data will still be there.

Use Docker Desktop for container info in inspect session

Or case use you containers only with Dockerfile

Dockerfile

$ docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Passw0r(!)' -v 'nameDirectory:/var/opt/mssql' -d --rm --name name-your-container -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest

I hope I have helped and that this helps other people.

Thanks so much Walesson, it works now, you save my day. I Tried many many ways like using root, use /var/opt/mssql instead of /var/opt/mssql/data but didnt work. I am also using docker on MacOS

version: "3.5"

networks: 
  fpt_mssql:
    name: fpt_mssql

services: 
  mssql:
    container_name: fpt_mssql-tns
    build: 
      context: .
      dockerfile: Dockerfile
    restart: always
    ports: 
      - '1433:1433'
    environment: 
      - ACCEPT_EULA=Y
      - SA_PASSWORD=Test@123
    volumes: 
      - './db:/VAR/OPT/MSSQL'
      - './db/data:/VAR/OPT/MSSQL/DATA'

It's will work try this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theontho picture theontho  ·  4Comments

ohthehugemanatee picture ohthehugemanatee  ·  3Comments

chasgames picture chasgames  ·  4Comments

FoxBJK picture FoxBJK  ·  3Comments

marcrib picture marcrib  ·  5Comments