Question

installation on RDS postgres

[ec2-user@ip-x-x-x-x ~]$ COMPlus_ThreadPool_ForceMinWorkerThreads=100 dotnet Terrasoft.WebHost.dll

2024-11-27 00:56:21,031 Application starting

Unhandled exception. System.Security.SecurityException: System login error. Error has been recorded in system log of the server. Please contact your system administrator.

---> Npgsql.PostgresException (0x80004005): 28000: no pg_hba.conf entry for host "", user "postgres", database "creatio", no encryption

   at Npgsql.NpgsqlConnector.DoReadMessage(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isPrependedMessage)

   at Npgsql.NpgsqlConnector.ReadMessage(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications)

   at Npgsql.NpgsqlConnector.ReadMessage(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications)

   at Npgsql.NpgsqlConnector.ReadExpecting[T](Boolean async)

   at Npgsql.NpgsqlConnector.Authenticate(String username, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)

   at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)

   at Npgsql.ConnectorPool.AllocateLong(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)

   at Npgsql.NpgsqlConnection.Open(Boolean async, CancellationToken cancellationToken)

   at Npgsql.NpgsqlConnection.Open()

   at Terrasoft.Core.DB.DBExecutor.b__23_0() in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/DB/DBExecutor.cs:line 224

   at Polly.Policy.<>c__DisplayClass109_0.b__0(Context ctx, CancellationToken ct)

   at Polly.Policy.<>c__DisplayClass103_0.b__1(Context ctx, CancellationToken ct)

   at Polly.NoOp.NoOpEngine.Implementation[TResult](Func`3 action, Context context, CancellationToken cancellationToken)

   at Polly.Policy.<>c.b__103_0(Action`2 action, Context context, CancellationToken cancellationToken)

   at Polly.Policy.Execute(Action`2 action, Context context, CancellationToken cancellationToken)

   at Polly.Policy.Execute(Action action)

   at Terrasoft.Core.DB.RetryDBOperation.Execute(Action operation) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/DB/RetryDBOperation.cs:line 29

   at Terrasoft.Core.DB.DBExecutor.RetryOnFailure(Action action) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/DB/DBExecutor.cs:line 432

   at Terrasoft.Core.DB.DBExecutor.get_DBConnection() in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/DB/DBExecutor.cs:line 223

   at Terrasoft.Core.DB.DBExecutor.PingDB(UserConnection userConnection) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/DB/DBExecutor.cs:line 1126

   --- End of inner exception stack trace ---

 

 

I get this error when i'm trying to start the application..the connectivity is all fine fro the server..

Like 0

Like

1 comments

Hello!

 

The error you encountered suggests that the application could not connect to the PostgreSQL database because of a misconfiguration in the pg_hba.conf file.

 

Error message: "28000: no pg_hba.conf entry for host "", user "postgres", database "creatio", no encryption" indicates that either The client IP or hostname does not match any rule in the pg_hba.conf file, or The database connection parameters (host, user, or authentication method) do not align with the allowed configurations in the PostgreSQL server.

 

Possible causes:

  1. 1) The server does not have a rule allowing connections for the postgres user to the creatio database from the host making the request
  2. 2) The host parameter appears empty (host "" in the error). This might happen if the application’s configuration is missing or incorrect
  3. 3) The PostgreSQL server is not accessible from the host where the application runs

 

To resolve the issue, please try the following:

  1. 1) Update pg_hba.conf file by adding a rule to allow the required connections. For example,
  2. # TYPE     DATABASE          USER           ADDRESS     METHOD
  3. host        youdatabase      postgres             IP                md5

2) Verify Connection String, specifically:

<add name="db" connectionString="Server=[Database server name];Port=31436;Database=[Database name]; User ID=[Name of the user who will connect to the DB];password=[Password of the user who will connect to the DB];Timeout=500; CommandTimeout=400;MaxPoolSize=1024;" />

 

Have a nice day!
 

Show all comments