Bug #6403
closedPostgresql misconfigured when not the default distrib package (ex: Centos 6 with Postgresql 9.3 from pgfoundry.org)
Description
Just fyi...
I was attempting to install rudder-reports to Centos 6x with Postgresql 9.3 from the pgdg repository http://svn.pgrpms.org/browser/rpm/redhat/9.3/pgdg-yum/CTOS-6/pgdg-93-centos.repo . I was met with the issue of not finding the /var/lib/pgsql/data/pg_hba.conf file or /etc/init.d/postgresql. After scratching my head a little I created a symlink from /var/lib/pgsql/9.3/data/pg_hba.conf to the expected path in order to complete the installation as well as a symlink from /etc/init.d/postgresql-9.3 to /etc/init.d/postgresql. I also had to manually configure my pg_hba.conf to change to md5 for local and localhost, create user db rudder with owner rudder and run the schema import from /opt/rudder/etc/postgresql/reportsSchema.sql . I am sure there will be some more issues going forward, just wanted to let someone be aware if they run across this same thing to look for this. Thanks with help from ncharles on irc for assisting with this.
Updated by François ARMAND over 9 years ago
- Subject changed from Postgresql difficulty on Centos 6 with Postgresql 9.3 from pgfoundry.org to Postgresql misconfigured when not the default distrib package (ex: Centos 6 with Postgresql 9.3 from pgfoundry.org)
- Category set to System integration
- Assignee set to Nicolas CHARLES
- Priority changed from N/A to 3
- Target version changed from Ideas (not version specific) to 2.10.12
Thanks for reporting.
Nico, could you tell us a little more on that one. For now, I can sum-up the list of problems and workarounds as:- 1/ missing expected starting script (=> symlink provided one to /etc/init.d/postgresql)
- 2/ missing expected authz file (=> symlink provided one to /var/lib/pgsql/data/pg_hba.conf)
- 3/ initialisation not done (=> do it again, by hand)
Do you see other problems ?
For #3, there must be a easier way than playing things by hand, like running again post-installation script of the package. Do you know (or perhaps Matthieu ?) how to do that with rpm/deb ?
It seems that the first easy step for that one is to document what are the requirement for non standard pg installation (perhaps just the two symlinks ?), and how to get of the mud if needed.
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.12 to 2.10.13
Updated by Nicolas CHARLES over 9 years ago
- Assignee changed from Nicolas CHARLES to Matthieu CERDA
Paths of postgres are hardcoded in Rudder, which is a real problem (see also #6412).
The issue is if the install of postgres does not use "standart" paths, Rudder is lost, and can't properly manage database and give access
For 3/ the solution may be to rerun the rudder-init; for the first 2, i'm not sure symlink is the right solution (it is quite dirty), but rather to detect the correct paths of installation
Matthieu may know how to detet the proper path of postgres installation
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.13 to 2.10.14
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.14 to 2.10.15
Updated by Matthieu CERDA over 9 years ago
Hmmmm...
The problem is, there is no standard installation path, only possible candidates on each type of OSes, that may or may not match the currently used one (eg. if the user uses home made packages storing things in /var/lib/my-postgres-9/ so it does not conflict with system packages).
For me, the problem is not that we do not cover every possible case, it is more that we do not give the possibility to do something else (we assume defaults but do not give easily the option to the user to do something else.)
For the ACL configuration, we could try to configure automatically, and just skip and output a helpful message explaining how to do it manually if we can't.
For the postgresql service name, it is an entirely other problem, as there is also no easy way to guess the name used. We can only try to detect it, that's what I did on the Rudder 3.1 init script (get all service candidates matching "postgresql", and use the last one, like "postgresql91")
Updated by Alexis Mousset over 9 years ago
- Related to Bug #6686: Error while installing rudder-reports on centos 7 added
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.15 to 2.10.16
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.16 to 2.10.17
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.17 to 2.10.18
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.18 to 2.10.19
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.19 to 2.10.20
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.10.20 to 277
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 277 to 2.11.18
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.11.18 to 2.11.19
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.19 to 2.11.20
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.20 to 2.11.21
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.21 to 2.11.22
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.22 to 2.11.23
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.23 to 2.11.24
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 2.11.24 to 308
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 308 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Jonathan CLARKE over 7 years ago
- Severity set to Critical - prevents main use of Rudder | no workaround | data loss | security
- User visibility set to Infrequent - complex configurations | third party integrations
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.20 to 3.1.21
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.21 to 3.1.22
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.22 to 3.1.23
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.23 to 3.1.24
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.24 to 3.1.25
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 3.1.25 to 387
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 387 to 4.1.10
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.1.10 to 4.1.11
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.11 to 4.1.12
- Priority changed from 54 to 55
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.12 to 4.1.13
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.13 to 4.1.14
- Priority changed from 55 to 56
Updated by Benoît PECCATTE over 6 years ago
- Target version changed from 4.1.14 to 4.1.15
Updated by Vincent MEMBRÉ about 6 years ago
- Target version changed from 4.1.15 to 4.1.16
- Priority changed from 56 to 57
Updated by Vincent MEMBRÉ about 6 years ago
- Target version changed from 4.1.16 to 4.1.17
- Priority changed from 57 to 58
Updated by Vincent MEMBRÉ almost 6 years ago
- Target version changed from 4.1.17 to 4.1.18
Updated by Vincent MEMBRÉ almost 6 years ago
- Target version changed from 4.1.18 to 4.1.19
- Priority changed from 58 to 59
Updated by Alexis Mousset almost 6 years ago
- Target version changed from 4.1.19 to 4.1.20
Updated by Nicolas CHARLES almost 6 years ago
- Related to Bug #7395: After a fresh install on Centos, the Rudder server web interface does not work added
Updated by Nicolas CHARLES almost 6 years ago
Updated by Nicolas CHARLES almost 6 years ago
- Related to Bug #6546: rudder-reports package should use the correct PostgreSQL service added
Updated by Nicolas CHARLES almost 6 years ago
- Related to Bug #14296: System technique try to edit pg_hba file only on SUSE, but packaging takes care of this part added
Updated by François ARMAND over 5 years ago
- Target version changed from 4.1.20 to 4.1.21
- Priority changed from 59 to 60
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 4.1.21 to 4.1.22
Updated by Nicolas CHARLES over 5 years ago
I tried to use Postgresql 11 with Rudder 5.0.9
At install I got the following error
Installation : 1398866025:rudder-reports-5.0.9.release-1.EL.7.noarch 12/36 Unit postgresql.service could not be found. INFO: Initializing PostgreSQL ...The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl. Done Failed to start postgresql.service: Unit not found. 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"? Postgresql failed to start! Halting warning: %post(rudder-reports-1398866025:5.0.9.release-1.EL.7.noarch) scriptlet failed, exit status 1 Non-fatal POSTIN scriptlet failure in rpm package 1398866025:rudder-reports-5.0.9.release-1.EL.7.noarch Mise à jour : openldap-2.4.44-21.el7_6.x86_64 13/36 Installation : openldap-clients-2.4.44-21.el7_6.x86_64 14/36 Installation : perl-Digest-1.17-245.el7.noarch 15/36
Updated by Nicolas CHARLES over 5 years ago
indeed, service name is postgresql-11, which isn't find by
systemctl list-unit-files --type service | awk -F'.' '{print $1}' | grep -E "^postgresql[0-9]*$"
then the following command fails
service ${POSTGRESQL_SERVICE_NAME} initdb The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
when using package from distrib¶
doc https://www.postgresql.org/download/linux/redhat/ says that
RHEL 5,6 should do
service postgresql initdb chkconfig postgresql on
rhel7 should do
postgresql-setup initdb systemctl enable postgresql.service systemctl start postgresql.service
when using package downloaded from postgresql repo¶
same as when using from distro, except we need full path from postgresql-setup
/usr/pgsql-9.6/bin/postgresql96-setup initdb systemctl enable postgresql-9.6 systemctl start postgresql-9.6 /usr/pgsql-10/bin/postgresql-10-setup initdb systemctl enable postgresql-10 systemctl start postgresql-10 /usr/pgsql-11/bin/postgresql-11-setup initdb systemctl enable postgresql-11 systemctl start postgresql-11
Note the extra *-* for 10 and after
Updated by Nicolas CHARLES over 5 years ago
- Target version changed from 4.1.22 to 5.0.10
to get the proper postgresql setup, we can run
ls -1 /usr/pgsql-*/bin/postgresql*-setup | sort -V | tail -1
and if not there, failback to postgresql-setup
Updated by Nicolas CHARLES over 5 years ago
- Status changed from New to In progress
Updated by Nicolas CHARLES over 5 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-packages/pull/1873
Updated by Rudder Quality Assistant over 5 years ago
- Assignee changed from Benoît PECCATTE to Nicolas CHARLES
Updated by Nicolas CHARLES over 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-packages|b97da4891bc6b4218d0f97a50b37878833a4419c.
Updated by Nicolas CHARLES over 5 years ago
- Has duplicate Bug #14106: Use postgresql-setup initdb in postgresql setup added
Updated by Nicolas CHARLES over 5 years ago
- Related to Bug #14827: Error when upgrading to Rudder 5.0.10 using centos7 with custom postgresql added
Updated by Vincent MEMBRÉ over 5 years ago
- Priority changed from 60 to 61
This bug has been fixed in Rudder 5.0.10 which was released today.
Updated by Vincent MEMBRÉ over 5 years ago
- Related to Bug #14744: Postgresql misconfigured when not the default distrib package (ex: Centos 6 with Postgresql 9.3 from pgfoundry.org) added
Updated by Vincent MEMBRÉ over 5 years ago
- Status changed from Pending release to Released