View Issue Details

IDProjectCategoryView StatusLast Update
0005436SOGowith SOGopublic2021-12-03 17:45
ReporterSam Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Platform[Server] LinuxOSDebianOS Version8 (Jessie)
Product Version5.3.0 
Summary0005436: failed to acquire channel for URL: postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_user_profile
Description

It's a new install. I just finish create database and modify the configuration file /var/lib/pgsql/data/pg_hba.conf like explained on the configuration guide.

I had made install on nightly buid version, then move to production build but no change.

Here is my sogo.conf part :
SOGoProfileURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_user_profile";
OCSFolderInfoURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_folder_info";
OCSSessionsFolderURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_sessions_folder";

And /etc/postgresql/13/main/pg_hba.conf : ( up on the file, just after some comments )
host   sogo   sogo     127.0.0.1/32     md5

It seems like there is no rights to access...

TagsNo tags attached.

Activities

Sam

Sam

2021-11-29 15:42

reporter   ~0015646

It's a debian 11 Version.

francis

francis

2021-11-29 16:09

administrator   ~0015647

Is PostgreSQL listening on port 5432?

Sam

Sam

2021-11-30 07:34

reporter   ~0015649

I think so, in /etc/services I can see :
postgresql 5432/tcp postgres # PostgreSQL Database

Sam

Sam

2021-11-30 07:39

reporter   ~0015650

There is an issue with pg_hba.conf :
Nov 29 17:27:51 sogo postgresql@13-main[16876]: 2021-11-29 17:27:51.312 CET [16881] LOG: type de connexion « host » invalide
Nov 29 17:27:51 sogo postgresql@13-main[16876]: 2021-11-29 17:27:51.312 CET [16881] CONTEXTE : ligne 79 du fichier de configuration « /etc/postgresql/13/main/pg_hba.conf »
Nov 29 17:27:51 sogo postgresql@13-main[16876]: 2021-11-29 17:27:51.312 CET [16881] FATAL: n'a pas pu charger pg_hba.conf
Nov 29 17:27:51 sogo postgresql@13-main[16876]: 2021-11-29 17:27:51.313 CET [16881] LOG: le système de base de données est arrêté

The line 79 is the first non comment line and the line I add :
host sogo sogo 127.0.0.1/32 md5

Christian Mack

Christian Mack

2021-11-30 09:45

developer   ~0015651

You are missing the following as first line:

local all postgres peer

Without that line as first entry, you can not connect with postgresql tools, and pg_hba.conf needs at least one type "peer" entry.

Sam

Sam

2021-11-30 10:32

reporter   ~0015652

Hello Christian,

Ok I see these line "local all postgres peer" and move "host sogo sogo 127.0.0.1/32 md5" just after that line.

Now there is this errors in syslog :
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.951 CET [18661] LOG: démarrage de PostgreSQL 13.5 (Debian 13.5-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.951 CET [18661] LOG: en écoute sur IPv6, adresse « ::1 », port 5432
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.951 CET [18661] LOG: en écoute sur IPv4, adresse « 127.0.0.1 », port 5432
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.953 CET [18661] LOG: écoute sur la socket Unix « /var/run/postgresql/.s.PGSQL.5432 »
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.955 CET [18661] LOG: type de connexion « host  » invalide
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.955 CET [18661] CONTEXTE : ligne 93 du fichier de configuration « /etc/postgresql/13/main/pg_hba.conf »
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.955 CET [18661] FATAL: n'a pas pu charger pg_hba.conf
Nov 30 11:25:31 sogo postgresql@13-main[18656]: 2021-11-30 11:25:30.956 CET [18661] LOG: le système de base de données est arrêté

Line 93 is always our added line "host sogo sogo 127.0.0.1/32 md5"

Christian Mack

Christian Mack

2021-11-30 12:53

developer   ~0015653

Do you have a user sogo and a database sogo in your postgresql already?

Sam

Sam

2021-11-30 13:32

reporter   ~0015655

Yes, I follow the guide, here is the Sogo database :
postgres@sogo:~$ psql
psql (13.5 (Debian 13.5-0+deb11u1))
Saisissez « help » pour l'aide.

postgres=# \l
Liste des bases de données
Nom | Propriétaire | Encodage | Collationnement | Type caract. | Droits d'accès
-----------+--------------+----------+-----------------+--------------+-----------------------
postgres | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 |
sogo | sogo | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 |
template0 | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | fr_FR.UTF-8 | fr_FR.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres

Christian Mack

Christian Mack

2021-11-30 13:49

developer   ~0015656

What do you get for
netstat -tulpen|grep 5432

Sam

Sam

2021-11-30 14:33

reporter   ~0015658

root@sogo:~# netstat -tulpen|grep 5432
tcp 0 0 127.0.0.1:5432 0.0.0.0: LISTEN 108 678020 18854/postgres
tcp6 0 0 ::1:5432 :::
LISTEN 108 678019 18854/postgres

Sam

Sam

2021-11-30 14:35

reporter   ~0015659

And nothing if I add host sogo sogo 127.0.0.1/32 md5 to /etc/postgresql/13/main/pg_hba.con

Sam

Sam

2021-12-02 07:26

reporter   ~0015661

Do you thinks it's a Debian 11 new beahavior issue?

Christian Mack

Christian Mack

2021-12-02 07:42

developer   ~0015663

I checked documentation for posgres 13 and there where no changes in pg_hba.conf I could see.

Could you please check if postgresql is installed completely?

dpkg -l |grep postgresql

Sam

Sam

2021-12-02 08:56

reporter   ~0015664

Here is the result :
root@sogo:~# dpkg -l |grep postgresql
ii postgresql 13+225 all ob ject-relational SQL database (supported version)
ii postgresql-13 13.5-0+deb11u1 amd64 Th e World's Most Advanced Open Source Relational Database
ii postgresql-client 13+225 all fr ont-end programs for PostgreSQL (supported version)
ii postgresql-client-13 13.5-0+deb11u1 amd64 fr ont-end programs for PostgreSQL 13
ii postgresql-client-common 225 all ma nager for multiple PostgreSQL client versions
ii postgresql-common 225 all Po stgreSQL database-cluster manager
ii sope4.9-gdl1-postgresql 4.9.r1664.20211118 amd64 Po stgreSQL connector for SOPE's fork of the GNUstep database environment

Christian Mack

Christian Mack

2021-12-03 08:33

developer   ~0015669

That is OK too.
Strange.

Just a feeble hunch.
Perhaps there is some invisible character in it.
Could you delete the complete word "host" and the following whitespace and then retype it again?

Sam

Sam

2021-12-03 13:35

reporter   ~0015670

Good intuition, that was that!
Thanks a lot Christian!

Issue History

Date Modified Username Field Change
2021-11-29 15:40 Sam New Issue
2021-11-29 15:42 Sam Note Added: 0015646
2021-11-29 16:09 francis Note Added: 0015647
2021-11-30 07:34 Sam Note Added: 0015649
2021-11-30 07:39 Sam Note Added: 0015650
2021-11-30 09:45 Christian Mack Note Added: 0015651
2021-11-30 10:32 Sam Note Added: 0015652
2021-11-30 12:53 Christian Mack Note Added: 0015653
2021-11-30 13:32 Sam Note Added: 0015655
2021-11-30 13:49 Christian Mack Note Added: 0015656
2021-11-30 14:33 Sam Note Added: 0015658
2021-11-30 14:35 Sam Note Added: 0015659
2021-12-02 07:26 Sam Note Added: 0015661
2021-12-02 07:42 Christian Mack Note Added: 0015663
2021-12-02 08:56 Sam Note Added: 0015664
2021-12-03 08:33 Christian Mack Note Added: 0015669
2021-12-03 13:35 Sam Note Added: 0015670
2021-12-03 17:45 francis Status new => closed
2021-12-03 17:45 francis Resolution open => no change required