Forum Home › Forums › Understanding the Software › ModArcPostgreSql configuration
- This topic has 1 reply, 2 voices, and was last updated 8 hours, 39 minutes ago by
Mikhail.
-
AuthorPosts
-
July 31, 2026 at 7:56 am #18214
oley
ParticipantHi,
I’m trying to experiment with ModArcPostgreSql. I’ve activated the archive copies.
I have a PostgreSQL database that I’m already using with DrvDbImport:<DbLineConfig> <ConnectionOptions> <Name>DB</Name> <DBMS>PostgreSQL</DBMS> <Server>localhost</Server> <Database>scada_archive</Database> <Username>scada</Username> <Password>D5E507A149AA2E573510CFD38540755D</Password> <ConnectionString /> </ConnectionOptions> </DbLineConfig>I’ve configured ModArcPostgreSql.xml:
<ModArcPostgreSql> <Connections> <Connection> <Name>scada_archive</Name> <DBMS>PostgreSQL</DBMS> <Server>scada_archive</Server> <Database>localhost</Database> <Username>scada</Username> <Password>D5E507A149AA2E573510CFD38540755D</Password> <ConnectionString /> </Connection> </Connections> </ModArcPostgreSql>After loading the configuration, I get the following in the log:
2026-07-31 09:47:20 [SCADA2][SCADA2$][INF] Number of active channels for archiving: 3596 2026-07-31 09:47:20 [SCADA2][SCADA2$][INF] Number of active channels for sending commands: 209 2026-07-31 09:47:20 [SCADA2][SCADA2$][ACT] Compile the source code of scripts and formulas 2026-07-31 09:47:20 [SCADA2][SCADA2$][ACT] Added the following dependencies: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\netstandard.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.ComponentModel.Primitives.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Console.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Diagnostics.Process.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Linq.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Private.CoreLib.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Runtime.dll C:\Program Files\SCADA\ScadaServer\ScadaCommon.dll C:\Program Files\SCADA\ScadaServer\ScadaServerEngine.dll 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] The source code of scripts and formulas has been compiled successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Module ModArcBasic 6.2.1.0 loaded from file C:\Program Files\SCADA\ScadaServer\Mod\ModArcBasic.Logic.dll 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Module ModArcPostgreSql 6.2.2.0 loaded from file C:\Program Files\SCADA\ScadaServer\Mod\ModArcPostgreSql.Logic.dll 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Archive Cur initialized successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Archive Min initialized successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Archive Hour initialized successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Archive Events initialized successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Archive CurCopy initialized successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Archive MinCopy initialized successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Archive HourCopy initialized successfully 2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Start listener on port 10000 2026-07-31 09:47:22 [SCADA2][SCADA2$][INF] Archive in DAT format: C:\Program Files\SCADA\Archive 2026-07-31 09:47:22 [SCADA2][SCADA2$][INF] Archive copy in DAT format: C:\Program Files\SCADA\ArchiveCopy 2026-07-31 09:47:22 [SCADA2][SCADA2$][ERR] Error calling the MakeReady method of the CurCopy archive: Npgsql.PostgresException (0x80004005): 28P01: autoryzacja has�em nie powiod�a si� dla u�ytkownika "postgres" at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder<code>1.StateMachineBox</code>1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at Npgsql.Internal.NpgsqlConnector.AuthenticateSASL(List1 mechanisms, String username, Boolean async, CancellationToken cancellationToken)
at Npgsql.Internal.NpgsqlConnector.Authenticate(String username, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|213_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.PoolingDataSource.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.PoolingDataSource.<Get>g__RentAsync|33_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|42_0(Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnection.Open()
at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreCAL.CreateDbEntities()
at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreCAL.MakeReady()
at Scada.Server.Engine.ArchiveHolder.MakeReady()
Exception data:
Severity: KATASTROFALNY
SqlState: 28P01
MessageText: autoryzacja has�em nie powiod�a si� dla u�ytkownika “postgres”
File: auth.c
Line: 320
Routine: auth_failed
2026-07-31 09:47:22 [SCADA2][SCADA2$][ERR] Error calling the MakeReady method of the MinCopy archive:
Npgsql.PostgresException (0x80004005): 28P01: autoryzacja has�em nie powiod�a si� dla u�ytkownika “postgres”
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
at Npgsql.Internal.NpgsqlConnector.AuthenticateSASL(List`1 mechanisms, String username, Boolean async, CancellationToken cancellationToken)
at Npgsql.Internal.NpgsqlConnector.Authenticate(String username, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|213_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.PoolingDataSource.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.PoolingDataSource.<Get>g__RentAsync|33_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|42_0(Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnection.Open()
at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreHAL.CreateDbEntities()
at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreHAL.MakeReady()
at Scada.Server.Engine.ArchiveHolder.MakeReady()
Exception data:
Severity: KATASTROFALNY
SqlState: 28P01
MessageText: autoryzacja has�em nie powiod�a si� dla u�ytkownika “postgres”
File: auth.c
Line: 320
Routine: auth_failed
2026-07-31 09:47:22 [SCADA2][SCADA2$][ERR] Error calling the MakeReady method of the HourCopy archive:
Npgsql.PostgresException (0x80004005): 28P01: autoryzacja has�em nie powiod�a si� dla u�ytkownika “postgres”
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
at Npgsql.Internal.NpgsqlConnector.AuthenticateSASL(List`1 mechanisms, String username, Boolean async, CancellationToken cancellationToken)
at Npgsql.Internal.NpgsqlConnector.Authenticate(String username, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|213_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.PoolingDataSource.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.PoolingDataSource.<Get>g__RentAsync|33_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|42_0(Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnection.Open()
at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreHAL.CreateDbEntities()
at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreHAL.MakeReady()
at Scada.Server.Engine.ArchiveHolder.MakeReady()
Exception data:
Severity: KATASTROFALNY
SqlState: 28P01
MessageText: autoryzacja has�em nie powiod�a si� dla u�ytkownika “postgres”
File: auth.c
Line: 320
Routine: auth_failed
2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Delete outdated data from the Min archive older than 31/07/2025
2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Delete outdated data from the Hour archive older than 31/07/2025
2026-07-31 09:47:22 [SCADA2][SCADA2$][ACT] Delete outdated data from the Events archive older than 31/07/2025
2026-07-31 09:47:25 [SCADA2][SCADA2$][ACT] Session with ID -4818560138226408460 created
2026-07-31 09:47:25 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected
2026-07-31 09:47:25 [SCADA2][SCADA2$][ACT] User ScadaComm is successfully authenticated
2026-07-31 09:47:27 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 disconnected
2026-07-31 09:47:27 [SCADA2][SCADA2$][ACT] Session with ID 8294525968950795085 created
2026-07-31 09:47:27 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected
2026-07-31 09:47:27 [SCADA2][SCADA2$][ACT] User ScadaWeb is successfully authenticated
2026-07-31 09:47:28 [SCADA2][SCADA2$][ACT] Session with ID 3004394539199497732 created
2026-07-31 09:47:28 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected
2026-07-31 09:47:28 [SCADA2][SCADA2$][ACT] User ScadaComm is successfully authenticated
2026-07-31 09:47:31 [SCADA2][SCADA2$][ACT] Session with ID 8860261020809518373 created
2026-07-31 09:47:31 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected
2026-07-31 09:47:31 [SCADA2][SCADA2$][ACT] Session with ID -8483165810769162864 created
2026-07-31 09:47:31 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected
2026-07-31 09:47:31 [SCADA2][SCADA2$][ACT] User ScadaWeb is successfully authenticated
2026-07-31 09:47:31 [SCADA2][SCADA2$][ACT] User ScadaWeb is successfully authenticated
2026-07-31 09:47:32 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 disconnected`Question: What is the purpose of the connection entries in ScadaInstanceConfig.xml?
<Connection> <Name>MainConnection</Name> <DBMS>PostgreSQL</DBMS> <Server>localhost</Server> <Database>rapid_scada</Database> <Username>postgres</Username> <Password>4D83D8AEB31C1B40335A78AF3539DD22</Password> <ConnectionString /> </Connection> <Connection> <Name>ReserveConnection</Name> <DBMS>PostgreSQL</DBMS> <Server /> <Database /> <Username /> <Password /> <ConnectionString /> </Connection>I commented out those entries, but I see the following in the log:
2026-07-31 09:49:12 [SCADA2][SCADA2$][ACT] Server 6.2.2.1 started 2026-07-31 09:49:12 [SCADA2][SCADA2$][ACT] Storage FileStorage 6.4.0.0 loaded from file C:\Program Files\SCADA\ScadaServer\FileStorage.dll 2026-07-31 09:49:12 [SCADA2][SCADA2$][ACT] Start logic processing 2026-07-31 09:49:12 [SCADA2][SCADA2$][ACT] The configuration database has been read successfully 2026-07-31 09:49:12 [SCADA2][SCADA2$][INF] Number of active channels for archiving: 3596 2026-07-31 09:49:12 [SCADA2][SCADA2$][INF] Number of active channels for sending commands: 209 2026-07-31 09:49:12 [SCADA2][SCADA2$][ACT] Compile the source code of scripts and formulas 2026-07-31 09:49:12 [SCADA2][SCADA2$][ACT] Added the following dependencies: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\netstandard.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.ComponentModel.Primitives.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Console.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Diagnostics.Process.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Linq.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Private.CoreLib.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.29\System.Runtime.dll C:\Program Files\SCADA\ScadaServer\ScadaCommon.dll C:\Program Files\SCADA\ScadaServer\ScadaServerEngine.dll 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] The source code of scripts and formulas has been compiled successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Module ModArcBasic 6.2.1.0 loaded from file C:\Program Files\SCADA\ScadaServer\Mod\ModArcBasic.Logic.dll 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Module ModArcPostgreSql 6.2.2.0 loaded from file C:\Program Files\SCADA\ScadaServer\Mod\ModArcPostgreSql.Logic.dll 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Archive Cur initialized successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Archive Min initialized successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Archive Hour initialized successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Archive Events initialized successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Archive CurCopy initialized successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Archive MinCopy initialized successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Archive HourCopy initialized successfully 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Start listener on port 10000 2026-07-31 09:49:14 [SCADA2][SCADA2$][INF] Archive in DAT format: C:\Program Files\SCADA\Archive 2026-07-31 09:49:14 [SCADA2][SCADA2$][INF] Archive copy in DAT format: C:\Program Files\SCADA\ArchiveCopy 2026-07-31 09:49:14 [SCADA2][SCADA2$][ERR] Error calling the MakeReady method of the CurCopy archive: System.ArgumentException: Host can't be null at Npgsql.NpgsqlConnectionStringBuilder.PostProcessAndValidate() at Npgsql.NpgsqlConnection.SetupDataSource() at Npgsql.NpgsqlConnection.set_ConnectionString(String value) at Npgsql.NpgsqlConnection..ctor(String connectionString) at Scada.Server.Modules.ModArcPostgreSql.Logic.DbUtils.CreateDbConnection(DbConnectionOptions options) at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreCAL.MakeReady() at Scada.Server.Engine.ArchiveHolder.MakeReady() 2026-07-31 09:49:14 [SCADA2][SCADA2$][ERR] Error calling the MakeReady method of the MinCopy archive: System.ArgumentException: Host can't be null at Npgsql.NpgsqlConnectionStringBuilder.PostProcessAndValidate() at Npgsql.NpgsqlConnection.SetupDataSource() at Npgsql.NpgsqlConnection.set_ConnectionString(String value) at Npgsql.NpgsqlConnection..ctor(String connectionString) at Scada.Server.Modules.ModArcPostgreSql.Logic.DbUtils.CreateDbConnection(DbConnectionOptions options) at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreHAL.MakeReady() at Scada.Server.Engine.ArchiveHolder.MakeReady() 2026-07-31 09:49:14 [SCADA2][SCADA2$][ERR] Error calling the MakeReady method of the HourCopy archive: System.ArgumentException: Host can't be null at Npgsql.NpgsqlConnectionStringBuilder.PostProcessAndValidate() at Npgsql.NpgsqlConnection.SetupDataSource() at Npgsql.NpgsqlConnection.set_ConnectionString(String value) at Npgsql.NpgsqlConnection..ctor(String connectionString) at Scada.Server.Modules.ModArcPostgreSql.Logic.DbUtils.CreateDbConnection(DbConnectionOptions options) at Scada.Server.Modules.ModArcPostgreSql.Logic.PostgreHAL.MakeReady() at Scada.Server.Engine.ArchiveHolder.MakeReady() 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Delete outdated data from the Min archive older than 31/07/2025 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Delete outdated data from the Hour archive older than 31/07/2025 2026-07-31 09:49:14 [SCADA2][SCADA2$][ACT] Delete outdated data from the Events archive older than 31/07/2025 2026-07-31 09:49:17 [SCADA2][SCADA2$][ACT] Session with ID -3543597048850168304 created 2026-07-31 09:49:17 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected 2026-07-31 09:49:17 [SCADA2][SCADA2$][ACT] User ScadaComm is successfully authenticated 2026-07-31 09:49:19 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 disconnected 2026-07-31 09:49:19 [SCADA2][SCADA2$][ACT] Session with ID 6653323577797797207 created 2026-07-31 09:49:19 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected 2026-07-31 09:49:19 [SCADA2][SCADA2$][ACT] User ScadaWeb is successfully authenticated 2026-07-31 09:49:19 [SCADA2][SCADA2$][ACT] Session with ID 4883988930556440646 created 2026-07-31 09:49:19 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected 2026-07-31 09:49:19 [SCADA2][SCADA2$][ACT] User ScadaComm is successfully authenticated 2026-07-31 09:49:23 [SCADA2][SCADA2$][ACT] Session with ID 5145596323417268734 created 2026-07-31 09:49:23 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected 2026-07-31 09:49:23 [SCADA2][SCADA2$][ACT] Session with ID -8748568416616498698 created 2026-07-31 09:49:23 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 connected 2026-07-31 09:49:23 [SCADA2][SCADA2$][ACT] User ScadaWeb is successfully authenticated 2026-07-31 09:49:23 [SCADA2][SCADA2$][ACT] User ScadaWeb is successfully authenticated 2026-07-31 09:49:24 [SCADA2][SCADA2$][ACT] Client 127.0.0.1 disconnectedJuly 31, 2026 at 1:42 pm #18215
MikhailModeratorHi,
By default ScadaInstanceConfig.xml contains credentials for the user/password postgres/postgres
Try using the default version of ScadaInstanceConfig.xml and set the above login and password for the database. -
AuthorPosts
- You must be logged in to reply to this topic.