Postgresql is dead since 54 years

My YunoHost server

Hardware: Intel NUC i3, 32 GB RAM, 2 TB SSD, Mini-PC
YunoHost version: 11.2.10.1 (stable)
I have access to my server : Through SSH and through the webadmin and direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : maybe
If yes, please explain:
My first install: Because I couldn´t install yunohost directly on my nuc, i first installed debian 11 and then yunohost over it. Worked fine, but postgresql has never worked

Description of my issue

postgresql is dead and i cant restart it over webinterface. so I can´t install further app that need postgresql.

Here is the error message

How can fix postgresql?

Many thanx in advance!

Sounds like it could just be that an app installed postgres in the past but didnt remove it properly …

What does sudo dpkg --list | grep postgresql tells ?

What about sudo systemctl status postgresql | cat ?

1 Like

Hi Aleks,
thanks for your help!

sudo dpkg --list | grep postgresql:

sudo systemctl status postgresql | cat:

Additional the log-file, when I try to install tooljet:

Logs

args:
app: tooljet
force: false
label: undefined
no_remove_on_failure: false
ended_at: 2024-02-27 10:38:48.416089
error: An error occured inside the script snippet
interface: api
operation: app_install
parent: null
related_to:

    • app
    • tooljet
      started_at: 2024-02-27 10:37:37.511918
      success: false
      yunohost_version: 11.2.10.1

============

2024-02-27 11:37:37,516: INFO - tooljet wird installiert…
2024-02-27 11:37:37,520: INFO - Provisioning sources…
2024-02-27 11:37:37,521: DEBUG - Prefetching asset main: https://github.com/ToolJet/ToolJet/archive/refs/tags/v2.30.3.tar.gz
2024-02-27 11:38:36,538: INFO - Provisioning system_user…
2024-02-27 11:38:36,710: INFO - Provisioning install_dir…
2024-02-27 11:38:36,722: INFO - Provisioning permissions…
2024-02-27 11:38:36,978: DEBUG - Berechtigung ‘tooljet.main’ aktualisiert
2024-02-27 11:38:37,082: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere URL, die mit der Berechtigung ‘tooljet’ verknüpft ist
2024-02-27 11:38:37,288: DEBUG - Berechtigung ‘tooljet.main’ erstellt
2024-02-27 11:38:37,288: DEBUG - Vollständiges Log dieser Operation: ‘Erstelle Berechtigung ‘tooljet’
2024-02-27 11:38:37,575: DEBUG - Berechtigung ‘tooljet.main’ aktualisiert
2024-02-27 11:38:37,575: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere Zugriffe für Berechtigung ‘tooljet’
2024-02-27 11:38:37,790: DEBUG - Nothing to update in LDAP
2024-02-27 11:38:37,791: DEBUG - Berechtigung ‘tooljet.main’ aktualisiert
2024-02-27 11:38:37,892: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere URL, die mit der Berechtigung ‘tooljet’ verknüpft ist
2024-02-27 11:38:38,005: DEBUG - The permission database has been resynchronized
2024-02-27 11:38:38,169: DEBUG - SSOwat-Konfiguration neu generiert
2024-02-27 11:38:38,172: INFO - Provisioning ports…
2024-02-27 11:38:38,193: INFO - Provisioning apt…
2024-02-27 11:38:38,206: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “./provision_or_update_apt” 7>&1’]’
2024-02-27 11:38:38,211: DEBUG - + source /usr/share/yunohost/helpers
2024-02-27 11:38:38,211: DEBUG - +++ set +o
2024-02-27 11:38:38,211: DEBUG - +++ grep xtrace
2024-02-27 11:38:38,212: DEBUG - ++ readonly ‘XTRACE_ENABLE=set -o xtrace’
2024-02-27 11:38:38,212: DEBUG - ++ XTRACE_ENABLE=‘set -o xtrace’
2024-02-27 11:38:38,224: DEBUG - + ynh_abort_if_errors
2024-02-27 11:38:38,224: DEBUG - + trap ynh_exit_properly EXIT
2024-02-27 11:38:38,224: DEBUG - + ynh_install_app_dependencies postgresql postgresql-contrib
2024-02-27 11:38:38,225: DEBUG - + local ‘dependencies=postgresql postgresql-contrib’
2024-02-27 11:38:38,225: DEBUG - ++ echo ‘postgresql postgresql-contrib’
2024-02-27 11:38:38,225: DEBUG - ++ sed ‘s/([^<=>])\ ([^(])/\1, \2/g’
2024-02-27 11:38:38,226: DEBUG - + dependencies=‘postgresql, postgresql-contrib’
2024-02-27 11:38:38,226: DEBUG - + local ‘dependencies=postgresql, postgresql-contrib’
2024-02-27 11:38:38,226: DEBUG - ++ ynh_read_manifest --manifest_key=version
2024-02-27 11:38:38,235: DEBUG - ++ ‘[’ ‘!’ -e ‘’ ‘]’
2024-02-27 11:38:38,235: DEBUG - ++ ‘[’ -e /var/cache/yunohost/app_tmp_work_dirs/app_s7167912/manifest.json ‘]’
2024-02-27 11:38:38,236: DEBUG - ++ ‘[’ -e /var/cache/yunohost/app_tmp_work_dirs/app_s7167912/manifest.toml ‘]’
2024-02-27 11:38:38,236: DEBUG - ++ manifest=/var/cache/yunohost/app_tmp_work_dirs/app_s7167912/manifest.toml
2024-02-27 11:38:38,236: DEBUG - ++ echo /var/cache/yunohost/app_tmp_work_dirs/app_s7167912/manifest.toml
2024-02-27 11:38:38,236: DEBUG - ++ grep -q ‘.json$’
2024-02-27 11:38:38,237: DEBUG - ++ cat /var/cache/yunohost/app_tmp_work_dirs/app_s7167912/manifest.toml
2024-02-27 11:38:38,237: DEBUG - ++ python3 -c ‘import json, toml, sys; print(json.dumps(toml.load(sys.stdin)))’
2024-02-27 11:38:38,237: DEBUG - ++ jq .version --raw-output
2024-02-27 11:38:38,279: DEBUG - + local version=2.30.3~ynh1
2024-02-27 11:38:38,279: DEBUG - + ‘[’ -z 2.30.3~ynh1 ‘]’
2024-02-27 11:38:38,279: DEBUG - + ‘[’ 2.30.3~ynh1 == null ‘]’
2024-02-27 11:38:38,279: DEBUG - + local dep_app=tooljet
2024-02-27 11:38:38,279: DEBUG - + [[ postgresql, postgresql-contrib =~ [<=>] ]]
2024-02-27 11:38:38,280: DEBUG - ++ echo postgresql, postgresql-contrib
2024-02-27 11:38:38,280: DEBUG - ++ grep -oP ‘(?<=php)[0-9.]+(?=-|>|)’
2024-02-27 11:38:38,280: DEBUG - ++ sort -u
2024-02-27 11:38:38,281: DEBUG - + local specific_php_version=
2024-02-27 11:38:38,281: DEBUG - + grep --quiet php
2024-02-27 11:38:38,282: DEBUG - ++ ynh_package_is_installed postgresql-13
2024-02-27 11:38:38,287: DEBUG - ++ ynh_wait_dpkg_free
2024-02-27 11:38:38,426: DEBUG - ++ return 0
2024-02-27 11:38:38,426: DEBUG - ++ dpkg-query --show ‘–showformat=${Status}’ postgresql-13
2024-02-27 11:38:38,426: DEBUG - ++ grep --count ‘ok installed’
2024-02-27 11:38:38,455: DEBUG - ++ echo yes
2024-02-27 11:38:38,456: DEBUG - + local psql_installed=yes
2024-02-27 11:38:38,456: DEBUG - + [[ true == \t\r\u\e ]]
2024-02-27 11:38:38,456: DEBUG - + YNH_INSTALL_APP_DEPENDENCIES_REPLACE=false
2024-02-27 11:38:38,456: DEBUG - + cat
2024-02-27 11:38:38,456: DEBUG - + ynh_package_install_from_equivs /tmp/tooljet-ynh-deps.control
2024-02-27 11:38:38,457: DEBUG - + local controlfile=/tmp/tooljet-ynh-deps.control
2024-02-27 11:38:38,457: DEBUG - ++ grep '^Package: ’ /tmp/tooljet-ynh-deps.control
2024-02-27 11:38:38,457: DEBUG - ++ cut '–delimiter= ’ --fields=2
2024-02-27 11:38:38,458: DEBUG - + local pkgname=tooljet-ynh-deps
2024-02-27 11:38:38,458: DEBUG - ++ grep ‘^Version: ’ /tmp/tooljet-ynh-deps.control
2024-02-27 11:38:38,458: DEBUG - ++ cut ‘–delimiter= ’ --fields=2
2024-02-27 11:38:38,459: DEBUG - + local pkgversion=2.30.3~ynh1
2024-02-27 11:38:38,460: DEBUG - + [[ -z tooljet-ynh-deps ]]
2024-02-27 11:38:38,460: DEBUG - + [[ -z 2.30.3~ynh1 ]]
2024-02-27 11:38:38,460: DEBUG - + ynh_package_update
2024-02-27 11:38:38,460: DEBUG - + ynh_apt update
2024-02-27 11:38:38,460: DEBUG - + ynh_wait_dpkg_free
2024-02-27 11:38:38,589: DEBUG - + return 0
2024-02-27 11:38:38,589: DEBUG - + LC_ALL=C
2024-02-27 11:38:38,589: DEBUG - + DEBIAN_FRONTEND=noninteractive
2024-02-27 11:38:38,589: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
2024-02-27 11:38:38,731: DEBUG - Hit:1 Index of /debian-security bullseye-security InRelease
2024-02-27 11:38:38,758: DEBUG - Hit:2 Index of /debian bullseye InRelease
2024-02-27 11:38:38,774: DEBUG - Hit:3 Index of /debian bullseye-updates InRelease
2024-02-27 11:38:38,777: DEBUG - Hit:4 Index of /debian/ bullseye InRelease
2024-02-27 11:38:38,798: DEBUG - Hit:5 Index of /php/ bullseye InRelease
2024-02-27 11:38:39,654: DEBUG - Reading package lists…
2024-02-27 11:38:39,662: DEBUG - ++ mktemp --directory
2024-02-27 11:38:39,663: DEBUG - + local TMPDIR=/tmp/tmp.qZJ1lAySuD
2024-02-27 11:38:39,663: DEBUG - + rm -f /usr/share/equivs/template/debian/compat
2024-02-27 11:38:39,664: DEBUG - + ynh_wait_dpkg_free
2024-02-27 11:38:39,789: DEBUG - + return 0
2024-02-27 11:38:39,790: DEBUG - + cp /tmp/tooljet-ynh-deps.control /tmp/tmp.qZJ1lAySuD/control
2024-02-27 11:38:39,791: DEBUG - + cd /tmp/tmp.qZJ1lAySuD
2024-02-27 11:38:39,791: DEBUG - + LC_ALL=C
2024-02-27 11:38:39,791: DEBUG - + equivs-build ./control
2024-02-27 11:38:39,919: DEBUG - dpkg-buildpackage: info: source package tooljet-ynh-deps
2024-02-27 11:38:39,919: DEBUG - dpkg-buildpackage: info: source version 2.30.3~ynh1
2024-02-27 11:38:39,919: DEBUG - dpkg-buildpackage: info: source distribution unstable
2024-02-27 11:38:39,920: DEBUG - dpkg-buildpackage: info: source changed by Equivs Dummy Package Generator root@debian-BULLSEYE-live-builder-AMD64
2024-02-27 11:38:39,946: DEBUG - dpkg-source --before-build .
2024-02-27 11:38:39,946: DEBUG - dpkg-buildpackage: info: host architecture amd64
2024-02-27 11:38:40,018: DEBUG - debian/rules clean
2024-02-27 11:38:40,019: DEBUG - dh clean
2024-02-27 11:38:40,077: DEBUG - dh_clean
2024-02-27 11:38:40,100: DEBUG - debian/rules binary
2024-02-27 11:38:40,101: DEBUG - dh binary
2024-02-27 11:38:40,148: DEBUG - dh_update_autotools_config
2024-02-27 11:38:40,167: DEBUG - dh_autoreconf
2024-02-27 11:38:40,197: DEBUG - create-stamp debian/debhelper-build-stamp
2024-02-27 11:38:40,197: DEBUG - dh_prep
2024-02-27 11:38:40,217: DEBUG - dh_install
2024-02-27 11:38:40,241: DEBUG - dh_installdocs
2024-02-27 11:38:40,267: DEBUG - dh_installchangelogs
2024-02-27 11:38:40,327: DEBUG - dh_perl
2024-02-27 11:38:40,353: DEBUG - dh_link
2024-02-27 11:38:40,376: DEBUG - dh_strip_nondeterminism
2024-02-27 11:38:40,421: DEBUG - dh_compress
2024-02-27 11:38:40,449: DEBUG - dh_fixperms
2024-02-27 11:38:40,476: DEBUG - dh_missing
2024-02-27 11:38:40,494: DEBUG - dh_installdeb
2024-02-27 11:38:40,517: DEBUG - dh_gencontrol
2024-02-27 11:38:40,599: DEBUG - dh_md5sums
2024-02-27 11:38:40,623: DEBUG - dh_builddeb
2024-02-27 11:38:40,641: DEBUG - dpkg-deb: building package ‘tooljet-ynh-deps’ in ‘…/tooljet-ynh-deps_2.30.3~ynh1_all.deb’.
2024-02-27 11:38:40,653: DEBUG - dpkg-genbuildinfo --build=binary
2024-02-27 11:38:41,033: DEBUG - dpkg-genchanges --build=binary >…/tooljet-ynh-deps_2.30.3~ynh1_amd64.changes
2024-02-27 11:38:41,098: DEBUG - dpkg-genchanges: info: binary-only upload (no source code included)
2024-02-27 11:38:41,100: DEBUG - dpkg-source --after-build .
2024-02-27 11:38:41,178: DEBUG - dpkg-buildpackage: info: binary-only upload (no source included)
2024-02-27 11:38:41,180: DEBUG -
2024-02-27 11:38:41,180: DEBUG - The package has been created.
2024-02-27 11:38:41,180: DEBUG - Attention, the package has been created in the current directory,
2024-02-27 11:38:41,180: DEBUG - not in “…” as indicated by the message above!
2024-02-27 11:38:41,181: DEBUG - + LC_ALL=C
2024-02-27 11:38:41,181: DEBUG - + dpkg --force-depends --install ./tooljet-ynh-deps_2.30.3~ynh1_all.deb
2024-02-27 11:38:41,181: DEBUG - + tee ./dpkg_log
2024-02-27 11:38:41,233: DEBUG - Selecting previously unselected package tooljet-ynh-deps.
2024-02-27 11:38:41,694: DEBUG - (Reading database … 415365 files and directories currently installed.)
2024-02-27 11:38:41,720: DEBUG - Preparing to unpack …/tooljet-ynh-deps_2.30.3~ynh1_all.deb …
2024-02-27 11:38:41,726: DEBUG - Unpacking tooljet-ynh-deps (2.30.3~ynh1) …
2024-02-27 11:38:41,823: DEBUG - dpkg: tooljet-ynh-deps: dependency problems, but configuring anyway as you requested:
2024-02-27 11:38:41,823: DEBUG - tooljet-ynh-deps depends on postgresql-contrib; however:
2024-02-27 11:38:41,823: DEBUG - Package postgresql-contrib is not installed.
2024-02-27 11:38:41,823: DEBUG -
2024-02-27 11:38:41,823: DEBUG - Setting up tooljet-ynh-deps (2.30.3~ynh1) …
2024-02-27 11:38:41,893: DEBUG - + ynh_package_install --fix-broken
2024-02-27 11:38:41,894: DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install --fix-broken
2024-02-27 11:38:41,894: DEBUG - + ynh_wait_dpkg_free
2024-02-27 11:38:42,022: DEBUG - + return 0
2024-02-27 11:38:42,023: DEBUG - + LC_ALL=C
2024-02-27 11:38:42,023: DEBUG - + DEBIAN_FRONTEND=noninteractive
2024-02-27 11:38:42,023: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install --fix-broken
2024-02-27 11:38:42,099: DEBUG - Reading package lists…
2024-02-27 11:38:42,260: DEBUG - Building dependency tree…
2024-02-27 11:38:42,263: DEBUG - Reading state information…
2024-02-27 11:38:42,388: DEBUG - Correcting dependencies… Done
2024-02-27 11:38:42,563: DEBUG - The following additional packages will be installed:
2024-02-27 11:38:42,563: DEBUG - postgresql-contrib
2024-02-27 11:38:42,585: DEBUG - The following NEW packages will be installed:
2024-02-27 11:38:42,585: DEBUG - postgresql-contrib
2024-02-27 11:38:43,128: DEBUG - 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
2024-02-27 11:38:43,128: DEBUG - Need to get 0 B/64.9 kB of archives.
2024-02-27 11:38:43,128: DEBUG - After this operation, 69.6 kB of additional disk space will be used.
2024-02-27 11:38:43,171: DEBUG - Selecting previously unselected package postgresql-contrib.
2024-02-27 11:38:43,360: DEBUG - (Reading database … 415369 files and directories currently installed.)
2024-02-27 11:38:43,387: DEBUG - Preparing to unpack …/postgresql-contrib_13+225+deb11u1_all.deb …
2024-02-27 11:38:43,393: DEBUG - Unpacking postgresql-contrib (13+225+deb11u1) …
2024-02-27 11:38:43,536: DEBUG - Setting up postgresql-contrib (13+225+deb11u1) …
2024-02-27 11:38:43,668: DEBUG - Updating coolwsd systemplate
2024-02-27 11:38:45,320: DEBUG - + [[ -n /tmp/tmp.qZJ1lAySuD ]]
2024-02-27 11:38:45,320: DEBUG - + rm --recursive --force /tmp/tmp.qZJ1lAySuD
2024-02-27 11:38:45,321: DEBUG - + ynh_package_is_installed tooljet-ynh-deps
2024-02-27 11:38:45,326: DEBUG - + ynh_wait_dpkg_free
2024-02-27 11:38:45,478: DEBUG - + return 0
2024-02-27 11:38:45,478: DEBUG - + dpkg-query --show ‘–showformat=${Status}’ tooljet-ynh-deps
2024-02-27 11:38:45,478: DEBUG - + grep --count ‘ok installed’
2024-02-27 11:38:45,508: DEBUG - + rm /tmp/tooljet-ynh-deps.control
2024-02-27 11:38:45,509: DEBUG - ++ ynh_package_is_installed postgresql-13
2024-02-27 11:38:45,514: DEBUG - ++ ynh_wait_dpkg_free
2024-02-27 11:38:45,638: DEBUG - ++ return 0
2024-02-27 11:38:45,638: DEBUG - ++ dpkg-query --show ‘–showformat=${Status}’ postgresql-13
2024-02-27 11:38:45,639: DEBUG - ++ grep --count ‘ok installed’
2024-02-27 11:38:45,668: DEBUG - ++ echo yes
2024-02-27 11:38:45,668: DEBUG - + local psql_installed2=yes
2024-02-27 11:38:45,669: DEBUG - + [[ yes != \y\e\s ]]
2024-02-27 11:38:45,669: DEBUG - + ynh_exit_properly
2024-02-27 11:38:45,669: DEBUG - + [[ provision_or_update_apt =~ ^install$|^upgrade$|^restore$ ]]
2024-02-27 11:38:46,671: INFO - Provisioning database…
2024-02-27 11:38:46,812: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “./provision_database” 7>&1’]’
2024-02-27 11:38:46,817: DEBUG - + source /usr/share/yunohost/helpers
2024-02-27 11:38:46,817: DEBUG - +++ set +o
2024-02-27 11:38:46,817: DEBUG - +++ grep xtrace
2024-02-27 11:38:46,818: DEBUG - ++ readonly ‘XTRACE_ENABLE=set -o xtrace’
2024-02-27 11:38:46,818: DEBUG - ++ XTRACE_ENABLE=‘set -o xtrace’
2024-02-27 11:38:46,831: DEBUG - + ynh_abort_if_errors
2024-02-27 11:38:46,831: DEBUG - + trap ynh_exit_properly EXIT
2024-02-27 11:38:46,831: DEBUG - + ynh_psql_create_user tooljet 0b05b10960409f2466744601
2024-02-27 11:38:46,831: DEBUG - + local user=tooljet
2024-02-27 11:38:46,831: DEBUG - + local pwd=**********
2024-02-27 11:38:46,831: DEBUG - + ynh_psql_execute_as_root ‘–sql=CREATE USER tooljet WITH ENCRYPTED PASSWORD ‘'’**********’'’’
2024-02-27 11:38:46,840: DEBUG - + database=
2024-02-27 11:38:46,840: DEBUG - + ‘[’ -n ‘’ ‘]’
2024-02-27 11:38:46,840: DEBUG - ++ cat /etc/yunohost/psql
2024-02-27 11:38:46,844: WARNING - cat: /etc/yunohost/psql: Datei oder Verzeichnis nicht gefunden
2024-02-27 11:38:46,844: DEBUG - + ynh_psql_connect_as --user=postgres --password=
2024-02-27 11:38:46,865: DEBUG - + database=
2024-02-27 11:38:46,865: DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD= psql ‘’
2024-02-27 11:38:46,907: WARNING - psql: Fehler: konnte nicht mit dem Server verbinden: Datei oder Verzeichnis nicht gefunden
2024-02-27 11:38:46,907: WARNING - Läuft der Server lokal und akzeptiert er Verbindungen
2024-02-27 11:38:46,908: WARNING - auf dem Unix-Domain-Socket »/var/run/postgresql/.s.PGSQL.5432«?
2024-02-27 11:38:46,908: DEBUG - + ynh_exit_properly
2024-02-27 11:38:46,909: DEBUG - + local exit_code=2
2024-02-27 11:38:46,909: DEBUG - + [[ provision_database =~ ^install$|^upgrade$|^restore$ ]]
2024-02-27 11:38:46,909: DEBUG - + ‘[’ 2 -eq 0 ‘]’
2024-02-27 11:38:48,414: ERROR - provision failed for database : An error occured inside the script snippet

What about: sudo systemctl status postgresql@13-main.service

1 Like

Mokay then lets try : sudo systemctl enable postgresql@13-main.service --now

And then again sudo systemctl status postgresql@13-main.service

1 Like

After these steps, I treid to start the service over the webadmin. Log ist now:

LOGFILE: journalctl
-- Journal begins at Sat 2023-11-11 18:58:02 CET, ends at Tue 2024-02-27 15:30:32 CET. --
Feb 27 15:24:54 systemd[1]: postgresql@13-main.service: Starting requested but asserts failed.
Feb 27 15:24:54 systemd[1]: Assertion failed for PostgreSQL Cluster 13-main.

I´m so glad, you´re helping!

Does anybody know, what
Assertion failed for PostgreSQL Cluster 13-main
means?

I uninstalled all apps but Nextcloud and sogo. Then I made a backup of those apps. In the protocol only MySQL-databases are mentioned.

So, if non of these apps uses postgreSQL, can I uninstall and then install postgreSQL from scratch? And if so, how can I do this?

Many thanx in advance for Your help !

You would sudo apt remove postgresql, have a carefull look at the output (maybe press n first, so you can scrutinize the output without pressing enter on default Y before you’re done)

In my case, the relevant portion says:

The following packages will be REMOVED:
  forgejo-ynh-deps postgresql synapse-ynh-deps

If it only has postgresql, or PG-related packages, you’re good to go.

apt remove [package] will remove that package, but will leave configuration files. If your PG setup is playing up and not being used anyway, it’s handy to also have configuration files removed. In that case, use apt purge [package] instead.

Good luck!

1 Like

Hi wbk,
thank you for youre help!

sudo apt remove postgresql only showed postgresql itself. So I saved my data and then removed postgresql by using sudo apt purge postgresql. By the way: Nextcloud and Sogo work fine after that.

I now wanted to install postgresql again to get “paperless” and other apps running.

sudo yunohost service add postgresql
sudo yunohost service enable postgresql
sudo yunohost service start postgresql
sudo yunohost service status postgresql:

configuration: unknown
description: PostgreSQL RDBMS
last_state_change: 2024-03-11 15:37:55
start_on_boot: enabled
status: unknown

It still doesn’t work

Where am I going wrong? Is there any further configuration needed?

Log from Webadmin UI:

Logfile
LOGFILE: journalctl
-- Journal begins at Thu 2023-11-30 14:32:50 CET, ends at Mon 2024-03-11 15:38:22 CET. --
Dez 08 23:08:30 systemd[1]: Starting PostgreSQL RDBMS...
Dez 08 23:08:30 systemd[1]: Finished PostgreSQL RDBMS.
Jan 28 21:16:02 systemd[1]: postgresql.service: Succeeded.
Jan 28 21:16:02 systemd[1]: Stopped PostgreSQL RDBMS.
-- Boot 6b25ca4977c24de38bb155b3baea9cd5 --
Jan 28 21:16:32 systemd[1]: Starting PostgreSQL RDBMS...
Jan 28 21:16:32 systemd[1]: Finished PostgreSQL RDBMS.
Feb 22 13:58:30 systemd[1]: postgresql.service: Succeeded.
Feb 22 13:58:30 systemd[1]: Stopped PostgreSQL RDBMS.
Feb 22 13:58:30 systemd[1]: Stopping PostgreSQL RDBMS...
Feb 22 13:58:30 systemd[1]: Starting PostgreSQL RDBMS...
Feb 22 13:58:30 systemd[1]: Finished PostgreSQL RDBMS.
Feb 22 14:01:05 systemd[1]: postgresql.service: Succeeded.
Feb 22 14:01:05 systemd[1]: Stopped PostgreSQL RDBMS.
-- Boot 4b391f497190435fbf72715bb10cf91d --
Feb 22 14:01:35 systemd[1]: Starting PostgreSQL RDBMS...
Feb 22 14:01:35 systemd[1]: Finished PostgreSQL RDBMS.
Feb 26 21:16:08 systemd[1]: postgresql.service: Succeeded.
Feb 26 21:16:08 systemd[1]: Stopped PostgreSQL RDBMS.
-- Boot b3dc12ac47a140958d0829d82fb95e3c --
Feb 26 21:16:38 systemd[1]: Starting PostgreSQL RDBMS...
Feb 26 21:16:38 systemd[1]: Finished PostgreSQL RDBMS.
Feb 27 10:49:11 systemd[1]: postgresql.service: Succeeded.
Feb 27 10:49:11 systemd[1]: Stopped PostgreSQL RDBMS.
-- Boot 824b962b212b49a083296e028adb45ae --
Feb 27 10:49:41 systemd[1]: Starting PostgreSQL RDBMS...
Feb 27 10:49:41 systemd[1]: Finished PostgreSQL RDBMS.
Feb 28 15:37:48 systemd[1]: postgresql.service: Succeeded.
Feb 28 15:37:48 systemd[1]: Stopped PostgreSQL RDBMS.
-- Boot 202bc538965d43e38115784c65667ace --
Feb 28 15:38:20 systemd[1]: Starting PostgreSQL RDBMS...
Feb 28 15:38:20 systemd[1]: Finished PostgreSQL RDBMS.
Mär 08 15:14:15 systemd[1]: postgresql.service: Succeeded.
Mär 08 15:14:15 systemd[1]: Stopped PostgreSQL RDBMS.
Mär 08 15:14:15 systemd[1]: Stopping PostgreSQL RDBMS...
Mär 08 15:14:15 systemd[1]: Starting PostgreSQL RDBMS...
Mär 08 15:14:15 systemd[1]: Finished PostgreSQL RDBMS.
Mär 09 11:32:06 systemd[1]: postgresql.service: Succeeded.
Mär 09 11:32:06 systemd[1]: Stopped PostgreSQL RDBMS.
Mär 09 11:32:06 systemd[1]: Stopping PostgreSQL RDBMS...
Mär 09 11:32:06 systemd[1]: Starting PostgreSQL RDBMS...
Mär 09 11:32:06 systemd[1]: Finished PostgreSQL RDBMS.
Mär 09 11:47:22 systemd[1]: postgresql.service: Succeeded.
Mär 09 11:47:22 systemd[1]: Stopped PostgreSQL RDBMS.
-- Boot a5ea45715e4241d489aa84db68c9a839 --
Mär 09 11:47:53 systemd[1]: Starting PostgreSQL RDBMS...
Mär 09 11:47:53 systemd[1]: Finished PostgreSQL RDBMS.
Mär 11 15:36:50 systemd[1]: postgresql.service: Succeeded.
Mär 11 15:36:50 systemd[1]: Stopped PostgreSQL RDBMS.
Mär 11 15:36:50 systemd[1]: Stopping PostgreSQL RDBMS...
Mär 11 15:36:50 systemd[1]: Starting PostgreSQL RDBMS...
Mär 11 15:36:50 systemd[1]: Finished PostgreSQL RDBMS.
Mär 11 15:37:24 systemd[1]: postgresql.service: Succeeded.
Mär 11 15:37:24 systemd[1]: Stopped PostgreSQL RDBMS.
-- Boot 42cb556f38a44b738e02790f4bd97fe5 --
Mär 11 15:37:55 systemd[1]: Starting PostgreSQL RDBMS...
Mär 11 15:37:55 systemd[1]: Finished PostgreSQL RDBMS.
Logs

args:
app: paperless-ngx
force: false
label: undefined
no_remove_on_failure: false
ended_at: 2024-03-11 15:46:11.112907
error: An error occured inside the script snippet
interface: api
operation: app_install
parent: null
related_to:

    • app
    • paperless-ngx
      started_at: 2024-03-11 15:45:22.870391
      success: false
      yunohost_version: 11.2.10.3

============

2024-03-11 16:45:22,875: INFO - paperless-ngx wird installiert…
2024-03-11 16:45:22,880: INFO - Provisioning sources…
2024-03-11 16:45:22,880: DEBUG - Prefetching asset main: https://github.com/paperless-ngx/paperless-ngx/releases/download/v2.5.4/paperless-ngx-v2.5.4.tar.xz
2024-03-11 16:45:32,896: DEBUG - Prefetching asset gs: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10021/ghostpdl-10.02.1.tar.gz
2024-03-11 16:45:48,788: INFO - Provisioning system_user…
2024-03-11 16:45:48,919: INFO - Provisioning install_dir…
2024-03-11 16:45:48,926: INFO - Provisioning data_dir…
2024-03-11 16:45:48,932: INFO - Provisioning permissions…
2024-03-11 16:45:49,013: DEBUG - Berechtigung ‘paperless-ngx.main’ aktualisiert
2024-03-11 16:45:49,037: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere URL, die mit der Berechtigung ‘paperless-ngx’ verknüpft ist
2024-03-11 16:45:49,092: DEBUG - Berechtigung ‘paperless-ngx.main’ erstellt
2024-03-11 16:45:49,092: DEBUG - Vollständiges Log dieser Operation: ‘Erstelle Berechtigung ‘paperless-ngx’
2024-03-11 16:45:49,175: DEBUG - Berechtigung ‘paperless-ngx.main’ aktualisiert
2024-03-11 16:45:49,175: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere Zugriffe für Berechtigung ‘paperless-ngx’
2024-03-11 16:45:49,237: DEBUG - Nothing to update in LDAP
2024-03-11 16:45:49,237: DEBUG - Berechtigung ‘paperless-ngx.main’ aktualisiert
2024-03-11 16:45:49,261: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere URL, die mit der Berechtigung ‘paperless-ngx’ verknüpft ist
2024-03-11 16:45:49,362: DEBUG - Berechtigung ‘paperless-ngx.api’ aktualisiert
2024-03-11 16:45:49,398: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere URL, die mit der Berechtigung ‘paperless-ngx’ verknüpft ist
2024-03-11 16:45:49,453: DEBUG - Berechtigung ‘paperless-ngx.api’ erstellt
2024-03-11 16:45:49,453: DEBUG - Vollständiges Log dieser Operation: ‘Erstelle Berechtigung ‘paperless-ngx’
2024-03-11 16:45:49,511: DEBUG - Nothing to update in LDAP
2024-03-11 16:45:49,533: DEBUG - Berechtigung ‘paperless-ngx.api’ aktualisiert
2024-03-11 16:45:49,533: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere Zugriffe für Berechtigung ‘paperless-ngx’
2024-03-11 16:45:49,590: DEBUG - Nothing to update in LDAP
2024-03-11 16:45:49,590: DEBUG - Berechtigung ‘paperless-ngx.api’ aktualisiert
2024-03-11 16:45:49,610: DEBUG - Vollständiges Log dieser Operation: ‘Aktualisiere URL, die mit der Berechtigung ‘paperless-ngx’ verknüpft ist
2024-03-11 16:45:49,672: DEBUG - The permission database has been resynchronized
2024-03-11 16:45:49,772: DEBUG - SSOwat-Konfiguration neu generiert
2024-03-11 16:45:49,775: INFO - Provisioning ports…
2024-03-11 16:45:49,796: INFO - Provisioning apt…
2024-03-11 16:45:49,812: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “./provision_or_update_apt” 7>&1’]’
2024-03-11 16:45:49,817: DEBUG - + source /usr/share/yunohost/helpers
2024-03-11 16:45:49,817: DEBUG - +++ set +o
2024-03-11 16:45:49,817: DEBUG - +++ grep xtrace
2024-03-11 16:45:49,818: DEBUG - ++ readonly ‘XTRACE_ENABLE=set -o xtrace’
2024-03-11 16:45:49,818: DEBUG - ++ XTRACE_ENABLE=‘set -o xtrace’
2024-03-11 16:45:49,832: DEBUG - + ynh_abort_if_errors
2024-03-11 16:45:49,832: DEBUG - + trap ynh_exit_properly EXIT
2024-03-11 16:45:49,832: DEBUG - + ynh_install_app_dependencies python3 python3-pip python3-dev python3-venv default-libmysqlclient-dev fonts-liberation imagemagick gnupg libpq-dev libmagic-dev mime-support libzbar0 poppler-utils postgresql postgresql-contrib unpaper ghostscript icc-profiles-free qpdf liblept5 libxml2 pngquant zlib1g tesseract-ocr libatlas-base-dev libxslt1-dev redis-server pkg-config
2024-03-11 16:45:49,833: DEBUG - + local ‘dependencies=python3 python3-pip python3-dev python3-venv default-libmysqlclient-dev fonts-liberation imagemagick gnupg libpq-dev libmagic-dev mime-support libzbar0 poppler-utils postgresql postgresql-contrib unpaper ghostscript icc-profiles-free qpdf liblept5 libxml2 pngquant zlib1g tesseract-ocr libatlas-base-dev libxslt1-dev redis-server pkg-config’
2024-03-11 16:45:49,833: DEBUG - ++ echo ‘python3 python3-pip python3-dev python3-venv default-libmysqlclient-dev fonts-liberation imagemagick gnupg libpq-dev libmagic-dev mime-support libzbar0 poppler-utils postgresql postgresql-contrib unpaper ghostscript icc-profiles-free qpdf liblept5 libxml2 pngquant zlib1g tesseract-ocr libatlas-base-dev libxslt1-dev redis-server pkg-config’
2024-03-11 16:45:49,833: DEBUG - ++ sed ‘s/([^<=>])\ ([^(])/\1, \2/g’
2024-03-11 16:45:49,834: DEBUG - + dependencies=‘python3, python3-pip, python3-dev, python3-venv, default-libmysqlclient-dev, fonts-liberation, imagemagick, gnupg, libpq-dev, libmagic-dev, mime-support, libzbar0, poppler-utils, postgresql, postgresql-contrib, unpaper, ghostscript, icc-profiles-free, qpdf, liblept5, libxml2, pngquant, zlib1g, tesseract-ocr, libatlas-base-dev, libxslt1-dev, redis-server, pkg-config’
2024-03-11 16:45:49,834: DEBUG - + local ‘dependencies=python3, python3-pip, python3-dev, python3-venv, default-libmysqlclient-dev, fonts-liberation, imagemagick, gnupg, libpq-dev, libmagic-dev, mime-support, libzbar0, poppler-utils, postgresql, postgresql-contrib, unpaper, ghostscript, icc-profiles-free, qpdf, liblept5, libxml2, pngquant, zlib1g, tesseract-ocr, libatlas-base-dev, libxslt1-dev, redis-server, pkg-config’
2024-03-11 16:45:49,834: DEBUG - ++ ynh_read_manifest --manifest_key=version
2024-03-11 16:45:49,844: DEBUG - ++ ‘[’ ‘!’ -e ‘’ ‘]’
2024-03-11 16:45:49,844: DEBUG - ++ ‘[’ -e /var/cache/yunohost/app_tmp_work_dirs/app_k_oh9v7r/manifest.json ‘]’
2024-03-11 16:45:49,844: DEBUG - ++ ‘[’ -e /var/cache/yunohost/app_tmp_work_dirs/app_k_oh9v7r/manifest.toml ‘]’
2024-03-11 16:45:49,844: DEBUG - ++ manifest=/var/cache/yunohost/app_tmp_work_dirs/app_k_oh9v7r/manifest.toml
2024-03-11 16:45:49,844: DEBUG - ++ echo /var/cache/yunohost/app_tmp_work_dirs/app_k_oh9v7r/manifest.toml
2024-03-11 16:45:49,844: DEBUG - ++ grep -q ‘.json$’
2024-03-11 16:45:49,845: DEBUG - ++ cat /var/cache/yunohost/app_tmp_work_dirs/app_k_oh9v7r/manifest.toml
2024-03-11 16:45:49,845: DEBUG - ++ python3 -c ‘import json, toml, sys; print(json.dumps(toml.load(sys.stdin)))’
2024-03-11 16:45:49,845: DEBUG - ++ jq .version --raw-output
2024-03-11 16:45:49,889: DEBUG - + local version=2.5.4~ynh1
2024-03-11 16:45:49,889: DEBUG - + ‘[’ -z 2.5.4~ynh1 ‘]’
2024-03-11 16:45:49,889: DEBUG - + ‘[’ 2.5.4~ynh1 == null ‘]’
2024-03-11 16:45:49,889: DEBUG - + local dep_app=paperless-ngx
2024-03-11 16:45:49,889: DEBUG - + [[ python3, python3-pip, python3-dev, python3-venv, default-libmysqlclient-dev, fonts-liberation, imagemagick, gnupg, libpq-dev, libmagic-dev, mime-support, libzbar0, poppler-utils, postgresql, postgresql-contrib, unpaper, ghostscript, icc-profiles-free, qpdf, liblept5, libxml2, pngquant, zlib1g, tesseract-ocr, libatlas-base-dev, libxslt1-dev, redis-server, pkg-config =~ [<=>] ]]
2024-03-11 16:45:49,889: DEBUG - ++ echo python3, python3-pip, python3-dev, python3-venv, default-libmysqlclient-dev, fonts-liberation, imagemagick, gnupg, libpq-dev, libmagic-dev, mime-support, libzbar0, poppler-utils, postgresql, postgresql-contrib, unpaper, ghostscript, icc-profiles-free, qpdf, liblept5, libxml2, pngquant, zlib1g, tesseract-ocr, libatlas-base-dev, libxslt1-dev, redis-server, pkg-config
2024-03-11 16:45:49,890: DEBUG - ++ grep -oP ‘(?<=php)[0-9.]+(?=-|>|)’
2024-03-11 16:45:49,890: DEBUG - ++ sort -u
2024-03-11 16:45:49,890: DEBUG - + local specific_php_version=
2024-03-11 16:45:49,891: DEBUG - + grep --quiet php
2024-03-11 16:45:49,892: DEBUG - ++ ynh_package_is_installed postgresql-13
2024-03-11 16:45:49,897: DEBUG - ++ ynh_wait_dpkg_free
2024-03-11 16:45:49,988: DEBUG - ++ return 0
2024-03-11 16:45:49,989: DEBUG - ++ dpkg-query --show ‘–showformat=${Status}’ postgresql-13
2024-03-11 16:45:49,989: DEBUG - ++ grep --count ‘ok installed’
2024-03-11 16:45:50,018: DEBUG - ++ echo yes
2024-03-11 16:45:50,018: DEBUG - + local psql_installed=yes
2024-03-11 16:45:50,018: DEBUG - + [[ true == \t\r\u\e ]]
2024-03-11 16:45:50,018: DEBUG - + YNH_INSTALL_APP_DEPENDENCIES_REPLACE=false
2024-03-11 16:45:50,018: DEBUG - + cat
2024-03-11 16:45:50,019: DEBUG - + ynh_package_install_from_equivs /tmp/paperless-ngx-ynh-deps.control
2024-03-11 16:45:50,019: DEBUG - + local controlfile=/tmp/paperless-ngx-ynh-deps.control
2024-03-11 16:45:50,019: DEBUG - ++ grep '^Package: ’ /tmp/paperless-ngx-ynh-deps.control
2024-03-11 16:45:50,019: DEBUG - ++ cut '–delimiter= ’ --fields=2
2024-03-11 16:45:50,020: DEBUG - + local pkgname=paperless-ngx-ynh-deps
2024-03-11 16:45:50,021: DEBUG - ++ grep ‘^Version: ’ /tmp/paperless-ngx-ynh-deps.control
2024-03-11 16:45:50,021: DEBUG - ++ cut ‘–delimiter= ’ --fields=2
2024-03-11 16:45:50,022: DEBUG - + local pkgversion=2.5.4~ynh1
2024-03-11 16:45:50,022: DEBUG - + [[ -z paperless-ngx-ynh-deps ]]
2024-03-11 16:45:50,022: DEBUG - + [[ -z 2.5.4~ynh1 ]]
2024-03-11 16:45:50,022: DEBUG - + ynh_package_update
2024-03-11 16:45:50,022: DEBUG - + ynh_apt update
2024-03-11 16:45:50,022: DEBUG - + ynh_wait_dpkg_free
2024-03-11 16:45:50,103: DEBUG - + return 0
2024-03-11 16:45:50,103: DEBUG - + LC_ALL=C
2024-03-11 16:45:50,104: DEBUG - + DEBIAN_FRONTEND=noninteractive
2024-03-11 16:45:50,104: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
2024-03-11 16:45:50,199: DEBUG - Hit:1 Index of /debian bullseye InRelease
2024-03-11 16:45:50,199: DEBUG - Hit:2 Index of /debian bullseye-updates InRelease
2024-03-11 16:45:50,248: DEBUG - Hit:3 Index of /debian/ bullseye InRelease
2024-03-11 16:45:50,298: DEBUG - Hit:4 https://packages.sury.org/php bullseye InRelease
2024-03-11 16:45:55,266: DEBUG - Hit:5 Index of /debian-security bullseye-security InRelease
2024-03-11 16:45:55,872: DEBUG - Reading package lists…
2024-03-11 16:45:55,880: DEBUG - ++ mktemp --directory
2024-03-11 16:45:55,881: DEBUG - + local TMPDIR=/tmp/tmp.sIPQWwY6KR
2024-03-11 16:45:55,881: DEBUG - + rm -f /usr/share/equivs/template/debian/compat
2024-03-11 16:45:55,885: DEBUG - + ynh_wait_dpkg_free
2024-03-11 16:45:55,980: DEBUG - + return 0
2024-03-11 16:45:55,980: DEBUG - + cp /tmp/paperless-ngx-ynh-deps.control /tmp/tmp.sIPQWwY6KR/control
2024-03-11 16:45:55,981: DEBUG - + cd /tmp/tmp.sIPQWwY6KR
2024-03-11 16:45:55,981: DEBUG - + LC_ALL=C
2024-03-11 16:45:55,981: DEBUG - + equivs-build ./control
2024-03-11 16:45:56,101: DEBUG - dpkg-buildpackage: info: source package paperless-ngx-ynh-deps
2024-03-11 16:45:56,101: DEBUG - dpkg-buildpackage: info: source version 2.5.4~ynh1
2024-03-11 16:45:56,101: DEBUG - dpkg-buildpackage: info: source distribution unstable
2024-03-11 16:45:56,102: DEBUG - dpkg-buildpackage: info: source changed by Equivs Dummy Package Generator root@debian-BULLSEYE-live-builder-AMD64
2024-03-11 16:45:56,131: DEBUG - dpkg-source --before-build .
2024-03-11 16:45:56,131: DEBUG - dpkg-buildpackage: info: host architecture amd64
2024-03-11 16:45:56,216: DEBUG - debian/rules clean
2024-03-11 16:45:56,218: DEBUG - dh clean
2024-03-11 16:45:56,285: DEBUG - dh_clean
2024-03-11 16:45:56,312: DEBUG - debian/rules binary
2024-03-11 16:45:56,313: DEBUG - dh binary
2024-03-11 16:45:56,368: DEBUG - dh_update_autotools_config
2024-03-11 16:45:56,391: DEBUG - dh_autoreconf
2024-03-11 16:45:56,424: DEBUG - create-stamp debian/debhelper-build-stamp
2024-03-11 16:45:56,425: DEBUG - dh_prep
2024-03-11 16:45:56,448: DEBUG - dh_install
2024-03-11 16:45:56,476: DEBUG - dh_installdocs
2024-03-11 16:45:56,507: DEBUG - dh_installchangelogs
2024-03-11 16:45:56,575: DEBUG - dh_perl
2024-03-11 16:45:56,604: DEBUG - dh_link
2024-03-11 16:45:56,632: DEBUG - dh_strip_nondeterminism
2024-03-11 16:45:56,683: DEBUG - dh_compress
2024-03-11 16:45:56,715: DEBUG - dh_fixperms
2024-03-11 16:45:56,746: DEBUG - dh_missing
2024-03-11 16:45:56,767: DEBUG - dh_installdeb
2024-03-11 16:45:56,794: DEBUG - dh_gencontrol
2024-03-11 16:45:56,888: DEBUG - dh_md5sums
2024-03-11 16:45:56,915: DEBUG - dh_builddeb
2024-03-11 16:45:56,937: DEBUG - dpkg-deb: building package ‘paperless-ngx-ynh-deps’ in ‘…/paperless-ngx-ynh-deps_2.5.4~ynh1_all.deb’.
2024-03-11 16:45:56,953: DEBUG - dpkg-genbuildinfo --build=binary
2024-03-11 16:45:57,352: DEBUG - dpkg-genchanges --build=binary >…/paperless-ngx-ynh-deps_2.5.4~ynh1_amd64.changes
2024-03-11 16:45:57,417: DEBUG - dpkg-genchanges: info: binary-only upload (no source code included)
2024-03-11 16:45:57,419: DEBUG - dpkg-source --after-build .
2024-03-11 16:45:57,501: DEBUG - dpkg-buildpackage: info: binary-only upload (no source included)
2024-03-11 16:45:57,504: DEBUG -
2024-03-11 16:45:57,504: DEBUG - The package has been created.
2024-03-11 16:45:57,504: DEBUG - Attention, the package has been created in the current directory,
2024-03-11 16:45:57,504: DEBUG - not in “…” as indicated by the message above!
2024-03-11 16:45:57,505: DEBUG - + LC_ALL=C
2024-03-11 16:45:57,505: DEBUG - + dpkg --force-depends --install ./paperless-ngx-ynh-deps_2.5.4~ynh1_all.deb
2024-03-11 16:45:57,505: DEBUG - + tee ./dpkg_log
2024-03-11 16:45:57,562: DEBUG - Selecting previously unselected package paperless-ngx-ynh-deps.
2024-03-11 16:45:57,736: DEBUG - (Reading database … 410353 files and directories currently installed.)
2024-03-11 16:45:57,763: DEBUG - Preparing to unpack …/paperless-ngx-ynh-deps_2.5.4~ynh1_all.deb …
2024-03-11 16:45:57,769: DEBUG - Unpacking paperless-ngx-ynh-deps (2.5.4~ynh1) …
2024-03-11 16:45:57,919: DEBUG - dpkg: paperless-ngx-ynh-deps: dependency problems, but configuring anyway as you requested:
2024-03-11 16:45:57,920: DEBUG - paperless-ngx-ynh-deps depends on default-libmysqlclient-dev; however:
2024-03-11 16:45:57,920: DEBUG - Package default-libmysqlclient-dev is not installed.
2024-03-11 16:45:57,920: DEBUG - paperless-ngx-ynh-deps depends on libpq-dev; however:
2024-03-11 16:45:57,920: DEBUG - Package libpq-dev is not installed.
2024-03-11 16:45:57,920: DEBUG - paperless-ngx-ynh-deps depends on libmagic-dev; however:
2024-03-11 16:45:57,920: DEBUG - Package libmagic-dev is not installed.
2024-03-11 16:45:57,920: DEBUG - paperless-ngx-ynh-deps depends on postgresql-contrib; however:
2024-03-11 16:45:57,920: DEBUG - Package postgresql-contrib is not installed.
2024-03-11 16:45:57,920: DEBUG - paperless-ngx-ynh-deps depends on icc-profiles-free; however:
2024-03-11 16:45:57,920: DEBUG - Package icc-profiles-free is not installed.
2024-03-11 16:45:57,920: DEBUG - paperless-ngx-ynh-deps depends on qpdf; however:
2024-03-11 16:45:57,920: DEBUG - Package qpdf is not installed.
2024-03-11 16:45:57,920: DEBUG - paperless-ngx-ynh-deps depends on liblept5; however:
2024-03-11 16:45:57,921: DEBUG - Package liblept5 is not installed.
2024-03-11 16:45:57,921: DEBUG - paperless-ngx-ynh-deps depends on pngquant; however:
2024-03-11 16:45:57,921: DEBUG - Package pngquant is not installed.
2024-03-11 16:45:57,921: DEBUG - paperless-ngx-ynh-deps depends on tesseract-ocr; however:
2024-03-11 16:45:57,921: DEBUG - Package tesseract-ocr is not installed.
2024-03-11 16:45:57,921: DEBUG - paperless-ngx-ynh-deps depends on libatlas-base-dev; however:
2024-03-11 16:45:57,921: DEBUG - Package libatlas-base-dev is not installed.
2024-03-11 16:45:57,921: DEBUG - paperless-ngx-ynh-deps depends on libxslt1-dev; however:
2024-03-11 16:45:57,921: DEBUG - Package libxslt1-dev is not installed.
2024-03-11 16:45:57,921: DEBUG -
2024-03-11 16:45:57,921: DEBUG - Setting up paperless-ngx-ynh-deps (2.5.4~ynh1) …
2024-03-11 16:45:57,981: DEBUG - + ynh_package_install --fix-broken
2024-03-11 16:45:57,981: DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install --fix-broken
2024-03-11 16:45:57,981: DEBUG - + ynh_wait_dpkg_free
2024-03-11 16:45:58,064: DEBUG - + return 0
2024-03-11 16:45:58,064: DEBUG - + LC_ALL=C
2024-03-11 16:45:58,064: DEBUG - + DEBIAN_FRONTEND=noninteractive
2024-03-11 16:45:58,064: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install --fix-broken
2024-03-11 16:45:58,140: DEBUG - Reading package lists…
2024-03-11 16:45:58,297: DEBUG - Building dependency tree…
2024-03-11 16:45:58,301: DEBUG - Reading state information…
2024-03-11 16:45:58,426: DEBUG - Correcting dependencies… Done
2024-03-11 16:45:58,601: DEBUG - The following additional packages will be installed:
2024-03-11 16:45:58,602: DEBUG - default-libmysqlclient-dev icc-profiles-free icu-devtools libatlas-base-dev
2024-03-11 16:45:58,602: DEBUG - libicu-dev libimagequant0 liblept5 libmagic-dev libmariadb-dev
2024-03-11 16:45:58,602: DEBUG - libmariadb-dev-compat libpq-dev libssl-dev libtesseract4 libxml2-dev
2024-03-11 16:45:58,602: DEBUG - libxslt1-dev pngquant postgresql-contrib qpdf tesseract-ocr
2024-03-11 16:45:58,603: DEBUG - tesseract-ocr-eng tesseract-ocr-osd
2024-03-11 16:45:58,604: DEBUG - Suggested packages:
2024-03-11 16:45:58,604: DEBUG - libatlas-doc liblapack-doc icu-doc postgresql-doc-13 libssl-doc
2024-03-11 16:45:58,622: DEBUG - The following NEW packages will be installed:
2024-03-11 16:45:58,622: DEBUG - default-libmysqlclient-dev icc-profiles-free icu-devtools libatlas-base-dev
2024-03-11 16:45:58,622: DEBUG - libicu-dev libimagequant0 liblept5 libmagic-dev libmariadb-dev
2024-03-11 16:45:58,622: DEBUG - libmariadb-dev-compat libpq-dev libssl-dev libtesseract4 libxml2-dev
2024-03-11 16:45:58,623: DEBUG - libxslt1-dev pngquant postgresql-contrib qpdf tesseract-ocr
2024-03-11 16:45:58,623: DEBUG - tesseract-ocr-eng tesseract-ocr-osd
2024-03-11 16:45:59,149: DEBUG - 0 upgraded, 21 newly installed, 0 to remove and 1 not upgraded.
2024-03-11 16:45:59,149: DEBUG - Need to get 0 B/24.7 MB of archives.
2024-03-11 16:45:59,149: DEBUG - After this operation, 112 MB of additional disk space will be used.
2024-03-11 16:45:59,195: DEBUG - Selecting previously unselected package libssl-dev:amd64.
2024-03-11 16:45:59,370: DEBUG - (Reading database … 410357 files and directories currently installed.)
2024-03-11 16:45:59,397: DEBUG - Preparing to unpack …/00-libssl-dev_1.1.1w-0+deb11u1_amd64.deb …
2024-03-11 16:45:59,406: DEBUG - Unpacking libssl-dev:amd64 (1.1.1w-0+deb11u1) …
2024-03-11 16:45:59,590: DEBUG - Selecting previously unselected package libmariadb-dev.
2024-03-11 16:45:59,647: DEBUG - Preparing to unpack …/01-libmariadb-dev_1%3a10.5.23-0+deb11u1_amd64.deb …
2024-03-11 16:45:59,653: DEBUG - Unpacking libmariadb-dev (1:10.5.23-0+deb11u1) …
2024-03-11 16:45:59,767: DEBUG - Selecting previously unselected package libmariadb-dev-compat:amd64.
2024-03-11 16:45:59,823: DEBUG - Preparing to unpack …/02-libmariadb-dev-compat_1%3a10.5.23-0+deb11u1_amd64.deb …
2024-03-11 16:45:59,829: DEBUG - Unpacking libmariadb-dev-compat:amd64 (1:10.5.23-0+deb11u1) …
2024-03-11 16:45:59,880: DEBUG - Selecting previously unselected package default-libmysqlclient-dev:amd64.
2024-03-11 16:45:59,937: DEBUG - Preparing to unpack …/03-default-libmysqlclient-dev_1.0.7_amd64.deb …
2024-03-11 16:45:59,943: DEBUG - Unpacking default-libmysqlclient-dev:amd64 (1.0.7) …
2024-03-11 16:45:59,992: DEBUG - Selecting previously unselected package icc-profiles-free.
2024-03-11 16:46:00,054: DEBUG - Preparing to unpack …/04-icc-profiles-free_2.0.1+dfsg-1.1_all.deb …
2024-03-11 16:46:00,060: DEBUG - Unpacking icc-profiles-free (2.0.1+dfsg-1.1) …
2024-03-11 16:46:00,149: DEBUG - Selecting previously unselected package icu-devtools.
2024-03-11 16:46:00,200: DEBUG - Preparing to unpack …/05-icu-devtools_67.1-7_amd64.deb …
2024-03-11 16:46:00,206: DEBUG - Unpacking icu-devtools (67.1-7) …
2024-03-11 16:46:00,284: DEBUG - Selecting previously unselected package libatlas-base-dev:amd64.
2024-03-11 16:46:00,343: DEBUG - Preparing to unpack …/06-libatlas-base-dev_3.10.3-10_amd64.deb …
2024-03-11 16:46:00,352: DEBUG - Unpacking libatlas-base-dev:amd64 (3.10.3-10) …
2024-03-11 16:46:00,682: DEBUG - Selecting previously unselected package libicu-dev:amd64.
2024-03-11 16:46:00,718: DEBUG - Preparing to unpack …/07-libicu-dev_67.1-7_amd64.deb …
2024-03-11 16:46:00,723: DEBUG - Unpacking libicu-dev:amd64 (67.1-7) …
2024-03-11 16:46:01,477: DEBUG - Selecting previously unselected package libimagequant0:amd64.
2024-03-11 16:46:01,537: DEBUG - Preparing to unpack …/08-libimagequant0_2.12.2-1.1_amd64.deb …
2024-03-11 16:46:01,549: DEBUG - Unpacking libimagequant0:amd64 (2.12.2-1.1) …
2024-03-11 16:46:01,628: DEBUG - Selecting previously unselected package liblept5:amd64.
2024-03-11 16:46:01,680: DEBUG - Preparing to unpack …/09-liblept5_1.79.0-1.1+deb11u1_amd64.deb …
2024-03-11 16:46:01,686: DEBUG - Unpacking liblept5:amd64 (1.79.0-1.1+deb11u1) …
2024-03-11 16:46:01,849: DEBUG - Selecting previously unselected package libmagic-dev:amd64.
2024-03-11 16:46:01,890: DEBUG - Preparing to unpack …/10-libmagic-dev_1%3a5.39-3+deb11u1_amd64.deb …
2024-03-11 16:46:01,896: DEBUG - Unpacking libmagic-dev:amd64 (1:5.39-3+deb11u1) …
2024-03-11 16:46:01,981: DEBUG - Selecting previously unselected package libpq-dev.
2024-03-11 16:46:02,039: DEBUG - Preparing to unpack …/11-libpq-dev_13.14-0+deb11u1_amd64.deb …
2024-03-11 16:46:02,045: DEBUG - Unpacking libpq-dev (13.14-0+deb11u1) …
2024-03-11 16:46:02,126: DEBUG - Selecting previously unselected package libtesseract4:amd64.
2024-03-11 16:46:02,188: DEBUG - Preparing to unpack …/12-libtesseract4_4.1.1-2.1_amd64.deb …
2024-03-11 16:46:02,192: DEBUG - Unpacking libtesseract4:amd64 (4.1.1-2.1) …
2024-03-11 16:46:02,358: DEBUG - Selecting previously unselected package libxml2-dev:amd64.
2024-03-11 16:46:02,416: DEBUG - Preparing to unpack …/13-libxml2-dev_2.9.14+dfsg-0.1+0~20230421.14+debian11~1.gbpf14485_amd64.deb …
2024-03-11 16:46:02,422: DEBUG - Unpacking libxml2-dev:amd64 (2.9.14+dfsg-0.1+0~20230421.14+debian11~1.gbpf14485) …
2024-03-11 16:46:02,556: DEBUG - Selecting previously unselected package libxslt1-dev:amd64.
2024-03-11 16:46:02,616: DEBUG - Preparing to unpack …/14-libxslt1-dev_1.1.34-4+deb11u1_amd64.deb …
2024-03-11 16:46:02,621: DEBUG - Unpacking libxslt1-dev:amd64 (1.1.34-4+deb11u1) …
2024-03-11 16:46:02,726: DEBUG - Selecting previously unselected package pngquant.
2024-03-11 16:46:02,770: DEBUG - Preparing to unpack …/15-pngquant_2.13.1-1_amd64.deb …
2024-03-11 16:46:02,776: DEBUG - Unpacking pngquant (2.13.1-1) …
2024-03-11 16:46:02,829: DEBUG - Selecting previously unselected package postgresql-contrib.
2024-03-11 16:46:02,888: DEBUG - Preparing to unpack …/16-postgresql-contrib_13+225+deb11u1_all.deb …
2024-03-11 16:46:02,894: DEBUG - Unpacking postgresql-contrib (13+225+deb11u1) …
2024-03-11 16:46:02,969: DEBUG - Selecting previously unselected package qpdf.
2024-03-11 16:46:03,028: DEBUG - Preparing to unpack …/17-qpdf_10.1.0-1_amd64.deb …
2024-03-11 16:46:03,034: DEBUG - Unpacking qpdf (10.1.0-1) …
2024-03-11 16:46:03,122: DEBUG - Selecting previously unselected package tesseract-ocr-eng.
2024-03-11 16:46:03,159: DEBUG - Preparing to unpack …/18-tesseract-ocr-eng_1%3a4.00~git30-7274cfa-1.1_all.deb …
2024-03-11 16:46:03,165: DEBUG - Unpacking tesseract-ocr-eng (1:4.00~git30-7274cfa-1.1) …
2024-03-11 16:46:03,342: DEBUG - Selecting previously unselected package tesseract-ocr-osd.
2024-03-11 16:46:03,402: DEBUG - Preparing to unpack …/19-tesseract-ocr-osd_1%3a4.00~git30-7274cfa-1.1_all.deb …
2024-03-11 16:46:03,408: DEBUG - Unpacking tesseract-ocr-osd (1:4.00~git30-7274cfa-1.1) …
2024-03-11 16:46:03,691: DEBUG - Selecting previously unselected package tesseract-ocr.
2024-03-11 16:46:03,749: DEBUG - Preparing to unpack …/20-tesseract-ocr_4.1.1-2.1_amd64.deb …
2024-03-11 16:46:03,754: DEBUG - Unpacking tesseract-ocr (4.1.1-2.1) …
2024-03-11 16:46:03,915: DEBUG - Setting up tesseract-ocr-eng (1:4.00~git30-7274cfa-1.1) …
2024-03-11 16:46:03,935: DEBUG - Setting up libpq-dev (13.14-0+deb11u1) …
2024-03-11 16:46:03,955: DEBUG - Setting up libmagic-dev:amd64 (1:5.39-3+deb11u1) …
2024-03-11 16:46:03,975: DEBUG - Setting up libatlas-base-dev:amd64 (3.10.3-10) …
2024-03-11 16:46:04,001: DEBUG - update-alternatives: using /usr/lib/x86_64-linux-gnu/atlas/libblas.so to provide /usr/lib/x86_64-linux-gnu/libblas.so (libblas.so-x86_64-linux-gnu) in auto mode
2024-03-11 16:46:04,016: DEBUG - update-alternatives: using /usr/lib/x86_64-linux-gnu/atlas/liblapack.so to provide /usr/lib/x86_64-linux-gnu/liblapack.so (liblapack.so-x86_64-linux-gnu) in auto mode
2024-03-11 16:46:04,029: DEBUG - Setting up liblept5:amd64 (1.79.0-1.1+deb11u1) …
2024-03-11 16:46:04,049: DEBUG - Setting up qpdf (10.1.0-1) …
2024-03-11 16:46:04,069: DEBUG - Setting up libimagequant0:amd64 (2.12.2-1.1) …
2024-03-11 16:46:04,089: DEBUG - Setting up icc-profiles-free (2.0.1+dfsg-1.1) …
2024-03-11 16:46:04,107: DEBUG - Setting up libssl-dev:amd64 (1.1.1w-0+deb11u1) …
2024-03-11 16:46:04,126: DEBUG - Setting up icu-devtools (67.1-7) …
2024-03-11 16:46:04,147: DEBUG - Setting up libtesseract4:amd64 (4.1.1-2.1) …
2024-03-11 16:46:04,168: DEBUG - Setting up libmariadb-dev (1:10.5.23-0+deb11u1) …
2024-03-11 16:46:04,187: DEBUG - Setting up postgresql-contrib (13+225+deb11u1) …
2024-03-11 16:46:04,219: DEBUG - Setting up tesseract-ocr-osd (1:4.00~git30-7274cfa-1.1) …
2024-03-11 16:46:04,252: DEBUG - Setting up libicu-dev:amd64 (67.1-7) …
2024-03-11 16:46:04,273: DEBUG - Setting up libmariadb-dev-compat:amd64 (1:10.5.23-0+deb11u1) …
2024-03-11 16:46:04,292: DEBUG - Setting up pngquant (2.13.1-1) …
2024-03-11 16:46:04,312: DEBUG - Setting up libxml2-dev:amd64 (2.9.14+dfsg-0.1+0~20230421.14+debian11~1.gbpf14485) …
2024-03-11 16:46:04,335: DEBUG - Setting up tesseract-ocr (4.1.1-2.1) …
2024-03-11 16:46:04,353: DEBUG - Setting up default-libmysqlclient-dev:amd64 (1.0.7) …
2024-03-11 16:46:04,371: DEBUG - Setting up libxslt1-dev:amd64 (1.1.34-4+deb11u1) …
2024-03-11 16:46:04,394: DEBUG - Processing triggers for man-db (2.9.4-2) …
2024-03-11 16:46:07,958: DEBUG - Processing triggers for libc-bin (2.31-13+deb11u8) …
2024-03-11 16:46:08,112: DEBUG - + [[ -n /tmp/tmp.sIPQWwY6KR ]]
2024-03-11 16:46:08,112: DEBUG - + rm --recursive --force /tmp/tmp.sIPQWwY6KR
2024-03-11 16:46:08,113: DEBUG - + ynh_package_is_installed paperless-ngx-ynh-deps
2024-03-11 16:46:08,118: DEBUG - + ynh_wait_dpkg_free
2024-03-11 16:46:08,237: DEBUG - + return 0
2024-03-11 16:46:08,238: DEBUG - + dpkg-query --show ‘–showformat=${Status}’ paperless-ngx-ynh-deps
2024-03-11 16:46:08,238: DEBUG - + grep --count ‘ok installed’
2024-03-11 16:46:08,267: DEBUG - + rm /tmp/paperless-ngx-ynh-deps.control
2024-03-11 16:46:08,268: DEBUG - ++ ynh_package_is_installed postgresql-13
2024-03-11 16:46:08,273: DEBUG - ++ ynh_wait_dpkg_free
2024-03-11 16:46:08,368: DEBUG - ++ return 0
2024-03-11 16:46:08,368: DEBUG - ++ dpkg-query --show ‘–showformat=${Status}’ postgresql-13
2024-03-11 16:46:08,368: DEBUG - ++ grep --count ‘ok installed’
2024-03-11 16:46:08,397: DEBUG - ++ echo yes
2024-03-11 16:46:08,397: DEBUG - + local psql_installed2=yes
2024-03-11 16:46:08,397: DEBUG - + [[ yes != \y\e\s ]]
2024-03-11 16:46:08,397: DEBUG - + ynh_exit_properly
2024-03-11 16:46:08,398: DEBUG - + [[ provision_or_update_apt =~ ^install$|^upgrade$|^restore$ ]]
2024-03-11 16:46:09,400: INFO - Provisioning database…
2024-03-11 16:46:09,512: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “./provision_database” 7>&1’]’
2024-03-11 16:46:09,516: DEBUG - + source /usr/share/yunohost/helpers
2024-03-11 16:46:09,516: DEBUG - +++ set +o
2024-03-11 16:46:09,516: DEBUG - +++ grep xtrace
2024-03-11 16:46:09,517: DEBUG - ++ readonly ‘XTRACE_ENABLE=set -o xtrace’
2024-03-11 16:46:09,517: DEBUG - ++ XTRACE_ENABLE=‘set -o xtrace’
2024-03-11 16:46:09,530: DEBUG - + ynh_abort_if_errors
2024-03-11 16:46:09,530: DEBUG - + trap ynh_exit_properly EXIT
2024-03-11 16:46:09,530: DEBUG - + ynh_psql_create_user paperless_ngx e1e3449f2ab290c5224fd088
2024-03-11 16:46:09,530: DEBUG - + local user=paperless_ngx
2024-03-11 16:46:09,530: DEBUG - + local pwd=**********
2024-03-11 16:46:09,530: DEBUG - + ynh_psql_execute_as_root ‘–sql=CREATE USER paperless_ngx WITH ENCRYPTED PASSWORD ‘'’**********’'’’
2024-03-11 16:46:09,539: DEBUG - + database=
2024-03-11 16:46:09,539: DEBUG - + ‘[’ -n ‘’ ‘]’
2024-03-11 16:46:09,539: DEBUG - ++ cat /etc/yunohost/psql
2024-03-11 16:46:09,543: WARNING - cat: /etc/yunohost/psql: Datei oder Verzeichnis nicht gefunden
2024-03-11 16:46:09,544: DEBUG - + ynh_psql_connect_as --user=postgres --password=
2024-03-11 16:46:09,564: DEBUG - + database=
2024-03-11 16:46:09,564: DEBUG - + sudo --login --user=postgres PGUSER=postgres PGPASSWORD= psql ‘’
2024-03-11 16:46:09,606: WARNING - psql: Fehler: konnte nicht mit dem Server verbinden: Datei oder Verzeichnis nicht gefunden
2024-03-11 16:46:09,607: WARNING - Läuft der Server lokal und akzeptiert er Verbindungen
2024-03-11 16:46:09,607: WARNING - auf dem Unix-Domain-Socket »/var/run/postgresql/.s.PGSQL.5432«?
2024-03-11 16:46:09,608: DEBUG - + ynh_exit_properly
2024-03-11 16:46:09,608: DEBUG - + local exit_code=2
2024-03-11 16:46:09,608: DEBUG - + [[ provision_database =~ ^install$|^upgrade$|^restore$ ]]
2024-03-11 16:46:09,608: DEBUG - + ‘[’ 2 -eq 0 ‘]’
2024-03-11 16:46:11,112: ERROR - provision failed for database : An error occured inside the script snippet

Moderation edit: please don’t paste logs like that, use the yunopaste function to provide a link
or at least put a spoiler use the “hide detail” forum function

Does ls /etc/postgresql/13/main returns something ?

If not, you should probably recreate your postgres cluster doing so:

sudo pg_createcluster 13 main
sudo systemctl enable postgresql@13-main.service
sudo systemctl start postgresql@13-main.service
sudo systemctl status postgresql@13-main.service
1 Like

Hi MicroCheapFX,
thanks for you´re help. I tried to recreate my postgres cluster like you discribed.

sudo yunohost service status postgresql now says:

Have you tried this ?

sudo yunohost service reload postgresql
sudo yunohost service restart postgresql
sudo yunohost service status postgresql

If it is still not running, could you say if postgresql and postgresql@13-main are running ?

sudo systemctl status postgresql@13-main.service
sudo systemctl status postgresql.service

if both are running, would you stop postgresql and restart postgresql@13-main ?

sudo systemctl stop postgresql.service
sudo systemctl restart postgresql@13-main.service

Then reload and restart in yunohost.

2 Likes

That’s really strange.

I followed your instructions. The result: In the Yunohost admin interface, the PostgreSQL service still is shown as “dead”. But I now can install the apps I need (paperless for example)! The apps work as intended, as far as I can see.

So the problem is solved! I´m fine with the service incorrectly shown as dead, as long as everything works.

I would have liked to mark several answers as a solution because there were several pieces of the puzzle that contributed to the solution. Since that’s not possible, I marked the last and decisive answer.

Many thanks to you and all the other experts, who helped!!

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.