Learn More, Pay Less!
Limited Time Offer!
Open Closed

Microservice Solution template - Login failed for SA - Password mismatch - sql server - azure sql edge docker image #8744


User avatar
0
Anjaneyulu created
  • ABP Framework version: v9.0.0
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Microservice
  • Exception message and full stack trace: Login error for SA. Password mismatch - sql server - azure sql edge docker image
  • Steps to reproduce the issue: Create a sample application with microservice architectue.
  • Do run docker compose up and i see all the infrastruture containers running.
  • Try to run the authserver application from visual studio, and it say login failed for sa .
  • When run the docker following https://learn.microsoft.com/en-us/azure/azure-sql-edge/disconnected-deployment . Im able to login to db.
  • Im using docker deskop on windows with wsl2

Can you help solve the issue


10 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, can you check your container and inspect it to ensure about the password and also confirm it's same in your microservice application?

  • User Avatar
    0
    Anjaneyulu created

    Hi, can you check your container and inspect it to ensure about the password and also confirm it's same in your microservice application?

    Yes, In the docker desktop, i could inspect the docker container and see the password same as which im trying to login

  • User Avatar
    0
    Anjaneyulu created

    Hi, can you check your container and inspect it to ensure about the password and also confirm it's same in your microservice application?

    Yes, In the docker desktop, i could inspect the docker container and see the password same as which im trying to login

    To be more specific it is the default password that comes with the microservice template architute using abp studio

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    To be more specific it is the default password that comes with the microservice template architute using abp studio

    Okay. I guess it gives an error as below right?

    2/5/2025 8:39:39 AM    [Error] Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open database "Question8744_Administration" requested by the login. The login failed.
    Login failed for user 'sa'.
    

    This means, your auth-server is up, but the administration service is either not up or hasn't created the database yet. So, please also run the all services and wait for 1-2 minutes to data seeders to be completed. Then, you will be able to open the auth-server and other services and applications:

  • User Avatar
    0
    Anjaneyulu created

    This the error that im getting with services and similar to authserver as well.

    SqlException has been thrown. The operation will be tried 2 times more. Exception: Login failed for user 'sa'.. Stack Trace: at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool) at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen() --- End of stack trace from previous location -

    I have tried connecting to sql server running in docker from ssms host machine localhost,1434 -

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    This the error that im getting with services and similar to authserver as well.

    SqlException has been thrown. The operation will be tried 2 times more. Exception: Login failed for user 'sa'.. Stack Trace: at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool) at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen() --- End of stack trace from previous location -

    I have tried connecting to sql server running in docker from ssms host machine localhost,1434 -

    Hi, you said that you are using the default password coming from the ABP Studio templates, however, the default password is myPassw@rd. It seems that you changed the default password (or using an already running sql-server container). Can you confirm?

    If you changed the password, please don't forget to change it in the services' appsettings.json files:

  • User Avatar
    0
    Anjaneyulu created

    Ohh that my bad, i have attached a wrong screenshot , I have changed the password for testing,incase that works.

    I confirm the password was myPassw@rd when tried to run the applications

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Ohh that my bad, i have attached a wrong screenshot , I have changed the password for testing,incase that works.

    I confirm the password was myPassw@rd when tried to run the applications

    Okay. Then I don't see any reason why it's not working (as you can see from my previous answers, I have tried to create a new microservice template, and I'm unable to reproduce it for now). Can you share the container logs for the sql-server image?

  • User Avatar
    0
    Anjaneyulu created

    Im using dockersektop with wsl2 in windows machine. I believe this has nothing to do with that because im able to connect from ssms with external port 1434 from host machien when i run individually based on the micrsoft documentation.

    The error logs from container :

    2025-02-06 05:30:00 05:09:54.54 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 172.18.0.1] 2025-02-06 10:39:54 2025-02-06 05:30:00 05:09:54.59 Logon Error: 18456, Severity: 14, State: 8. 2025-02-06 10:39:54 2025-02-06 05:30:00 05:09:54.59 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 172.18.0.1] 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:54.98 Logon Error: 18456, Severity: 14, State: 8. 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:54.98 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 172.18.0.1] 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:54.99 Logon Error: 18456, Severity: 14, State: 8. 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:54.99 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 172.18.0.1] 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:55.13 Logon Error: 18456, Severity: 14, State: 8. 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:55.13 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 172.18.0.1] 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:55.17 Logon Error: 18456, Severity: 14, State: 8. 2025-02-06 10:39:55 2025-02-06 05:30:00 05:09:55.17 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 172.18.0.1]

    Inspect sql container configuration

    "Env": [ "ACCEPT_EULA=Y", "SA_PASSWORD=myPassw@rd", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "BUILD_VERSION=16.0.5100.7245", "PAL_BOOT_WITH_MINIMAL_CONFIG=1", "PAL_ENABLE_PAGE_ALIGNED_PE_FILE_CREATION=1", "LD_LIBRARY_PATH=/opt/mssql/lib"

    let me try to create an new project and check again.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    let me try to create an new project and check again.

    Thanks. I'll wait for your response.

Made with ❤️ on ABP v9.2.0-preview. Updated on February 13, 2025, 10:35