Subscribe to this thread
Home - General / All posts - connection failure with PostgreSQL 14
vincent

1,956 post(s)
online
#15-Feb-22 13:46

Hi,

I tried to connect from M8 and M9 to my newly installed PostgreSQL 14 server. Both versions are returning : "authentication method 10 not supported".

Any idea about what is wrong ?

It may be related to the SCRAM-SHA-256 password authentication method. Should I change it to MD5 ?

I have been to connect with ArcGIS 8.1, ArcGIS Pro 2.8, QGIS 3.16 and Excel. I'm surprised that I cannot with Manifold.

Thank you.

rk
518 post(s)
#15-Feb-22 14:37

You shouldn't have to change to old MD5 method.

Which libpq.dll Manifold loads? M9 Log window shows this.

Can you test with psql?

With M9 try this, I use it all the time for convenience.

You have to create 2 files

"%APPDATA%\postgresql\pgpass.conf"

123.145.167.189:5432:db_name:yourname:yourpw

"%APPDATA%\postgresql\pg_service.conf"

# comment

[some-name-in-servicefile]

host=123.145.167.189

port=5432

user=yourname

dbname=db_name

and 1 environment variable

PGSERVICEFILE=C:\Users\Riivo\AppData\Roaming\postgresql\pg_service.conf

On address line write just

service=some-name-in-servicefile

Attachments:
pgservicefile.png

adamw

10,011 post(s)
#16-Feb-22 01:07

It seems that you have multiple versions of LIBPQ.DLL and the one that wins in the case of 9 is outdated. Find out where 9 loads LIBPQ.DLL from (see the log window), then either update it in that location or switch the location to point to where the more modern version that works for ArcGIS / QGIS / etc, is.

vincent

1,956 post(s)
online
#22-Feb-22 11:52

then either update it in that location

I did. I took the one from PostgreSQL 14. Now I get something like "Cannot connect to database"

switch the location to point to where the more modern version that works for ArcGIS / QGIS / etc, is.

Where ? How ? I tried with REGSVR32 and I had no luck.

Thank you.

adamw

10,011 post(s)
#23-Feb-22 03:23

When loading DLLs for database clients, 9 first tries to search the Bin (or Bin64, depending on whether you are launching the 32-bit or the 64-bit MANIFOLD.EXE) folder in the install location, then the Shared folder in the install location, then all locations in the PATH variable.

You can see the exact path to the DLL that 9 is trying to use in the log window.

Regarding this:

I did. I took the one from PostgreSQL 14. Now I get something like "Cannot connect to database"

I am assuming we are talking about updating LIBPQ.DLL in some subfolder under ~\Bin64. Two things come to mind: (a) you copied the DLL with the wrong bitness (a 32-bit one), or (b) the LIBPQ.DLL that you copied references other DLLs and those remain outdated (or missing).

There are DLLs for PostgreSQL on the downloads page for 9, scroll down to "DLLS FOR POPULAR OPEN SOURCE DBMS PACKAGES". Try using those.

mathva30 post(s)
#20-Jun-22 07:30

Hi Vincent and all others

I wonder if you managed to solve the problem

I have the same problem (Cannot connect to data source) with the M8 64bit when trying to connect with additional computers that have a new Manifold license.

We already have three computers with the same operating system with which I connect to Manifold to the database via the Database Console and »PostgreSQL Data Source« without any problems.

Interestingly, I even managed to connect once but after restarting the program the problem reappeared

I also tried to find some Bin, Bin64 or Libpq.dll in my folders as it mentions "adamw" without success.

The only Libpq.dll file is inside the Qgis folder but I don't think it affects the performance of Manifold.

Any idea?

Thanks and best regards, Matias

adamw

10,011 post(s)
#20-Jun-22 16:45

Bin / Bin64 are for Manifold 9, you say you are using Manifold 8.

Locate all DLLs named LIBPQ.DLL on the system that can connect to PostgreSQL (you can do this by opening a command prompt, then running DIR /B /S LIBPQ.DLL from the root folder of each drive). Do the same on the system that is experiencing issues. Note the differences. Compare PATH variables as well.

The reason for the issue is most likely either (a) the PATH does not contain a folder with LIBPQ.DLL and so Manifold 8 cannot load one, or (b) the PATH contains one or more folders with LIBPQ.DLL and the first such folder contains a wrong DLL -- typically either a 32-bit DLL where a 64-bit is needed, or an outdated DLL.

mathva30 post(s)
#22-Jun-22 06:17

Thank you for your answer adamw

As I mentioned in previos post the only LIBPQ.DLL in working computers as well on non working is under QGIS/BIN directory.

Nonworking machine is new and clean, without firewall or antivirus programs instaled.

So I don't think is problem in LIPPQ.DLL. Manifold 8 doesn't have one inside instalation folder.

adamw

10,011 post(s)
#22-Jun-22 07:39

Is the folder containing LIBPQ.DLL mentioned in the PATH variable? An easy way to check is to launch command prompt and run the following command:

WHERE LIBPQ.DLL

The command will search for LIBPQ.DLL in the PATH and then either print its location or tell that it could not be found. In the latter case, adjust your PATH variable to include the folder where LIBPQ.DLL is located.

It would be best to run the above command both on the machine where you have no issues with Manifold 8 connecting to the PostgreSQL database as well as on the machine where there are issues prior to doing any changes, and compare the results.

mathva30 post(s)
#22-Jun-22 09:16

Thank you adamw thousant times.

On new comp there were no PATH variable pointing on LIBPQ.DLL

I make a new path on QGIS LIBPQ.DLL and works

Best regards

lionel

972 post(s)
#24-Jun-22 17:14
  • DIR /b /s
  • the/b tells the command dir that it doesn't want the additional information.. just the filenames.
  • The /s tells the command dir to include all the files and subdirectories (subfolders) in that folder. ( i understand now that directory can be view like a file , libpq.dll is a file but is a directory because it contain files , in a way libpq.dll can be understand like a zip file !!) .

.

  • PROGRAMMING IS NOT INTUITIVE
  • .
DIR /b /s

By default,where searchesthe current directory and thepathsthat are specified in thePATHenvironment variable.

Microsoft command "bat"? => C> echo %PATH%

Microsoft command powershell => PS> $env:path.split(";")

Attachments:
powserhelle_showPATH_byline.png


INFOGRAPHY union , LINK doc , API, deepl & keyboard shortcut

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.