Can’t get the ModArcPostgreSql to work

Forum Home Forums Development and Integration Can’t get the ModArcPostgreSql to work

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13059
    zzz
    Participant

    Not sure what host is it referring to ?

    
    2023-07-27 22:19:37 [wsta][appstack][ACT] Start listener on port 10000
    2023-07-27 22:19:37 [wsta][appstack][INF] Archive in DAT format: /app/appstack/rapidscada6/Linux/scada/Archive
    2023-07-27 22:19:37 [wsta][appstack][INF] Archive copy in DAT format: /app/appstack/rapidscada6/Linux/scada/ArchiveCopy
    2023-07-27 22:19:37 [wsta][appstack][ERR] Error calling the MakeReady method of the CurCopy archive:
    System.ArgumentException: Host can't be null
       at Npgsql.NpgsqlConnectionStringBuilder.Validate()
       at Npgsql.NpgsqlConnection.GetPoolAndSettings()
       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()
    2023-07-27 22:19:37 [wsta][appstack][ACT] Delete outdated data from the Min archive older than 27/07/2022
    2023-07-27 22:19:37 [wsta][appstack][ACT] Delete outdated data from the Hour archive older than 27/07/2022
    2023-07-27 22:19:37 [wsta][appstack][ACT] Delete outdated data from the Events archive older than 27/07/2022
    2023-07-27 22:19:38 [wsta][appstack][ACT] Session with ID -7282601398215451423 created
    2023-07-27 22:19:38 [wsta][appstack][ACT] Client 127.0.0.1 connected
    

    The connection string displayed in module configure window (I didn’t use connection string)
    Host=127.0.0.1;Port=5432;Database=wstadb;Username=postgres;Password=[HiddenPassword]

    • This topic was modified 2 years, 2 months ago by zzz.
    #13064
    zzz
    Participant

    OK, I got it.
    In CurCopy Archive Properties>Current Archive Options I left the Use default connection as ticked. And the default connection is actually always an empty connection with all fields set to “”, (at least when checked in PostgreCAL.MakeReady()). Untick Use default connection fixes the problem.

    • This reply was modified 2 years, 2 months ago by zzz.
    #13067
    Mikhail
    Moderator

    ScadaInstanceConfig.xml format is changed. Therefore, default connection string became empty.

    Actual ScadaInstanceConfig.xml example

    <?xml version="1.0" encoding="utf-8"?>
    <ScadaInstanceConfig>
      <Culture>en-GB</Culture>
      <LogDir>R:\SCADA\</LogDir>
      <ActiveStorage>FileStorage</ActiveStorage>
      <Connection>
        <Name>Default Connection</Name>
        <DBMS>PostgreSQL</DBMS>
        <Server>localhost</Server>
        <Database>rapid_scada</Database>
        <Username>postgres</Username>
        <Password>4D83D8AEB31C1B40335A78AF3539DD22</Password>
        <ConnectionString />
      </Connection>
      <Storages>
        <Storage code="FileStorage">
          <ViewAvailable>false</ViewAvailable>
        </Storage>
        <Storage code="PostgreSqlStorage">
          <ViewAvailable>true</ViewAvailable>
          <WaitTimeout>30</WaitTimeout>
        </Storage>
      </Storages>
    </ScadaInstanceConfig>
    
    #13068
    Mikhail
    Moderator

    It is more handy to use the default connection for many different modules.

    #13072
    zzz
    Participant

    My setup was messed up I guess, I updated the ScadaServer/Comm/Web/Agent by replacing the folder and overwrite the new Config dir with the old one.

    But my ScadaAdmin was still old 6.0.0. could that be the reason ?

    There isn’t an immigration guide, or is there ? 😀

    • This reply was modified 2 years, 2 months ago by zzz.
    #13083
    Mikhail
    Moderator

    I recommend to use the latest versions of all apps.
    Update is described at https://rapidscada.net/docs/en/latest/installation/install-windows#update

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.