Starts in:
1 DAY
9 HRS
1 MIN
56 SEC
Starts in:
1 D
9 H
1 M
56 S
Open Closed

Error Creating Tenant Database. #269


User avatar
0
ian@order2invoice.com created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v2.9.0X
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:

[14:38:36 INF] Migrating schema for TestTenant tenant database... [14:38:37 ERR] Instance failure. System.InvalidOperationException: Instance failure. at Microsoft.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover, SqlAuthenticationMethod authType, SqlAuthenticationProviderManager sqlAuthProviderManager) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) 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, SqlAuthenticationProviderManager sqlAuthProviderManager) at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, 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 where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerDatabaseCreator.<>c__DisplayClass20_0.<b__0>d.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerDatabaseCreator.<>c__DisplayClass20_0.<b__0>d.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.ExistsAsync(CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) at Orion.EntityFrameworkCore.EntityFrameworkCoreOrionDbSchemaMigrator.MigrateAsync() in C:\Code\Orion\aspnet-core\src\Orion.EntityFrameworkCore.DbMigrations\EntityFrameworkCore\EntityFrameworkCoreOrionDbSchemaMigrator.cs:line 28 at Orion.Data.OrionDbMigrationService.MigrateDatabaseSchemaAsync(Tenant tenant) in C:\Code\Orion\aspnet-core\src\Orion.Domain\Data\OrionDbMigrationService.cs:line 84 at Orion.Data.OrionDbMigrationService.MigrateAsync() in C:\Code\Orion\aspnet-core\src\Orion.Domain\Data\OrionDbMigrationService.cs:line 63 at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.b__0(Task t)

at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Volo.Abp.Threading.AsyncHelper.RunSync(Func1 action) ** at Orion.DbMigrator.Program.Main(String[] args) in C:\Code\Orion\aspnet-core\src\Orion.DbMigrator\Program.cs:line 28**

  • Steps to reproduce the issue: I have tried multiple connection strings including the one used for initial migration and keep getting this error?

Host string used for Intial migrations: "Server=DESKTOP-L1E8946\SQLEXPRESS; Trusted_Connection=True; Database=ORION"

Tring used when getting the error above: "Server=DESKTOP-L1E8946\SQLEXPRESS; Trusted_Connection=True; Database=TestTenant"


5 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi

    Please See https://stackoverflow.com/questions/17650482/instance-failure-error-while-connection-string-is-correct Does the solution here work for you?

  • User Avatar
    0
    ian@order2invoice.com created

    Unfortnately no. I had already tried that.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce your problem, If you use other database server, will this problem occur?

  • User Avatar
    0
    ian@order2invoice.com created

    I have tries numerous connection string to servers I am using in other projects and the same thing is happening. To clarify, I am running the Migrator app.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I know you use the Migrator app, but this does not seem to be a problem with abp. The problem is with your database server.

    I mean if you use other database server, will get this problem? .

    Did you try use Microsft SqlServer Management Studio to connection database server?.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06