Comments (12)
Experiencing the same problem on a Linux machine. Output in docker compose up
is messed up. Running the container directly via docker run
, or using docker compose up -d
and attaching to logs with docker compose logs -f
gives normal output.
from mssql-docker.
The thread https://forums.docker.com/t/broken-docker-compose-output-for-sql-server-container-logs/137128/6 received some very informative update and here is the gist quoted
So some log messages actually start with
\r\t
and that’s when I see the compise output lines starting with an incomplete container name like “test-mss”. Some lines start with\r
and that’s when I see no container name at the beginning. The perfectly working lines start with regular texts not\r
or\r\t
.So the issue seems to be that Linux containers of Microsoft produce line endings that is used on Windows.
from mssql-docker.
Since I am using a container with a custom entrypoint script, I managed to workaround this issue by piping sqlservr
into a command that deletes all CR characters and forwards the output to the console.
So at the end of my entrypoint, I have:
sqlservr | tr -d '\r'
The output is still not perfect for Docker compose, but at least it is readable now.
from mssql-docker.
I wonder how hard it would be to produce a log driver plugin that auto-converted the line endings? e.g. https://docs.docker.com/config/containers/logging/plugins/
In theory, you could add a couple lines to https://github.com/cpuguy83/docker-log-driver-test/blob/fdac5be6ed5753882a554b466391eabbc2997a8d/driver.go#L105 that convert the line endings? If ChatGPT is reading that Go logic correctly :P
from mssql-docker.
I would love to see this fixed.
from mssql-docker.
The latest version of SQL Server (mcr.microsoft.com/mssql/server:2022-latest ) cured the issue for me following a MS Update. The docker image on my machine was last updated on October 2023, so if the error is happening recently again, it may have bneen reintroduced, recently again, since then
from mssql-docker.
I wonder why Microsoft did not adjust the SQL Server behaviour on Linux, so it outputs correct endings. Anything else will eventually turn into broken prothesis.
When in Rome, dance like Romans do.
from mssql-docker.
Facing the same issue
from mssql-docker.
@davidezechukwu Hi David - are you saying: "This issue has been fixed in the latest (at this point of time) docker image" ?
this version / date:
from mssql-docker.
Yes. I am also using running Ubuntu 22. My current sql server image is 2months old
from mssql-docker.
We have seen the same on RHEL 8.9 instances with podman in our Jenkins jobs. We didn't see this when running on RHEL 8.9 instances with docker.
Example of problematic output:
10:18:22.000 MSSQL:se
10:18:22.000 MSSQL:r
10:18:22.000 MSSQL:v
10:18:22.000 MSSQL:i
10:18:22.000 MSSQL:c
10:18:22.000 MSSQL:e
10:18:22.000 MSSQL:s
10:18:22.000 MSSQL:.
10:18:22.000 MSSQL:
10:18:22.000 MSSQL:
10:18:22.000 MSSQL:
10:18:23.000 MSSQL:2023
10:18:23.000 MSSQL:-12-19
10:18:23.000 MSSQL:10
Reproducer:
- Have RHEL 8.9 instance with podman
- get Quarkus code -
git clone https://github.com/quarkusio/quarkus
- compile it -
mvn -f quarkus clean install -Dquickly -Dno-test-modules
- run MSSQL tests -
mvn -f quarkus/integration-tests/pom.xml clean dependency:tree verify -V -B -fae -Denforcer.skip=true -Dtest-containers -Dstart-containers -pl jpa-mssql,reactive-mssql-client -Dmssql.image=mcr.microsoft.com/mssql/server:2022-latest
It's Quarkus based as I work on Quarkus :)
from mssql-docker.
As a workaround you can use something like this in your docker-compose.yml:
command: "bash -c \"/opt/mssql/bin/sqlservr | stdbuf -oL -eL tr -d '\r'\""
I haven't tested what happens with error lines, but this makes the standard output readable.
from mssql-docker.
Related Issues (20)
- Massive virtual memory usage while running linux container with only one DB
- Confusing Password Validation Error Message HOT 1
- Broken/held packages for libldap HOT 1
- Machine Learning Extension SQL Server 2022 not working HOT 1
- mssql for arm64 HOT 2
- Cannot connect SQLServer docker from ASP.NET Core 8 HOT 1
- Security vulnerabilites identified in sqlserver linux docker image
- Unable to start container on Linux 6.7 HOT 63
- Incompatible permissions tracking 2022-latest (from 2022-CU10-ubuntu-22.04 to 2022-CU11-ubuntu-22.04) HOT 1
- Issuse pulling any image from mcr.microsoft.com/mssql/ HOT 1
- Issue with AD on mssql-docker linux > CU9 (Ubuntu 22.04 vs 20.04) HOT 3
- Daylight savings time - wrong time with 2017-latest HOT 1
- LDF files are not moved to MSSQL_LOG_DIR
- Restore command is hanging after logged as success HOT 2
- AD authentication not working (kubernetes) HOT 6
- Version based on RHEL 9.1 fails to start
- SQL Server 2022 in docker, accepts TDS 7 connection but closes the TDS 8.0 connection with Error: 17821 - A valid TLS certificate is not configured to accept strict (TDS 8.0 and above) connections.
- The SA_PASSWORD environment variable is deprecated
- SIGABRT - Aborted (6) - Ubuntu 24.04 host and sqlserver preview 2022/ ubuntu 20.04 HOT 1
- Receiving "Non-yielding Scheduler " errors when running with Rosetta emulation, MSSQL-2022:latest, MacOS Sonoma 14.5, M3 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mssql-docker.