Microsoft SQL Server - can't log in #2333

Closed
opened 2026-02-28 02:50:56 -05:00 by deekerman · 6 comments
Owner

Originally created by @filipdot on GitHub (Jul 5, 2023).

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Can't login into MSSQL.
I use login sa, add new user uptimekuma and uptimekuma1 with right to read database with password: "password" but can't login into MSSQL. When using SSMS i can log in so login and password are ok. What could be wrong?
Connection string:
Server=192.168.10.201,1434;Database=[DATABASENAME]; User Id=uptimekuma1;Password=[password];Encrypt=true;TrustServerCertificate=Yes;Connection Timeout=30

SELECT TOP (1000) [Name]
,[VersionMajor]
,[VersionMinor]
,[VersionBuild]
,[VersionRevision]
,[DeploymentName]
,[DeploymentManifest]
FROM [DATABASENAME].[Launcher].[InstalledProducts]

📝 Error Message(s) or Log

SSMS logs from SQL:
Message
Login failed for user 'uptimekuma1'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.10.100]
Message
Login failed for user 'uptimekuma'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.10.100]

Uptimekuma logs:
[MONITOR] WARN: Monitor #2 'SQL': Failing: Login failed for user 'uptimekuma1'. | Interval: 60 seconds | Type: sqlserver | Down Count: 0 | Resend Interval: 0

🐻 Uptime-Kuma Version

YARN_VERSION=1.22.19

💻 Operating System and Arch

Docker on Ubuntu 22.04

🌐 Browser

firefox 114.0.2 (64 bity)

🐋 Docker Version

Standalone 24.0.2

🟩 NodeJS Version

No response

Originally created by @filipdot on GitHub (Jul 5, 2023). ### ⚠️ Please verify that this bug has NOT been raised before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### 📝 Describe your problem Can't login into MSSQL. I use login sa, add new user uptimekuma and uptimekuma1 with right to read database with password: "password" but can't login into MSSQL. When using SSMS i can log in so login and password are ok. What could be wrong? Connection string: Server=192.168.10.201,1434;Database=[DATABASENAME]; User Id=uptimekuma1;Password=[password];Encrypt=true;TrustServerCertificate=Yes;Connection Timeout=30 SELECT TOP (1000) [Name] ,[VersionMajor] ,[VersionMinor] ,[VersionBuild] ,[VersionRevision] ,[DeploymentName] ,[DeploymentManifest] FROM [DATABASENAME].[Launcher].[InstalledProducts] ### 📝 Error Message(s) or Log SSMS logs from SQL: Message Login failed for user 'uptimekuma1'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.10.100] Message Login failed for user 'uptimekuma'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.10.100] Uptimekuma logs: [MONITOR] WARN: Monitor #2 'SQL': Failing: Login failed for user 'uptimekuma1'. | Interval: 60 seconds | Type: sqlserver | Down Count: 0 | Resend Interval: 0 ### 🐻 Uptime-Kuma Version YARN_VERSION=1.22.19 ### 💻 Operating System and Arch Docker on Ubuntu 22.04 ### 🌐 Browser firefox 114.0.2 (64 bity) ### 🐋 Docker Version Standalone 24.0.2 ### 🟩 NodeJS Version _No response_
deekerman 2026-02-28 02:50:56 -05:00
  • closed this issue
  • added the
    help
    label
Author
Owner

@CommanderStorm commented on GitHub (Jul 5, 2023):

  • If there are whitespace/non-asci characters in your password, could you try removing them?
  • Can you log in locally using the same credentials?
@CommanderStorm commented on GitHub (Jul 5, 2023): - If there are whitespace/non-asci characters in your password, could you try removing them? - Can you log in locally using the same credentials?
Author
Owner

@filipdot commented on GitHub (Jul 6, 2023):

If there are whitespace/non-asci characters in your password, could you try removing them?

i use password as: password and still fail.

Can you log in locally using the same credentials?

yes, as i say i log in using SQL Server Management Studio (SSMS)

something is happening in uptime kuma that change wording of password

@filipdot commented on GitHub (Jul 6, 2023): > If there are whitespace/non-asci characters in your password, could you try removing them? i use password as: password and still fail. > Can you log in locally using the same credentials? yes, as i say i log in using SQL Server Management Studio (SSMS) something is happening in uptime kuma that change wording of password
Author
Owner

@CommanderStorm commented on GitHub (Jul 6, 2023):

Are you certain that password is your password?

when I try
sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=password" -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest
I get:

2023-07-06 12:01:19.86 spid51s     ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is not complex enough. The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols..
@CommanderStorm commented on GitHub (Jul 6, 2023): Are you certain that `password` is your password? when I try `sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=password" -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest` I get: ``` 2023-07-06 12:01:19.86 spid51s ERROR: Unable to set system administrator password: Password validation failed. The password does not meet SQL Server password policy requirements because it is not complex enough. The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols.. ```
Author
Owner

@filipdot commented on GitHub (Jul 6, 2023):

I'm billion % certain. 💯

mate i have already administrative password for admin (SA) and i add new user (second login) uptimekuma and (third login) uptimekuma1 and i set their password using SSMS and password is "password".

As i sayed i can successfully login into my MSSQL using SSMS using uptimekuma as login and password as password. Only UptimeKuma can't handle that and MSSQL logs says that password is wrong. I also try hard password first but because of that bug i try easy one. Login using SA (admin user) doesn't work. IDK why. I think that's bug in formatting connection string but don't know where it it.

@filipdot commented on GitHub (Jul 6, 2023): I'm billion % certain. 💯 mate i have already administrative password for admin (SA) and i add new user (second login) uptimekuma and (third login) uptimekuma1 and i set their password using SSMS and password is "password". As i sayed i can successfully login into my MSSQL using SSMS using uptimekuma as login and password as password. Only UptimeKuma can't handle that and MSSQL logs says that password is wrong. I also try hard password first but because of that bug i try easy one. Login using SA (admin user) doesn't work. IDK why. I think that's bug in formatting connection string but don't know where it it.
Author
Owner

@Computroniks commented on GitHub (Aug 9, 2023):

@filipdot I don't seem to be able to reproduce this issue using the following steps:

  1. Run:
    sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=abcABC123_" -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest
    
  2. Enter container with:
    sudo docker exec -it <container_name> "bash"
    
  3. Login to MSSQL with:
    /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "abcABC123_"
    
  4. Create a new database and list all databases with
    CREATE DATABASE TestDB;
    SELECT Name from sys.databases;
    GO
    
    That then returns
    Name                                                                                                                            
    --------------------------------------------------------------------------------------------------------------------------------
    master                                                                                                                          
    tempdb                                                                                                                          
    model                                                                                                                           
    msdb                                                                                                                            
    TestDB
    
  5. Then I create a new MSSQL monitor in Uptime Kuma with the following config:
    Connection string
    Server=localhost,1433;Database=TestDB;User Id=SA;Password=abcABC123_;Encrypt=false;TrustServerCertificate=Yes;Connection Timeout=20000
    
    Query
    SELECT getdate();
    

This all completes successfully and the monitor is marked as up. Is there any key differences you can spot between how I have tested this and how you run your system?

@Computroniks commented on GitHub (Aug 9, 2023): @filipdot I don't seem to be able to reproduce this issue using the following steps: 1. Run: ``` sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=abcABC123_" -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest ``` 2. Enter container with: ``` sudo docker exec -it <container_name> "bash" ``` 3. Login to MSSQL with: ``` /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "abcABC123_" ``` 4. Create a new database and list all databases with ``` CREATE DATABASE TestDB; SELECT Name from sys.databases; GO ``` That then returns ``` Name -------------------------------------------------------------------------------------------------------------------------------- master tempdb model msdb TestDB ``` 5. Then I create a new MSSQL monitor in Uptime Kuma with the following config: Connection string ``` Server=localhost,1433;Database=TestDB;User Id=SA;Password=abcABC123_;Encrypt=false;TrustServerCertificate=Yes;Connection Timeout=20000 ``` Query ``` SELECT getdate(); ``` This all completes successfully and the monitor is marked as up. Is there any key differences you can spot between how I have tested this and how you run your system?
Author
Owner

@filipdot commented on GitHub (Aug 9, 2023):

Server properties in Docker on Ubuntu 1804:
obraz
I test my credentials using SSMS Microsoft SQL Server Management Studio where i add new user over "sa" with name "uptimekuma".
Using SSMS i can connect and make query and get response

obraz

In uptimekuma connection string look like this:
Server=192.168.100.201,1434;Database=[DATABASENAME ]; User Id=uptimekuma;Password=[password];Encrypt=true;TrustServerCertificate=Yes;Connection Timeout=30
query:
SELECT TOP (1000) [Name]
,[VersionMajor]
,[VersionMinor]
,[VersionBuild]
,[VersionRevision]
,[DeploymentName]
,[DeploymentManifest]
FROM [DATABASENAME ].[InsLauncher].[InstalledProducts]

and it fails
obraz

don't know why, don't know what is special in my case.

In SSMS in logs i see that is something with password maching but i change it befor that try to "password" and still.

obraz

UPDATE:

new string:
Server=192.168.100.201,1434;Database=[DATABASENAME ]; User Id=uptimekuma;Password=password;Encrypt=true;TrustServerCertificate=Yes;Connection Timeout=30
And it work.
[ and ] next to password in Password make it wrong.
Now it's up.
Thank you for forcing me to do another check and poke it around.

obraz

@filipdot commented on GitHub (Aug 9, 2023): Server properties in Docker on Ubuntu 1804: ![obraz](https://github.com/louislam/uptime-kuma/assets/85545543/06b04e3d-0029-481d-b86e-52eaea51f207) I test my credentials using SSMS Microsoft SQL Server Management Studio where i add new user over "sa" with name "uptimekuma". Using SSMS i can connect and make query and get response ![obraz](https://github.com/louislam/uptime-kuma/assets/85545543/ebd6f558-4b1c-4cd2-aecc-0a58b70cb7f7) In uptimekuma connection string look like this: Server=192.168.100.201,1434;Database=[DATABASENAME ]; User Id=uptimekuma;Password=[password];Encrypt=true;TrustServerCertificate=Yes;Connection Timeout=30 query: **SELECT TOP (1000) [Name] ,[VersionMajor] ,[VersionMinor] ,[VersionBuild] ,[VersionRevision] ,[DeploymentName] ,[DeploymentManifest] FROM [DATABASENAME ].[InsLauncher].[InstalledProducts]** and it fails ![obraz](https://github.com/louislam/uptime-kuma/assets/85545543/4dd58cbe-e499-445d-bd73-f5aa46754cd8) don't know why, don't know what is special in my case. In SSMS in logs i see that is something with password maching but i change it befor that try to "password" and still. ![obraz](https://github.com/louislam/uptime-kuma/assets/85545543/fe92fb78-7255-4d7b-a915-2e16798d0052) UPDATE: new string: Server=192.168.100.201,1434;Database=[DATABASENAME ]; User Id=uptimekuma;Password=password;Encrypt=true;TrustServerCertificate=Yes;Connection Timeout=30 And it work. [ and ] next to password in Password make it wrong. Now it's up. Thank you for forcing me to do another check and poke it around. ![obraz](https://github.com/louislam/uptime-kuma/assets/85545543/1c26688f-4d46-4649-b66e-2dfb7c4fa435)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#2333
No description provided.