Forum Home › Forums › Runtime Bugs › Server Bugs › ModActiveDirectory – “Host can’t be null” error
- This topic has 7 replies, 2 voices, and was last updated 2 months, 1 week ago by
Mikhail.
-
AuthorPosts
-
April 29, 2026 at 4:18 pm #17898
AlexandruD
ParticipantHello,
I am experiencing a persistent issue with ModActiveDirectory (v6.1.1.0) while running Scada Server (v6.2.2.1) on a Windows environment (running as Local System Account).
The Problem:
Every time the Server starts, the log shows the following error:
Module ModActiveDirectory: Error creating database entities: Host can’t be nullWhat I have tried so far:
Database Permissions: Confirmed that the postgres user has full GRANT permissions on the public and project schemas. Other modules (like ModArcPostgreSql) connect to the database successfully.
Configuration Synchronization: Verified that ScadaInstanceConfig.xml contains the correct database connection strings (localhost / 127.0.0.1).
Manual Module Configuration: I manually edited ModActiveDirectory.xml in both the Instance folder and the main Installation folder, adding the <DbConnOptions> section as suggested by the source code found on GitHub:<DbConnOptions>
<Server>127.0.0.1</Server>
<Database>rapidscada</Database>
<Username>postgres</Username>
<Password>Password123!</Password>
<DBMS>PostgreSQL</DBMS>
</DbConnOptions>April 30, 2026 at 1:07 pm #17899
MikhailModeratorHi,
Right, you should specify the PostgreSQL connection options in the ScadaInstanceConfig.xml file. The module requires creating some tables in the database.
Password must be encoded. In the Administrator app, use Main Menu – Tools – Project Tools – Encrypt password.April 30, 2026 at 1:08 pm #17900
MikhailModeratorIf you need only validating passwords using ModActiveDirectory, you can disable searching in the database in the module options.
April 30, 2026 at 1:10 pm #17901
MikhailModeratorIf you upgraded Rapid SCADA from the older version, you need to upgrade ScadaInstanceConfig.xml as follows
<?xml version="1.0" encoding="utf-8"?> <ScadaInstanceConfig> <Culture></Culture> <LogDir></LogDir> <DefaultConnection>Default Connection</DefaultConnection> <ActiveStorage>FileStorage</ActiveStorage> <Connections> <Connection> <Name>Default Connection</Name> <DBMS>PostgreSQL</DBMS> <Server>localhost</Server> <Database>rapid_scada</Database> <Username>postgres</Username> <Password>4D83D8AEB31C1B40335A78AF3539DD22</Password> <ConnectionString /> </Connection> </Connections> <Storages> <Storage code="FileStorage"> <ViewAvailable>false</ViewAvailable> </Storage> <Storage code="PostgreSqlStorage"> <ViewAvailable>true</ViewAvailable> <WaitTimeout>30</WaitTimeout> </Storage> </Storages> </ScadaInstanceConfig>April 30, 2026 at 1:12 pm #17902
MikhailModeratorrapid_scada database should be created on the DB server.
April 30, 2026 at 2:33 pm #17905AlexandruD
ParticipantHi Mikhail, I updated ScadaInstanceConfig.xml exactly as you suggested, encrypted the password, and verified that the database exists on the PostgreSQL server. However, I still get ‘Host can’t be null’. Could this ‘Host’ refer to the LDAP server instead of the Database server, or is there another place where the connection string must be defined for version 6.2.2.1.
Just to clarify and provide more context: this is a clean installation of version 6.2.2.1, not an upgrade from an older version.April 30, 2026 at 4:10 pm #17907AlexandruD
ParticipantHi Mikhail,
Thank you very much for your support! After applying the settings exactly as you described, the module is now working correctly.
Password Encryption: Encrypting the database password using the Administrator -> Tools -> Project Tools utility.
Database alignment: Verifying that the database name in the XML matched the one created in PostgreSQL.
The problem was related to incorrect PostgreSQL user configuration. After fixing it, everything works correctly.The ‘Host can’t be null’ error is gone and the server starts perfectly now. Thanks again!
May 1, 2026 at 7:57 am #17909
MikhailModeratorHi,
Thank you for the update 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.