Forum Home › Forums › Installation Issues › SCADA-Web Installation › ModArcPostgreSql always connects to port 5432 instead of configured PostgreSQL p
- This topic has 11 replies, 2 voices, and was last updated 1 month ago by
Mikhail.
-
AuthorPosts
-
July 1, 2026 at 2:37 pm #18105
Andi
ParticipantHello,
I am trying to use Rapid SCADA 6.2.2.1 on Ubuntu Server with a PostgreSQL database running in a Docker container on a Synology NAS.
Environment:
– Rapid SCADA Server 6.2.2.1
– Ubuntu Server 24.04
– PostgreSQL 18.4 in Docker on Synology DSM
– Database host: 192.168.1.4
– Database port: 15432
– Database: rapidscada
– User: scadaThe PostgreSQL server is working correctly.
The following tests are successful:
– psql can connect successfully using host 192.168.1.4 and port 15432.
– The Deployment Profile database connection test succeeds when using a complete connection string:
Server=192.168.1.4;Port=15432;Database=rapidscada;User Id=scada;Password=…ScadaInstanceConfig.xml contains:
<Connection>
<Name>MainConnection</Name>
<DBMS>PostgreSQL</DBMS>
<Server>192.168.1.4</Server>
<Database>rapidscada</Database>
<Username>scada</Username>
<ConnectionString />
</Connection>The PostgreSQL connection itself works correctly.
However, after restarting ScadaServer, the archive modules always try to connect to:
192.168.1.4:5432
The log contains messages like:
Error calling the MakeReady method of the CurCopy archive:
Failed to connect to 192.168.1.4:5432
Connection refusedThe same happens for:
– CurCopy
– MinCopy
– HourCopy
– DayCopy
– EventsCopyThe important point is that the configured PostgreSQL server listens on port 15432, not on 5432.
Question:
Does ModArcPostgreSql in version 6.2.2.1 always use the default PostgreSQL port (5432)?
Is there another configuration location for the archive modules where the PostgreSQL port must be configured?
Or is this a known issue fixed in newer versions?
Thank you very much.
July 2, 2026 at 7:23 am #18107
MikhailModeratorHello,
Does ModArcPostgreSql in version 6.2.2.1 always use the default PostgreSQL port (5432)?
You can change the port in ScadaInstanceConfig.xml
Try set
Server to 192.168.1.4:15432
or specify the ConnectionString parameter.Is there another configuration location for the archive modules where the PostgreSQL port must be configured?
It is possible to add connections in the archive options. I would suggest using ScadaInstanceConfig.xml
July 2, 2026 at 3:03 pm #18108Andi
Participanthank you for your reply.
I already tried both suggestions.
1)
ScadaInstanceConfig.xml contains
<Server>192.168.1.4:15432</Server>
I verified the file on the Ubuntu server after deployment.
2)
I also tested using a complete ConnectionString
Server=192.168.1.4;Port=15432;Database=rapidscada;User Id=scada;Password=…
The deployment database connection test succeeds.
However, after restarting ScadaServer, the log still shows
Failed to connect to 192.168.1.4:5432
for CurCopy, MinCopy, HourCopy, DayCopy and EventsCopy.
You mentioned that it is possible to add connections in the archive options.
Could you please explain where these archive options are configured in Rapid SCADA 6.2.2.1?
Thank you very much.
July 3, 2026 at 11:17 am #18110Andi
ParticipantHello,
I found another configuration dialog that may be related.
In the archive properties of ModArcPostgreSql I opened:
Properties -> Database -> Manage Connections
This opens a PostgreSQL Connection Manager where I can create a dedicated connection with Server, Database, Username, Password and also a custom connection string including a different port.
Should I create a dedicated connection here (for example using server 192.168.1.4:15432) and disable “Use default connection”?
Or should ModArcPostgreSql always use the default connection defined in ScadaInstanceConfig.xml?
If needed, I can provide screenshots of the PostgreSQL Connection Manager dialog.
Thank you.
July 3, 2026 at 12:27 pm #18111
MikhailModeratorHello,
Should I create a dedicated connection here (for example using server 192.168.1.4:15432) and disable “Use default connection”?
Or should ModArcPostgreSql always use the default connection defined in ScadaInstanceConfig.xml?
Both are possible.
Deployment profile stores the connection options for itself only. Try changing the connection string in ScadaInstanceConfig.xmlJuly 3, 2026 at 9:48 pm #18115Andi
ParticipantHello Mikhail,
thank you again for your previous replies.
During the last days I performed some additional tests and I would like to ask one final question because I believe we have narrowed the problem down significantly.
Current situation
PostgreSQL is running correctly on my Synology NAS.
The PostgreSQL server listens on 192.168.1.4:15432.
psql connects successfully.
Rapid SCADA deployment to the Ubuntu server works correctly.
The project configuration is successfully deployed to Linux.I also tested the two methods you suggested:
1. Setting
<Server>192.168.1.4:15432</Server>in ScadaInstanceConfig.xml.
2. Using a complete
Server=192.168.1.4;Port=15432;Database=rapidscada;User Id=scada;Password=…connection string.
Unfortunately, after restarting ScadaServer the PostgreSQL archive modules still try to connect to
192.168.1.4:5432
for all archives (CurCopy, MinCopy, HourCopy, DayCopy and EventsCopy).
Additional observation
I found the Manage Connections dialog in the PostgreSQL archive options.
There I created a dedicated connection using the correct host and port (15432).
However, after deployment I searched the complete Linux installation and found that the port 15432 does not appear anywhere in the deployed configuration.
For example,
grep -R “15432” /opt/scada
returns no results.
The only database-related configuration found on Linux is ScadaInstanceConfig.xml, which currently contains only
<Server>192.168.1.4</Server>
and an empty
<ConnectionString />
My questionCould you please explain where the PostgreSQL connections created by Manage Connections are actually stored?
Are they stored inside the project database?
Are they deployed to the Linux runtime?
Or are they stored only on the Windows engineering computer?At the moment I cannot determine where the archive modules obtain the connection information that still causes them to use port 5432.
Thank you very much for your help.
July 6, 2026 at 12:36 pm #18119
MikhailModeratorHello,
Could you please explain where the PostgreSQL connections created by Manage Connections are actually stored?
They are stored in ModArcPostgreSql.xml in the Server configuration.
https://ibb.co/6jGy0gZAll my PostgreSQL instances use the default port. If you have a widely accessible PostgreSQL instance, I could try to connect to it.
-
This reply was modified 1 month, 1 week ago by
Mikhail.
July 6, 2026 at 12:39 pm #18120
MikhailModeratorI hope, together we could resolve this issue. I really want to help.
July 12, 2026 at 2:08 pm #18128Andi
ParticipantHello Mikhail,
First of all, I would like to sincerely thank you for all the time and effort you have invested in helping me so far.
Your previous explanations regarding the PostgreSQL configuration were extremely helpful and allowed me to successfully complete my Linux installation. I especially appreciate your willingness to even look into my specific project if necessary. That is really exceptional support, and I am very grateful for it.
While continuing my project, I have now come across another question regarding channel archives.
I noticed that every channel contains an Archive Mask and a Select Archives button.
For example, many of my temperature channels show an Archive Mask value of 17 in the channel table. However, when I click the corresponding Select Archives button, the dialog always opens with:
– Decimal value = 0
– all archive bits clearedThe same happens regardless of which channel I select.
Despite this, my minute values are correctly written to PostgreSQL (ModArcPostgreSql) and Grafana displays the historical data without any problems.
Therefore I am trying to understand how these settings actually work.
My questions are:
1. What is the difference between Archive Mask and Select Archives?
2. Which setting actually determines whether a channel is archived by ModArcPostgreSql?
3.Is it normal that the Select Archives dialog always opens with all bits cleared although the channel table shows values such as 17 or 81?
4. Is there a recommended way to define default properties for newly created channels (for example Input Formula CnlVal/10, display format, archive settings and event settings), so that these settings do not have to be entered manually for every new channel?
I would like to build a larger Rapid SCADA project, therefore I am trying to understand the intended workflow before creating hundreds of channels.
Thank you very much again for your excellent support.
Best regards,
Andre
July 13, 2026 at 11:39 am #18133
MikhailModeratorHello Andre,
How did you resolve the issue with PostgreSQL TCP port?
Please create new topics for new questions. Questions #1-3 could be in a one new topic, and question #4 in the other new topic.
July 13, 2026 at 7:28 pm #18136Andi
ParticipantHello Mikhail,
Thank you very much for your reply.
We finally solved the PostgreSQL connection issue by using a complete connection string, including the TCP port number, instead of only specifying the server name.
At first we thought that the connection was still not working, because we were looking for data in the wrong place. After some further investigation we realized that the archive data had actually already been written successfully into the PostgreSQL database.
So the connection problem is completely solved now.
Thank you again for your support!
July 14, 2026 at 9:27 am #18144
MikhailModeratorThanks for the information. It might be useful to others.
-
This reply was modified 1 month, 1 week ago by
-
AuthorPosts
- You must be logged in to reply to this topic.