Bug#1053458: openstreetmap-carto-common: Configure step failed with FATAL: role "root" does not exist
Package: openstreetmap-carto Version: 5.7.0-1 Followup-For: Bug #1053458 X-Debbugs-Cc: mx...@hotmail.com Dear Maintainer, -- System Information: Debian Release: 12.5 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.1.0-18-amd64 (SMP w/24 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages openstreetmap-carto depends on: ii debconf [debconf-2.0] 1.5.82 ii dpkg1.21.22 ih openstreetmap-carto-common 5.7.0-1 openstreetmap-carto recommends no packages. openstreetmap-carto suggests no packages. -- debconf information: * openstreetmap-carto/database-name: gis on the very first try to install this package i got a pop-up screen asking if i wanted to download the world data and plug it into postgres I mistakenly hit yes then aborted with ctrl-c (i already have the data from openstreetmap and did not want to wait days to redo it ) upon trying to dpkg-reconfigure openstreetmap-carto i get the error psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist which is understandable and proper .. i.e. i am not postgres the trouble is *** there is no going back to that initial screen "asking if i wanted to download the world map into postgres " *** to make a short story long .. even after deleting/purging wiping out everything in /var/lib/dpkg/info/openstreetmap* and trying to install again i never get that initial screen to bypass the download process ( which i think is the only real bug ) so a couple of thoughts 1- the package needs to start from the very beginning on a reconfigure i.e the user needs to be able choose to by-pass the download and database import (which SHOULD get rid of the role error which i assume you sudo into user postgres to accomplish or somesuch) 2- the package needs to clean up whatever flag/files is uses to show that initial screen in apt/dpkg because once you use it, it never comes back even after a (near apparently) total wipe of the package apt-get remove apt-get purge, etc.. do not get it back ... any help on actually getting back to the initial screen would be appreciated i have no clue why apt is by-passing that very first step shown to the user but at this point i have a broken package. Going to try find some stuff in ~ see if i can get back to the basics ...
Bug#1053458: [DKIM] Bug#1053458: openstreetmap-carto-common: Configure step failed with FATAL: role "root" does not exist
On 10/4/23 14:59, Nicolas Peugnet wrote: psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist openstreetmap-carto-common has more issues, it lacks the dependencies for the get-external-data.py script (python3-{psycopg2,requests,yaml}) causing it to fail in minimal chroot. I think we should remove the automatic execution of get-external-data.py in the maintainer scripts and let the user set it up for their environment. But I'll leave that to josch. Kind Regards, Bas -- GPG Key ID: 4096R/6750F10AE88D4AF1 Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
Bug#1053458: openstreetmap-carto-common: Configure step failed with FATAL: role "root" does not exist
Package: openstreetmap-carto-common Version: 5.7.0-1 Severity: important Dear Maintainer, When installing openstreetmap-carto-common package (as a dependency of openstreetmap-carto), the configure step failed after having answered yes to all the questions (as I remember: "do you want to download the additionnal resources?" and "What is the name of the database? gis"). Here is the error message from apt install: Setting up openstreetmap-carto-common (5.7.0-1) ... INFO:root:Starting load of external data into database Traceback (most recent call last): File "/usr/share/openstreetmap-carto-common/./get-external-data.py", line 405, in main() File "/usr/share/openstreetmap-carto-common/./get-external-data.py", line 305, in main conn = psycopg2.connect(database=database, ^^^ File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^ psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist dpkg: error processing package openstreetmap-carto-common (--configure): installed openstreetmap-carto-common package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of openstreetmap-carto: openstreetmap-carto depends on openstreetmap-carto-common; however: Package openstreetmap-carto-common is not configured yet. dpkg: error processing package openstreetmap-carto (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: openstreetmap-carto-common openstreetmap-carto E: Sub-process /usr/bin/dpkg returned an error code (1) It seems indeed that by default the root user does not have access to PostgreSQL databases, and only postgres user has superuser privileges. So maybe this script should be run as postgres user. I'd like to mention that I tried to install this package on an almost completely fresh install of Debian 12. I followed this tutorial until the end [1] before noticing that the openstreetmap-carto package was part of Debian. But I donc think that it was the source of the issue. [1] https://switch2osm.org/serving-tiles/manually-building-a-tile-server-debian-12/ -- System Information: Debian Release: 12.1 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-12-amd64 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages openstreetmap-carto-common depends on: ii curl 7.88.1-10+deb12u1 ii debconf [debconf-2.0] 1.5.82 ii fonts-dejavu-core 2.37-6 pn fonts-noto-cjk pn fonts-noto-hinted pn fonts-noto-unhinted pn fonts-unifont ii gdal-bin 3.6.2+dfsg-1+b2 ii mapnik-utils 3.1.0+ds-3+b1 ii python33.11.2-1+b1 ii unzip 6.0-28 openstreetmap-carto-common recommends no packages. openstreetmap-carto-common suggests no packages.