Page 1 of 1

WAPT Community 1.8 installation on LINUX DEBIAN buster 10.2 - psql error 5432

Published: March 2, 2020 - 2:41 PM
by Aleks
Hello,

I'm trying out the WAPT Community version before trying the Enterprise version.

I'm following the software installation documentation on Debian, but I'm encountering an installation problem when running the installation script: /opt/wapt/waptserver/scripts/postconf.sh.
I checked the forum before posting this but didn't find a solution I could test.

Do you have any idea what the problem might be with psql? Is it a firewall issue? Do I need to manually modify a psql configuration file? :?

Thanks in advance! ;)

I'm getting the following error as root:

Synchronizing state of postgresql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable postgresql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Traceback (most recent call last):
File "/opt/wapt/waptserver/scripts/postconf.py", line 702, in
main()
File "/opt/wapt/waptserver/scripts/postconf.py", line 423, in main
ensure_postgresql_db(db_name=server_config['db_name'],db_owner=server_config['db_name'],db_password=server_config['db_password'])
File "/opt/wapt/waptserver/scripts/postconf.py", line 191, in ensure_postgresql_db
val = run(""" sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';" """, cwd='/opt/wapt')
File "/opt/wapt/waptserver/scripts/postconf.py", line 66, in run
return subprocess.check_output(*args, shell=True, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ' sudo -u postgres psql template1 -c " select usename from pg_catalog.pg_user where usename='wapt';" ' returned non-zero exit status 2


debug:

root@WAPTC:~# psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

-------------

service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2020-03-02 14:13:19 CET; 13min ago
Main PID: 486 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 2346)
Memory: 0B
CGroup: /system.slice/postgresql.service

Tue 02 2:13:19 PM WAPTC.****.*** systemd[1]: Starting PostgreSQL RDBMS...
Tue 02 2:13:19 PM WAPTC.****.*** systemd[1]: Started PostgreSQL RDBMS.

----------

root@WAPTC:~# localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: n/a
X11 Layout: fr
X11 Model: pc105
X11 Variant: latin9

Re: WAPT Community 1.8 installation on LINUX DEBIAN buster 10.2 - psql error 5432

Published: March 2, 2020 - 6:05 PM
by dcardon
Hello,
do you have AppArmor enabled?
Regards,
Denis

Re: WAPT Community 1.8 installation on LINUX DEBIAN buster 10.2 - psql error 5432

Published: March 3, 2020 - 9:51 AM
by Aleks
Hello,

yes, Apparmor is enabled by default on Debian 10...

this is a fresh installation whose sole purpose is WAPT.

I suppose I need to find the command lines for Apparmor + PostgreSQL + WAPT?
:arrow: Would it be possible to include a typical example in the Debian server installation documentation?
Or is it better to disable Apparmor? :?

Thanks for the suggestion.

Best regards,
Aleks

Re: WAPT Community 1.8 installation on LINUX DEBIAN buster 10.2 - psql error 5432

Published: March 3, 2020 - 4:04 PM
by dcardon
Hello,

the AppArmor configuration of a standard Debian 10 installation shouldn't be a problem. That's why there probably aren't many posts about it. If the socket exists and the PostgreSQL server is listening on it, the issue is probably there; check the permissions, etc. (I'm more used to encountering this type of problem with SELinux).

Regards,

Denis