SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Posted: 2017-03-09 08:54 AM
Link copied. Please paste this link to share this article on your social media post.
I've just installed SmartConnector v2.2.127:
I'm able to install it, and the service is running, but I can't seem to connect to 'http://localhost:8082'.
Database:
LocalDB
Installation settings:
Logs:
2017-03-09 11:47:41.0558,Info,Utility,<no principal>,InstallDatabase,
2017-03-09 11:47:41.1238,Debug,Utility,<no principal>,Installing a new database:,(localdb)\MSSQLLocalDB,SmartConnector,sa,
2017-03-09 11:47:41.1238,Debug,Utility,<no principal>,UtilityConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Utility.exe.config,
2017-03-09 11:47:41.1518,Debug,Utility,<no principal>,ServiceConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Service.exe.config,
2017-03-09 11:48:00.5468,Debug,Utility,<no principal>,ServiceConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Service.exe.config,
2017-03-09 11:48:00.5468,Debug,Utility,<no principal>,UpdateServiceConfigurationDbConnectionString,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Service.exe.config,
2017-03-09 11:48:00.5468,Debug,Utility,<no principal>,UtilityConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Utility.exe.config,
2017-03-09 11:48:00.5468,Debug,Utility,<no principal>,UpdateServiceConfigurationDbConnectionString,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Utility.exe.config,
2017-03-09 11:48:00.5658,Debug,Utility,<no principal>,Updating config file runtime section from upgrade file,
2017-03-09 11:48:08.7048,Debug,Utility,<no principal>,Adding required permissions for Windows Authentication,
2017-03-09 11:48:09.9298,Debug,Utility,<no principal>,Add Sample ProcessConfigurations,
2017-03-09 11:48:10.0688,Debug,Utility,<no principal>,Add Sample Ews Server,
2017-03-09 11:48:10.0688,Debug,Database,<no principal>,SeedEwsServer,EwsServer,
2017-03-09 11:48:10.2998,Debug,Database,<no principal>,SeedEwsServer,EwsUser,
2017-03-09 11:48:10.3978,Debug,Database,<no principal>,SeedEwsServer,Data,
2017-03-09 11:48:10.8428,Debug,Utility,<no principal>,Add Sample EndpointConfigurations,
2017-03-09 11:48:11.1498,Debug,Utility,<no principal>,Add Sample Schedule,
2017-03-09 11:48:11.3548,Debug,Utility,<no principal>,Installation complete,
2017-03-09 11:48:17.8288,Status,Service,<no principal>,SmartConnector is starting,
2017-03-09 11:48:17.8678,Info,Service,<no principal>,Cleaning up orphaned ParameterSet instances,
2017-03-09 11:48:18.1608,Status,Service,<no principal>,Spinning up WorkerManager,
2017-03-09 11:48:18.1608,Status,WorkerManager,<no principal>,Mongoose WorkerManager running with 5 Processor threads.,
2017-03-09 11:48:18.3028,Status,WorkerManager,<no principal>,Worker manager has started.,
2017-03-09 11:48:18.3618,Status,Service,<no principal>,Attaching context listeners,
2017-03-09 11:48:18.8378,Status,Service,<no principal>,PortalAddress disabled because there is no defined endpoint.,
2017-03-09 11:49:15.4398,Status,Service,<no principal>,SmartConnector is stopping,
2017-03-09 11:49:15.4398,Status,Service,<no principal>,Stopping REST Providers,
2017-03-09 11:49:15.4528,Status,Service,<no principal>,Detaching context listeners,
2017-03-09 11:49:15.4528,Status,Service,<no principal>,Stopping EWS Servers,
2017-03-09 11:49:15.4778,Status,Service,<no principal>,Stopping WorkerManager,
2017-03-09 11:49:18.6948,Status,WorkerManager,<no principal>,Worker manager has stopped.,
2017-03-09 11:49:27.2398,Status,Service,<no principal>,SmartConnector is starting,
2017-03-09 11:49:27.2788,Info,Service,<no principal>,Cleaning up orphaned ParameterSet instances,
2017-03-09 11:49:27.5688,Status,Service,<no principal>,Spinning up WorkerManager,
2017-03-09 11:49:27.5728,Status,WorkerManager,<no principal>,Mongoose WorkerManager running with 5 Processor threads.,
2017-03-09 11:49:27.7558,Status,WorkerManager,<no principal>,Worker manager has started.,
2017-03-09 11:49:27.8328,Status,Service,<no principal>,Attaching context listeners,
2017-03-09 11:49:28.2318,Status,Service,<no principal>,PortalAddress disabled because there is no defined endpoint.,
Link copied. Please paste this link to share this article on your social media post.
Josh,
Thanks for the input. There was another report of this issue on the forum (SmartConnector Portal is not available. ) that is very similar (if not exact).
Try reinstalling the database as instructed in that thread. Not sure why this is occurring (I use LocalDB myself and have never seen this) but I will certainly investigate further.
Posted: 2017-03-09 10:42 AM
Link copied. Please paste this link to share this article on your social media post.
I attempted to reinstall the LocalDB database.
steps:
uninstall LocalDB
stop the SmartConnector service
reinstall LocalDB
I ran Mongoose.Utility.exe /CreateDatabase
restarted the service.
I'm still unable to connect to the web portal.
I also tried reinstalling both.
steps:
uninstall SmartConnector
uninstall LocalDB
reinstall LocalDB
reinstall SmartConnector
still isn't responding.
logs look the same as before.
Link copied. Please paste this link to share this article on your social media post.
As I've said, we do use LocalDB for development here so this should work.
I'm wondering if its just the connection string you're using for LocalDB (the one you entered in the installer. You can read it from the "mongoose.service.exe.config" file in the install folder.
For LocalDB, it should look something like this:
Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Service;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnector.mdf"
NOTE: There are two connections, one for SmartConnectorDb and one for SmartConnectorUserDb. Both should be identical. Also, if you make any changes, make those changes in the "mongoose.utility.exe.config" file as well.
Posted: 2017-03-09 12:26 PM
Link copied. Please paste this link to share this article on your social media post.
my config differed a little from what you have:
connectionString = "Server=(localdb)\MSSQLLocalDB;Initial Catalog=SmartConnector;Integrated Security=SSPI"
I stopped the service, and changed this to:
connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Service;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnector.mdf"
upon restarting the service, it is still not letting me connect to the localhost:8082
Posted: 2017-03-09 12:27 PM
Link copied. Please paste this link to share this article on your social media post.
for reference, here is my current Mongoose.Service.exe.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"></sectionGroup>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<add name="SmartConnectorDb" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Service;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnector.mdf" />
<add name="SmartConnectorUserDb" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Service;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnector.mdf" />
</connectionStrings>
<appSettings>
<add key="EncryptionKey" value="C1D0A0C9EAB5D88D1BEE3A50243E3A032DFA82B380515504021EADEDCAF496A9" />
</appSettings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<runtime>
<bypassTrustedAppStrongNames enabled="false" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Link copied. Please paste this link to share this article on your social media post.
I think I entered that incorrectly. Let's reset here.
Please try the following:
<connectionStrings>
<add name="SmartConnectorDb" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Service;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnector.mdf" />
<add name="SmartConnectorUserDb" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Users;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnectorUser.mdf" />
</connectionStrings>
Posted: 2017-03-09 12:53 PM
Link copied. Please paste this link to share this article on your social media post.
Step 3 failed:
C:\Program Files (x86)\Schneider Electric\SmartConnector>mongoose.utility.exe /CreateDatabase
Info,Utility,<no principal>,CreateDatabase
Error,Utility,<no principal>,Cannot create file 'C:\ProgramData\SmartConnector\SmartConnector.mdf' because it already exists. Change the file path or the file name, and retry the operation.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext`1 c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass1a.<CreateDatabaseFromScript>b__19(DbConnection conn)
at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass33.<UsingConnection>b__32()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)
at System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action`1 act)
at System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act)
at System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript)
at System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
at System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
at System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase()
at System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection)
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext)
at System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState)
at System.Data.Entity.Database.Create(DatabaseExistenceState existenceState)
at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)
at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c)
at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
at Mongoose.Service.Data.MongooseDbContext.WireUpEncryption()
at Mongoose.Service.Data.MongooseDbContext..ctor(Boolean automaticDecryption)
at Mongoose.Service.UtilityHelper.DeleteDatabase_Internal()
,["Deleting MongooseDbContext"]
Debug,Utility,<no principal>,ServiceConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Service.exe.config
Debug,Utility,<no principal>,UpdateServiceConfigurationDbConnectionString,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Service.exe.config
Debug,Utility,<no principal>,UtilityConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Utility.exe.config
Debug,Utility,<no principal>,UpdateServiceConfigurationDbConnectionString,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Utility.exe.config
Debug,Utility,<no principal>,Cannot upgrade config file runtime section because runtime.xml file not found at: C:\Program Files (x86)\Schneider Electric\SmartConnector\runtime.xml
Error,Utility,<no principal>,Cannot create file 'C:\ProgramData\SmartConnector\SmartConnector.mdf' because it already exists. Change the file path or the file name, and retry the operation.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext`1 c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass1a.<CreateDatabaseFromScript>b__19(DbConnection conn)
at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass33.<UsingConnection>b__32()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)
at System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action`1 act)
at System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act)
at System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript)
at System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
at System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
at System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase()
at System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection)
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at Mongoose.Service.UtilityHelper.UpdateDatabase_Internal(Boolean windowsLogIn, Boolean domainUser)
at Mongoose.Service.UtilityHelper.CreateDatabase(Boolean addSampleData, Boolean windowsLogIn, Boolean domainUser)
,[]
Error,Utility,<no principal>,Cannot create file 'C:\ProgramData\SmartConnector\SmartConnector.mdf' because it already exists. Change the file path or the file name, and retry the operation.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext`1 c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass1a.<CreateDatabaseFromScript>b__19(DbConnection conn)
at System.Data.Entity.SqlServer.SqlProviderServices.<>c__DisplayClass33.<UsingConnection>b__32()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)
at System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action`1 act)
at System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act)
at System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript)
at System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
at System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)
at System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase()
at System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection)
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at Mongoose.Service.UtilityHelper.UpdateDatabase_Internal(Boolean windowsLogIn, Boolean domainUser)
at Mongoose.Service.UtilityHelper.CreateDatabase(Boolean addSampleData, Boolean windowsLogIn, Boolean domainUser)
at Mongoose.Utility.Program.TestableMain(String[] args)
at Mongoose.Utility.Program.Main(String[] args)
,[]
Posted: 2017-03-09 12:56 PM
Link copied. Please paste this link to share this article on your social media post.
to work around this, i have renamed the files SmartConnector.mdf and SmartConnector_log.ldf
Link copied. Please paste this link to share this article on your social media post.
Well CreateDatabase runs DeleteDatabase first so clearly that step failed. Could be something has it locked. You can manually delete the database files yourself. They are in the C:\ProgramData\SmartConnector folder. If you can't, something has the DB locked. Might need to reboot to clear that. But make sure that the service doesn't auto-start.
Posted: 2017-03-09 01:02 PM
Link copied. Please paste this link to share this article on your social media post.
I was able to complete all the steps.
unfortunately, now the service seems to crash shortly after being started.
logs are now showing:
2017-03-09 15:58:44.3813,Status,Service,<no principal>,SmartConnector is starting,
2017-03-09 15:58:44.4203,Info,Service,<no principal>,Cleaning up orphaned ParameterSet instances,
2017-03-09 15:58:44.7343,Status,Service,<no principal>,Spinning up WorkerManager,
2017-03-09 15:58:44.7343,Status,WorkerManager,<no principal>,Mongoose WorkerManager running with 5 Processor threads.,
2017-03-09 15:58:44.9773,Status,WorkerManager,<no principal>,Worker manager has started.,
2017-03-09 15:58:45.0503,Status,Service,<no principal>,Attaching context listeners,
2017-03-09 15:58:45.3653,Error,Service,<no principal>,The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications.
at SqlDependencyProcessDispatcher.SqlConnectionContainer..ctor(SqlConnectionContainerHashHelper hashHelper, String appDomainKey, Boolean useDefaults)
at SqlDependencyProcessDispatcher.Start(String connectionString, String& server, DbConnectionPoolIdentity& identity, String& user, String& database, String& queueService, String appDomainKey, SqlDependencyPerAppDomainDispatcher dispatcher, Boolean& errorOccurred, Boolean& appDomainStart, Boolean useDefaults)
at SqlDependencyProcessDispatcher.StartWithDefault(String connectionString, String& server, DbConnectionPoolIdentity& identity, String& user, String& database, String& service, String appDomainKey, SqlDependencyPerAppDomainDispatcher dispatcher, Boolean& errorOccurred, Boolean& appDomainStart)
at System.Data.SqlClient.SqlDependency.Start(String connectionString, String queue, Boolean useDefaults)
at Mongoose.Service.Notifications.EntityChangeNotifier.AddConnectionString(String cs)
at Mongoose.Service.Notifications.EntityChangeNotifier`2..ctor(Expression`1 query)
at Mongoose.Service.Mongoose.StartDbContextNotificationListeners()
at Mongoose.Service.Mongoose.OnStart(String[] args)
,[],
Posted: 2017-03-09 01:03 PM
Link copied. Please paste this link to share this article on your social media post.
I will try rebooting the pc, and see if that sorts something out
Posted: 2017-03-09 01:25 PM
Link copied. Please paste this link to share this article on your social media post.
rebooting did not fix the issue
Link copied. Please paste this link to share this article on your social media post.
To be honest, while we use LocalDB for dev work, it's not meant for production so installer testing around that was probably minimal. The installer only interacts with the Utility and the configs anyway.
The error you are seeing is because the LocalDB instance you're referencing in the config files doesn't exist on your machine.
Should look something like this:
What ever is listed (and it depends on what VS version you're using and/or what updates you've installed) is what needs to go in the config files. If MSSQLLocalDB isn't there (as I suspect) then update the config setting to what is there and then run the "CreateDatabase" step again.
It this doesn't work, we're going to need to do a WebEx or something.
Posted: 2017-03-09 02:36 PM
Link copied. Please paste this link to share this article on your social media post.
Alright, I have followed your steps, and here are my results:
Posted: 2017-03-09 02:49 PM
Link copied. Please paste this link to share this article on your social media post.
It may be useful to know that I went to the trouble to completely uninstall all SQL components, as well as Visual Studio before installing LocalDB (I had to reinstall Visual Studio to follow the above instructions).
We're exploring LocalDB with the goal of producing as minimal a deployment of SmartConnector as possible, so as to simplify installation.
In a perfect world, SmartConnector would have an option to deploy its own local database, further simplifying deployment, while still leaving the option of hosting on an existing SQL server
Link copied. Please paste this link to share this article on your social media post.
I was able to reproduce what you are experiencing on a test machine. There are definitely issues with the installer when attempting to use LocalDB. We'll have to look at that for future releases but you can certainly get this configured and operational manually after the installer runs. Here are the steps I used to get this operational.
Let's assume that you have run the installer and the service is NOT running. Then follow these steps.
Thanks for your patience on this.
<connectionStrings>
<add name="SmartConnectorDb" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Service;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnector.mdf" />
<add name="SmartConnectorUserDb" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=SmartConnector.Users;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\SmartConnectorUser.mdf" />
</connectionStrings>
Posted: 2017-03-10 06:58 AM
Link copied. Please paste this link to share this article on your social media post.
sorry for the delay.
I have attempted the above steps.
I'm observing a problem creating the database 'SmartConnector.Users',
and the SmartConnectorService crashes upon startup, complaining about ServiceBroker not being enabled
relevant logs:
2017-03-10 09:46:07.4614,Status,Service,<no principal>,SmartConnector is stopping,
2017-03-10 09:46:07.4614,Status,Service,<no principal>,Stopping REST Providers,
2017-03-10 09:46:07.4731,Status,Service,<no principal>,Detaching context listeners,
2017-03-10 09:46:07.4731,Status,Service,<no principal>,Stopping EWS Servers,
2017-03-10 09:46:07.5013,Status,Service,<no principal>,Stopping WorkerManager,
2017-03-10 09:46:08.2684,Status,WorkerManager,<no principal>,Worker manager has stopped.,
2017-03-10 09:48:16.9602,Info,Utility,<no principal>,CreateDatabase,
2017-03-10 09:48:27.2743,Debug,Utility,<no principal>,ServiceConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Service.exe.config,
2017-03-10 09:48:27.2743,Debug,Utility,<no principal>,UpdateServiceConfigurationDbConnectionString,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Service.exe.config,
2017-03-10 09:48:27.2842,Debug,Utility,<no principal>,UtilityConfigFilePath,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Utility.exe.config,
2017-03-10 09:48:27.2842,Debug,Utility,<no principal>,UpdateServiceConfigurationDbConnectionString,C:\Program Files (x86)\Schneider Electric\SmartConnector\Mongoose.Utility.exe.config,
2017-03-10 09:48:27.2842,Debug,Utility,<no principal>,Cannot upgrade config file runtime section because runtime.xml file not found at: C:\Program Files (x86)\Schneider Electric\SmartConnector\runtime.xml,
2017-03-10 09:48:35.7054,Debug,Utility,<no principal>,Add Sample ProcessConfigurations,
2017-03-10 09:48:35.8471,Debug,Utility,<no principal>,Add Sample Ews Server,
2017-03-10 09:48:35.8471,Debug,Database,<no principal>,SeedEwsServer,EwsServer,
2017-03-10 09:48:36.0967,Debug,Database,<no principal>,SeedEwsServer,EwsUser,
2017-03-10 09:48:36.2017,Debug,Database,<no principal>,SeedEwsServer,Data,
2017-03-10 09:48:36.5979,Debug,Utility,<no principal>,Add Sample EndpointConfigurations,
2017-03-10 09:48:37.0139,Debug,Utility,<no principal>,Add Sample Schedule,
2017-03-10 09:48:37.1942,Debug,Utility,<no principal>,Database Created,
2017-03-10 09:49:09.8470,Error,Service,<no principal>,Cannot attach the file 'C:\ProgramData\SmartConnector\SmartConnectorUser.mdf' as database 'SmartConnector.Users'.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext`1.IsIdentityV1Schema(DbContext db)
at Mongoose.Service.Portal.Authentication.MongooseUserDbContext.Initialize()
at Mongoose.Service.Mongoose.InitializeUserDbContext()
,["InitializeUserDbContext.Initialize() failed. If this occurs in the runtime the user DB may not be present or is corrupted."],
2017-03-10 09:49:10.2600,Status,Service,<no principal>,SmartConnector is starting,
2017-03-10 09:49:10.2600,Info,Service,<no principal>,Cleaning up orphaned ParameterSet instances,
2017-03-10 09:49:10.6087,Status,Service,<no principal>,Spinning up WorkerManager,
2017-03-10 09:49:10.6087,Status,WorkerManager,<no principal>,Mongoose WorkerManager running with 5 Processor threads.,
2017-03-10 09:49:10.8286,Status,WorkerManager,<no principal>,Worker manager has started.,
2017-03-10 09:49:10.9098,Status,Service,<no principal>,Attaching context listeners,
2017-03-10 09:49:11.0346,Error,Service,<no principal>,The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications.
at SqlDependencyProcessDispatcher.SqlConnectionContainer..ctor(SqlConnectionContainerHashHelper hashHelper, String appDomainKey, Boolean useDefaults)
at SqlDependencyProcessDispatcher.Start(String connectionString, String& server, DbConnectionPoolIdentity& identity, String& user, String& database, String& queueService, String appDomainKey, SqlDependencyPerAppDomainDispatcher dispatcher, Boolean& errorOccurred, Boolean& appDomainStart, Boolean useDefaults)
at SqlDependencyProcessDispatcher.StartWithDefault(String connectionString, String& server, DbConnectionPoolIdentity& identity, String& user, String& database, String& service, String appDomainKey, SqlDependencyPerAppDomainDispatcher dispatcher, Boolean& errorOccurred, Boolean& appDomainStart)
at System.Data.SqlClient.SqlDependency.Start(String connectionString, String queue, Boolean useDefaults)
at Mongoose.Service.Notifications.EntityChangeNotifier.AddConnectionString(String cs)
at Mongoose.Service.Notifications.EntityChangeNotifier`2..ctor(Expression`1 query)
at Mongoose.Service.Mongoose.StartDbContextNotificationListeners()
at Mongoose.Service.Mongoose.OnStart(String[] args)
,[],
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.