I am trying to run a mssql-server on a company Openshift enviroment, but I am since days a "Permission denied error".
I have already tried to run the container as nonroot container, but it does not help. As well the approach here https://github.com/microsoft/mssql-docker/issues/593 I have tried but I have just memory range up to 4GB... so I dont know if it is enough. However this is the log.
SQL Server 2019 will run as non-root by default.
This container is running as user 1005580000.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
This program has encountered a fatal error and cannot continue running at Sun Oct 18 01:38:34 2020
The following diagnostic information is available:
Reason: 0x00000002
Parameters: 0x1002af9b0
[0] 0xffffffffc0000017
Stack Trace:
file://package4/windows/system32/sqlpal.dll+0x000000000030E7D9
file://package4/windows/system32/sqlpal.dll+0x000000000030D996
file://package4/windows/system32/sqlpal.dll+0x000000000026708D
file://package4/windows/system32/sqlpal.dll+0x0000000000202FE2
file://package4/windows/system32/sqlpal.dll+0x0000000000347898
file:///windows/system32/ntdll.dll+0x00000000000CB598
file:///windows/system32/ntdll.dll+0x00000000000C3771
file:///windows/system32/ntdll.dll+0x0000000000076F7B
file:///windows/system32/ntdll.dll+0x0000000000076F2E
file://package4/windows/system32/sqlpal.dll+0x000000000024D7F7
file://package4/windows/system32/sqlpal.dll+0x000000000034ED21
<unknown>+0x000000001E331000
Process: 9 - sqlservr
Thread: 22 (application thread 0x28)
Instance Id: dfb73279-1787-46f6-9589-d086e382f7c0
Crash Id: c752f847-812d-413d-b4b6-5fa7a3844106
Build stamp: fd4eb1565f159d8f4b2d49c48e96d5797508c8bc5f222def3def149a28435962
Distribution: Ubuntu 18.04.5 LTS
Processors: 4
Total Memory: 16505180160 bytes
Timestamp: Sun Oct 18 01:38:34 2020
Ubuntu 18.04.5 LTS
Capturing core dump and information to /var/opt/mssql/log...
/bin/cat: /proc/9/maps: Permission denied
/bin/cat: /proc/9/environ: Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
/usr/bin/find: '/proc/9/map_files': Permission denied
dmesg: read kernel buffer failed: Permission denied
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
Sun Oct 18 01:38:34 UTC 2020 Capturing program information
Sun Oct 18 01:38:35 UTC 2020 Attempting to capture a dump with paldumper for pid 9
WARNING: Capture attempt failure detected
Attempting to capture a filtered dump with paldumper for pid 9
WARNING: Attempt to capture dump failed. Reference /var/opt/mssql/log/core.sqlservr.9.temp/log/paldumper-debug.log for details
Sun Oct 18 01:38:35 UTC 2020 Attempting to capture a dump with gdb
Sun Oct 18 01:38:35 UTC 2020 Captured a dump with gdb
Sun Oct 18 01:38:35 UTC 2020 Capturing program binaries
Sun Oct 18 01:38:35 UTC 2020 Compressing the dump files
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.10_18_2020_01_38_34.9.tbz2
And this is my Dockerfile:
FROM mcr.microsoft.com/mssql/server:2019-latest
# Create non-root user and update permissions
#
USER root
RUN useradd -M -s /bin/bash -u 10002 -g 0 mssqltest
RUN mkdir -p -m 770 /var/opt/mssql && chgrp -R 0 /var/opt/mssql
# Grant sql the permissions to connect to ports <1024 as a non-root user
#
RUN setcap 'cap_net_bind_service+ep' /opt/mssql/bin/sqlservr
# Allow dumps from the non-root process
#
RUN setcap 'cap_sys_ptrace+ep' /opt/mssql/bin/paldumper
RUN setcap 'cap_sys_ptrace+ep' /usr/bin/gdb
# Add an ldconfig file because setcap causes the os to remove LD_LIBRARY_PATH
# and other env variables that control dynamic linking
#
RUN mkdir -p /etc/ld.so.conf.d && touch /etc/ld.so.conf.d/mssql.conf
RUN echo -e "# mssql libs\n/opt/mssql/lib" >> /etc/ld.so.conf.d/mssql.conf
RUN ldconfig
USER mssqltest
CMD ["/opt/mssql/bin/sqlservr"]
Any help would be awesome ^^.
User contributions licensed under CC BY-SA 3.0