Installation with postgresql

yann
Messages : 4
Inscription : mar. janv. 23, 2018 1:44 pm

Installation with postgresql

Message par yann »

When trying to install with postgresql on Debian 8 as recommended (the "Jessie 8.0 +" is not clear whether Stretch aka. 9.0 is supported or not), we can hit a number of issues:

[ul]
[li]the [url=https://sites.google.com/a/henix.fr/wik ... stallation]debian instructions[/url] do not mention that the install requires a choice between h2 and mysql. It should probably hint to select h2 and go on manually, but the fact that psql is not available here necessarily raises questions in user's mind
[li]the [url=https://sites.google.com/a/henix.fr/wik ... postgresql]psql instructions[/url] don't work on a freshly installed jessie, starting with an encoding-related error on CREATE DATABASE, which I could get over by following [url=https://stackoverflow.com/questions/167 ... 1|274.4785]these instructions[/url]
[li]then user creation is rejected because a dash in username, so I had to change "squash-tm" to "squashtm"
[li]then GRANT was rejected because of a syntax error, presumably missing DATABASE like in "GRANT ALL PRIVILEGES ON DATABASE squashtm TO squashtm;"
[li]then the page does not tell about the db initialization, only in [url=http://www.squashtest.org/forum/10-inst ... ng=en#6096]this post[/url] can we get a hint, it would be great to have the relevant scripts shipped in the deb, even if not used by db-common
[li]"sudo -u postgres psql squashtm -f postgresql-full-install-version-1.17.0.RELEASE.sql" gives a number of warnings, notably acl-related
[li]then it systemd is the selected init system, the squashtm service just won't launch, I had to switch back to sysvinit
[li]then I see a number of errors at startup in the logs, starting with "permission denied for relation core_config" and "Error starting ApplicationContext"
[/ul]

I don't have much time to dig any further, and will switch to mysql for the time being...
olo-dw
Messages : 3
Inscription : mar. nov. 06, 2018 12:42 pm

Installation with postgresql

Message par olo-dw »

[quote]"sudo -u postgres psql squashtm -f postgresql-full-install-version-1.17.0.RELEASE.sql"[/quote]
Puis-je suggérer de ne pas utiliser l'utilisateur [b]postgres[/b] mais l'utilisateur [b]squashtm[/b] dans votre cas ?

Le problème [i]"permission denied for relation core_config"[/i] est lié au fait que les tables de la base de données sont restées la propriété de [b]postgres[/b]. Et je suppose que vous avez configuré [b]squashtm[/b] dans votre [b]/etc/default/squash-tm[/b].

Note: Je n'ai pas eu de problème avec le tiret dans le nom de l'utilisateur squash-tm vs squashtm.

### English version

May I suggest you to launch this sudo command with the user [b]squashtm[/b] in your case instead of [b]postgres[/b]?

The message [i]"permission denied for relation core_config"[/i] is due to the table owner of your database. You populate with [b]postgres[/b], so the owner is [b]postgres[/b]. And I guess you configure [b]squashtm[/b] in your [b]/etc/default/squash-tm[/b].

btw, I do not have issue with the dash in the username squash-tm vs squashtm.
agoethals
Messages : 70
Inscription : mer. août 08, 2018 12:08 pm

Installation with postgresql

Message par agoethals »

Hello,

[quote="Yann Dirson" post=6488]When trying to install with postgresql on Debian 8 as recommended (the "Jessie 8.0 +" is not clear whether Stretch aka. 9.0 is supported or not), we can hit a number of issues:
[/quote]
=> Stretch is indedd supported (SquashTM supports stable and oldstable Debian releases, with sometimes the need to add backports repos for oldstable, in order to have a recent enough dbconfig-common version).

[quote="Yann Dirson" post=6488]
[ul]
[li]the [url=https://sites.google.com/a/henix.fr/wik ... stallation]debian instructions[/url] do not mention that the install requires a choice between h2 and mysql. It should probably hint to select h2 and go on manually, but the fact that psql is not available here necessarily raises questions in user's mind
[/quote]
=> the Debian packaging for squash-tm has been refactored, next releases will better support postgreSQL (squash-tm configuration with dbconfig-common will offer the possibility to automatically configure a postgresql databases, and automatic configuration of mysql databases has been fixed), so there will be no longer need to select h2 and go on manually.

[quote="Yann Dirson" post=6488]
[li]the [url=https://sites.google.com/a/henix.fr/wik ... postgresql]psql instructions[/url] don't work on a freshly installed jessie, starting with an encoding-related error on CREATE DATABASE, which I could get over by following [url=https://stackoverflow.com/questions/167 ... 1|274.4785]these instructions[/url]
[/quote]
=> I indeed remeber having this error some months ago, thank you for the workaround. For information, this error has no longer been detected ever since (to my knowledge, anyway).

[quote="Yann Dirson" post=6488]
[li]then user creation is rejected because a dash in username, so I had to change "squash-tm" to "squashtm"
[/quote]
=> putting squash-tm between double quotes allows to use a dash in user name.

[quote="Yann Dirson" post=6488]
[li]then GRANT was rejected because of a syntax error, presumably missing DATABASE like in "GRANT ALL PRIVILEGES ON DATABASE squashtm TO squashtm;"
[/quote]
=> the documentation has been updated since, thank you.

[quote="Yann Dirson" post=6488]
[li]then the page does not tell about the db initialization, only in [url=http://www.squashtest.org/forum/10-inst ... ng=en#6096]this post[/url] can we get a hint, it would be great to have the relevant scripts shipped in the deb, even if not used by db-common
[/quote]
=> as I wrote above, packaging has been refactored, and postgreSQL scripts will be shipped in next releases packages.

[quote="Yann Dirson" post=6488]
[li]then it systemd is the selected init system, the squashtm service just won't launch, I had to switch back to sysvinit
[/quote]
=> We haven't noticed any problems with systemd. squash-tm ships its service files as old sysVinit scripts (in /etc/init.d/squash-tm). The systemd-sysv package allows to switch from sysV to systemd while keeping old sysVinit scripts functional. If you encounter further troubles with squash-tm service on systemd, they may be related with your system configuration (check systemctl status squash-tm and journalctl -xe for error logs)
Répondre

Revenir à « Installation & Base de données / Installation & Database »