logo

Starting the ELMA Server: Typical Errors and How to Fix Them

This article describes the most common errors and ways of fixing them. 

1. Error:  Error initializing ELMA configuration ---> System.InvalidOperationException: Cannot check database exists ---> System.Data.SqlClient.SqlException: User login failed "IIS APPPOOL\Elma3-Standart".

  • Reason: You are logged in to the IIS server under an account without administrator permissions.
  • Solution: To fix this IIS server error, open the Internet Information Services (IIS) Manager (in Start - Administrative Tools). On the Application Pools tab open Advanced Settings of the ELMA3-Express pool (in the context menu). In the Process Model table, in the Identity field, specify the LocalSystem account or another account with administrator permissions. Restart the web server.

2. ErrorThe underlying connection was closed: An expected error occurred on a receive: Unable to read data from the transport connection: Remote host has disconnected.: Remote host has disconnected

  • Reason: The ELMA server has been started with insufficient access permissions
  • Solution: If the server is Cassini-based, press win+R and run the services.msc command. Find the ELMA Web Server, right click on it, select Properties, and open the Log On tab. If the server is IIS-based, then go to the IIS Manager, open the Connections window, find the Application Pools item, and the ELMA server pool. Right-click on the on the pool and select Advanced settings. In the Identity field, specify the LocalSystem account or another account with administrator permissions. Restart the web server.

3. Error: *System.UnauthorizedAccessException: Access to the path "С:\ELMA3-Express\UserConfig\configuration.packges" is denied.

  • Solution: Delete the *.packages file from the UserConfig folder.

4. Error: The server is not started because of an error

  • Reason: The database names in SQL Server Management Studio and in the configuration.config file do not match.
  • Solution: Change the database name in the configuration.config file

5. Error: Error creating a database backup copy

  • Reason: Not enough disk space
  • Solution: Free up the disk space

6. ErrorEleWise.ELMA.Runtime.Db.DbStructureException: Error updating the database structure ---> System.Data.DataException: Failed to execute request DROP INDEX UK_principal_name ON sysdiagrams ---> System.Data.SqlClient.SqlException: DROP INDEX is unacceptable in the index "sysdiagrams.UK_principal_name". It is used to force apply the UNIQUE KEY restriction.

  • Reason: The System Tables section in SQL Server Management Studio must not contain tables.
  • Solution: Stop the ELMA server and open SQL Server Management Studio, in the list select the required database and expand the list of tables. The System Tables section must not contain tables - if there are tables, delete them. Start the ELMA server. 

7. Error: Error caused by active connections to the database

  • Reason: After restoring a database from a backup, a server with different time may still have information on an active connection.
  • Solution: Create a backup copy and execute a query to the database. Query: Delete from DB_ACTIVECONNECTIONS

8. Error: EleWise.ELMA.Runtime.Db.DbStructureException: Error updating the database structure ---> NHibernate.TransactionException: Commit failed with SQL exception ---> FirebirdSql.Data.FirebirdClient.FbException: unsuccessful metadata update

object INDEX is in use ---> FirebirdSql.Data.Common.IscException: unsuccessful metadata update

9. Error: *EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Error initializing the ELMA configuration ---> System.InvalidOperationException: Unable to connect to the database ---> FirebirdSql.Data.FirebirdClient.FbException: Unable to complete network request to host "127.0.0.1". ---> FirebirdSql.Data.Common.IscException: Unable to complete network request to host "127.0.0.1".

  • ReasonAn error in the configuration.config file, line <add name="MainDB" connectionString="data source=127.0.0.1;initial catalog={CONFIGDIR}\base.fdb;user id=sysdba;password=masterkey;character set=UNICODE_FSS;dialect=3;server type=0" />
  • SolutionMake sure that there are no misprints and the correct character case is used in the line <add name="MainDB" connectionString="data source=127.0.0.1;initial catalog={CONFIGDIR}\base.fdb;user id=sysdba;password=masterkey;character set=UNICODE_FSS;dialect=3;server type=0" />.

10. Error: *EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Error initializing the ELMA configuration ---> System.InvalidOperationException: Unable to connect to the database ---> System.Data.SqlClient.SqlException: Unable to open the "ELMA" database, requested by the login. Unable to log in. 
User log in error "NT AUTHORITY\system".

  • Reason: You logged in to the Cassini server under an account without administrator permissions.
  • Solution: Start the ELMA server under an account with Windows administrator permissions. Go to Control Panel -> Administrative Tools -> Services, find the ELMA web server, right-click on it, select Properties, in the opened window switch to the Log On tab, check the This account box and enter the login and password of the account with administrator permissions.

Addition: MS SQL 2008 and higher server error Login failed for user ’NT AUTHORITY\system’. Reason: unable to open explicitly specified "ELMA" database. [CLIENT: <local machine>]. Error: 18456, severity: 14, status: 38.

  • Reason: The authentication is correct, the server is started with the administrator permissions, but the database is not available (or there are no permissions).
  • Solution: Add the sysadmin role to the NT AUTHORITY\system group on the SQL server. Open the Microsoft SQL Server Management Studio, Security section - > Logins and go to the properties of the NT AUTHORITY\system group. Check the sysadmin box in the server role menu.

11. Error: *EleWise.ELMA.Runtime.Exceptions.ConfigurationInitializeException: Error initializing the ELMA configuration ---> System.InvalidOperationException: Unable to connect to the database ---> System.Data.SqlClient.SqlException: Solution CREATE DATABASE is forbidden in the "master" database.
Failed to connect the file "F:\ELMA3-Standart\UserConfig\ELMA3.mdf" as the "ELMA3" database.

  • Reason: An error in the configuration.config file, line AttachDbFilename={CONFIGDIR}\ELMA3.mdf;
  • Solution: Delete the line "AttachDbFilename={CONFIGDIR}\ELMA3.mdf" in the configuration.config file. Save the file and restart the web server.

12. Error: When working in the web part, a dialog box with the Start preconditions check failed error is displayed. 

An error also occurs when signing in to the Designer.

  • Reason: You can see an empty parameter in the error dialog box – server name.

  • Solution: Connect to the MSSQL server as administrator and execute the SQL-query:
 
EXEC sp_dropserver N'elma-local-loop'
GO

EXEC sp_addlinkedserver N'elma-local-loop', N' ', N'SQLNCLI', N'localhost\SQLSERVER2014'
GO

EXEC sp_serveroption [elma-local-loop], N'remote proc transaction promotion', 'false'
EXEC sp_serveroption [elma-local-loop], N'rpc out', 'true'
GO​

where localhost\SQLSERVER2014 – the name of the database server.

To make sure that the problem is solved, run the following query:

select * from sys.servers where lower([name]) = 'elma-local-loop'

The result will look like this:

 

13. Error. Error initializing the ELMA configuration: The database version <version name> does not meet the minimum requirements (provided version – <used database version>, required at least <database version, required for correct ELMA operation>

  • Reason – the used database version does not meet the minimum system requirements for the used ELMA edition.
  • Solution – update the used database version to the one required for the ELMA edition.