Connection to database & pow authentification failed

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Connection to database & pow authentification failed

Post by rdv4rjm » 13 May 18 14:16

Running High Sierra 10.13.4.
Installed PSU PostgreSQL.
Running fine on local computer.
Cannot connect from client: Connection to database failed (PostgreSQL: FATAL: password authentication failed for user "idimager_main"

Been fighting this for days.
Beyond my knowledge.

If someone would have solved same issue, I would appreciate some help.

Thanks.

Ronald.

Hert
Posts: 20993
Joined: 13 Sep 03 7:24

Re: Connection to database & pow authentification failed

Post by Hert » 13 May 18 17:42

Try to start with a new database after dropping the current database one and also dropping the idimager_main user. You can use the PostgreSQL's pgAdmin tool for that.
On the client, hold down Ctrl+Cmd+Alt and while holding the combination down, start Photo Supreme.
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 6:37

Thanks Hert for your suggestion.

I made a clean install of OSX High Sierra v. 10.13.4
Only software installed: PostgreSQL 10, Photo Supreme.
Followed installation instructions carefully.
Tested Postgres from terminal, and created database.
Started PSU. Inserted license. Updated it.
Works fine.
This is for the server.
Turned Firewall OFF on server.

Tried pinging from client and from server; both tests were successful.

Client:
Computer runs on Windows 8
Installed PSU and started it holding Ctrl & Alt. Properties window opens.
Held CTL and once ready, tried connecting to same database using same parameters as I used on server. Server name: Server's hostname.

Tested from 2 client computers running windows.
All 3 computers are hard wired to same network switch.

The database reports: Connection to database failed (PostgreSQL: could not connect to server: connection refused(0x0000274D/10061)
Is the server running on host "hostname" (xxx.xxx.x.xx) and accepting TCP/IP connections on port 5432?

Would there be a way to know for sure port 5432 is in fact opened, and able to receive from lan?

This is my third week starting, trying to connect to this server.

Ronald V.

Username
Posts: 139
Joined: 18 Feb 18 22:21

Re: Connection to database & pow authentification failed

Post by Username » 20 May 18 8:23

Take a look in the "pg_hba.conf" config file.
There you will see what kind of connections are allowed from as well as trusted.

You will see that I Trust connections from the server itself and applications running on server:
local
127.0.0.1

I also allow encrypted authenticated (md5) connections from my local network as well as my VPN-network to be able to reach the PhotoSupreme server from remote locations.


# TYPE DATABASE USER ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 192.168.21.0/24 md5
host all all 10.111.111.0/24 md5
- I'm the user

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 14:08

I inserted suggested modifications.
The attachment Screen Shot 2018-05-20 at 8.58.18 AM.png is no longer available
Restarted server.
Postgres refuses to start.
Screen Shot 2018-05-20 at 8.58.18 AM.png
pg_hba.conf
Screen Shot 2018-05-20 at 8.58.18 AM.png (29.45 KiB) Viewed 173 times

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 14:15

Screen Shot 2018-05-20 at 8.59.21 AM.png
Postgres Log file
Screen Shot 2018-05-20 at 8.59.21 AM.png (45.86 KiB) Viewed 173 times

Username
Posts: 139
Joined: 18 Feb 18 22:21

Re: Connection to database & pow authentification failed

Post by Username » 20 May 18 16:01

Hmm

If you revert to the previous config and then use the servers IP instead of host name.
Can you ping the server up from a client?
- I'm the user

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 16:40

Yes I can

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 16:41

I can from Command com successfully

Username
Posts: 139
Joined: 18 Feb 18 22:21

Re: Connection to database & pow authentification failed

Post by Username » 20 May 18 18:04

Ahh.

On the second line under IPv4 connections you have a capital H in "host".
Thats why it can't load.
Make sure all "host" are spelled with lower case letters only.
- I'm the user

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 18:56

Hey, you got an eye.
Yes this was keeping server from starting.
Now it runs, though I still can't connect from client using or hostname or server ip.

get same message:

The database reports: Connection to database failed (PostgreSQL: could not connect to server: connection refused(0x0000274D/10061)
Is the server running on host "hostname" (192.168.8.24) and accepting TCP/IP connections on port 5432?

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 18:57

Postgres log file

2018-05-20 13:47:22.103 EDT [651] LOG: listening on IPv4 address "127.0.0.1", port 5432
2018-05-20 13:47:22.104 EDT [651] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2018-05-20 13:47:22.286 EDT [652] LOG: database system was shut down at 2018-05-20 08:49:29 EDT
2018-05-20 13:47:22.297 EDT [651] LOG: database system is ready to accept connections

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 20 May 18 19:11

In case this would help:

From Mac Console seconds after correction of error and while trying to connect from 2 different clients.

Don't mean much to me.
There is signs of negotiation with incoming traffic, if I am not mistaking.
Attachments
console_01.txt
(186.24 KiB) Downloaded 4 times

Username
Posts: 139
Joined: 18 Feb 18 22:21

Re: Connection to database & pow authentification failed

Post by Username » 20 May 18 19:32

You can test one thing.

Edit the pg_hba.conf and set trust all instead of md5.
That would give everyone on the network full access to the DBs. Nothing you want to keep but good for testing and see if its an auth problem.

Another way is to actually disable the postgres you have installed and download the postgresapp instead. https://postgresapp.com
It's an all in one postgres server where you can point out where you want to store the postgres db etc.
You can set up multiple servers, different version and stop them in any way you like.

It's very good for testing.
- I'm the user

rdv4rjm
Posts: 15
Joined: 08 May 18 22:29

Re: Connection to database & pow authentification failed

Post by rdv4rjm » 21 May 18 6:20

The attachment Screen Shot 2018-05-21 at 12.21.50 AM.png is no longer available
The attachment Screen Shot 2018-05-21 at 1.12.35 AM.png is no longer available
Screen Shot 2018-05-21 at 1.12.35 AM.png
Screen Shot 2018-05-21 at 1.12.35 AM.png (59.81 KiB) Viewed 108 times
Still no connection.
Tried pinging from both clients: Packets sent: 4 received: 4. lost: 0

Post Reply