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

Questions about WAPT Server / Requests and help related to the WAPT server
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
Aleks
Messages: 2
Registration: March 2, 2020 - 2:00 PM

March 2, 2020 - 2:41 PM

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
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 2, 2020 - 6:05 PM

Hello,
do you have AppArmor enabled?
Regards,
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Aleks
Messages: 2
Registration: March 2, 2020 - 2:00 PM

March 3, 2020 - 09:51

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
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 3, 2020 - 4:04 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked