Bonjour,
Je cherche à installer une nouvelle instance de Squash-TM (CentOS 7.5.1804 + PostgreSQL 9.6)
Voici, ce que j'ai fait :
[ol]
yum-config-manager --add-repo http://repo.squashtest.org/redhat/7/
yum install squash-tm
[/ol]
[strike]Ensuite, le problème c'est qu'il n'y a rien dans /usr/share/doc/squash-tm/database-scripts/ (Il n'y a d'ailleurs aucun dossier /usr/share/doc/squash-tm/. De même "locate" ne trouve aucune référence à ces databases-scripts ?
Est-ce que c'est normal ? Est-ce que je dois les récupérer depuis l'archive téléchargée ?[/strike]
Merci à vous.
Edition :
Je me permets d'ajouter que la commande [url=https://sites.google.com/a/henix.fr/wik ... postgresql]PostgreSQL pour créer l'utilisateur n'est pas correcte[/url].
Soit il faut échapper le nom d'utilisateur contenant un tiret avec des doubles-quotes.
CREATE DATABASE squashtm WITH ENCODING='UTF8';
CREATE USER "squash-tm" WITH PASSWORD 'initial_pw';
GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";
Soit retirer le tirer (plus correct à mon avis) :
CREATE DATABASE squashtm WITH ENCODING='UTF8';
CREATE USER squashtm WITH PASSWORD 'initial_pw';
GRANT ALL PRIVILEGES ON DATABASE squashtm TO squashtm;
Dernière Edition : J'avais fait une erreur, le paquet n'a pas été correctement téléchargé la première fois à cause d'une coupure de connexion (pas vu...). Désolé.
CentOS7.5/PostgreSQL : Pas de script de database
CentOS7.5/PostgreSQL : Pas de script de database
Bonjour,
Merci à vous pour la correction de la commande PostgreSQL.
Autrement, avez-vous réussi votre installation ?
Merci à vous pour la correction de la commande PostgreSQL.
Autrement, avez-vous réussi votre installation ?
CentOS7.5/PostgreSQL : Pas de script de database
Bonjour,
Je reviens sur le sujet après quelques mois d’absence.
Je suis reparti d'une base propre et je rencontre un nouveau blocage.
Voici la procédure que j'ai fait :
Sur une VM CentOS 7.5 avec PostgreSQL 9.6.11.
[ol]
Ajout du dépot SquashTM
Installation de Java et Squash TM yum install java squash-tm
Population de la base avec le script lancé avec l'utilisateur postgressu - postgres
psql
Ajout de l'utilisateur de la base squashtm et de l'utilisateur squash-tmpsql
CREATE DATABASE squashtm WITH ENCODING='UTF8';
CREATE USER "squash-tm" WITH PASSWORD 'XXXXXXXXX';
GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";
Ajout d'une autorisation à se connecter en local en mode trust dans /var/lib/pgsql/9.6/data/pg_hba.conf host all squashtm 127.0.0.1/32 trust
Modification de /etc/sysconfig/squash-tm avec DB_URL="jdbc:postgresql://localhost:5432/squashtm"
DB_TYPE="postgresql"
DB_USERNAME="squash-tm"
DB_PASSWORD="XXXXXXXXXXXX"
[/ol]
Au lancement, j'ai les erreurs suivantes dans /var/log/squash-tm/squash-tm.log
[19-01-11 09:45:23.111] SquashTM - 86697 ERROR [main] [] --- org.hibernate.engine.jdbc.spi.SqlExceptionHelper: ERROR: relation "core_config" does not exist
[19-01-11 09:45:23.143] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'dataSourceInitializer' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.151] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'org.springframework.context.annotation.internalScheduledAnnotationProcessor' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.155] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.156] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.165] SquashTM - 86697 ERROR [main] [] --- org.springframework.boot.SpringApplication: Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'squashServletConfig': Unsatisfied dependency expressed through field 'credentialsProvider'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'squashtest.tm.service.CredentialsProvider': Unsatisfied dependency expressed through field 'storedCredentialsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storedCredentialsManagerImpl': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Je vois dans ce [url=https://www.squashtest.org/forum/10-ins ... ql?lang=en]topic[/url] qu'il semblerait falloir utiliser l'utilisateur squash-tm pour importer le script sql ?
Est-ce le cas ?
[attachment=678]2019-01-11-squash-tm.txt[/attachment]
Je reviens sur le sujet après quelques mois d’absence.
Je suis reparti d'une base propre et je rencontre un nouveau blocage.
Voici la procédure que j'ai fait :
Sur une VM CentOS 7.5 avec PostgreSQL 9.6.11.
[ol]
Ajout du dépot SquashTM
Installation de Java et Squash TM yum install java squash-tm
Population de la base avec le script lancé avec l'utilisateur postgressu - postgres
psql
Ajout de l'utilisateur de la base squashtm et de l'utilisateur squash-tmpsql
CREATE DATABASE squashtm WITH ENCODING='UTF8';
CREATE USER "squash-tm" WITH PASSWORD 'XXXXXXXXX';
GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";
Ajout d'une autorisation à se connecter en local en mode trust dans /var/lib/pgsql/9.6/data/pg_hba.conf host all squashtm 127.0.0.1/32 trust
Modification de /etc/sysconfig/squash-tm avec DB_URL="jdbc:postgresql://localhost:5432/squashtm"
DB_TYPE="postgresql"
DB_USERNAME="squash-tm"
DB_PASSWORD="XXXXXXXXXXXX"
[/ol]
Au lancement, j'ai les erreurs suivantes dans /var/log/squash-tm/squash-tm.log
[19-01-11 09:45:23.111] SquashTM - 86697 ERROR [main] [] --- org.hibernate.engine.jdbc.spi.SqlExceptionHelper: ERROR: relation "core_config" does not exist
[19-01-11 09:45:23.143] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'dataSourceInitializer' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.151] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'org.springframework.context.annotation.internalScheduledAnnotationProcessor' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.155] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.156] SquashTM - 86697 ERROR [main] [] --- org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39a054a5: startup date
[19-01-11 09:45:23.165] SquashTM - 86697 ERROR [main] [] --- org.springframework.boot.SpringApplication: Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'squashServletConfig': Unsatisfied dependency expressed through field 'credentialsProvider'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'squashtest.tm.service.CredentialsProvider': Unsatisfied dependency expressed through field 'storedCredentialsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storedCredentialsManagerImpl': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Je vois dans ce [url=https://www.squashtest.org/forum/10-ins ... ql?lang=en]topic[/url] qu'il semblerait falloir utiliser l'utilisateur squash-tm pour importer le script sql ?
Est-ce le cas ?
[attachment=678]2019-01-11-squash-tm.txt[/attachment]
- Pièces jointes
-
- 2019-01-11-squash-tm.txt
- (218.82 Kio) Téléchargé 127 fois
CentOS7.5/PostgreSQL : Pas de script de database
C'est bon, j'ai réussi à dépasser tous les problèmes. Voici ma procédure pour installation de Squash-TM sur CentOS 7.5 avec un PostgreSQL 9.6 installé depuis les serveurs officiels PostgreSQL
[ol]
[li]Ajouter le dépôt /etc/yum.repos.d/squashtest.repo
[code][squashtest]
name=Squashtest
baseurl=http://repo.squashtest.org/redhat/7/
gpgcheck=1[/code][/li]
[li]Importer la clé et installer Squash-TM, JAVA[code]rpm --import http://repo.squashtest.org/repo.squashtest.org.gpg.key
yum update
yum install java squash-tm[/code][/li]
[li]Crétation de l'utilisateur PostgreSQL squash-tm[code]su - postgres
psql
CREATE USER "squash-tm" WITH PASSWORD 'XXXXXXXXX';
CREATE DATABASE squashtm WITH ENCODING='UTF8' OWNER "squash-tm";
GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";[/code][/li]
[li]Peuplement de la base avec le script avec l'utilisateur squash-tm
[code]psql --username="squash-tm" -d squashtm -f /usr/share/doc/squash-tm/database-scripts/postgresql-full-install-version-1.18.4.RELEASE.sql
[/code][/li]
[li]Autorisation de la connexion à la base en local en mode trust dans /var/lib/pgsql/9.6/data/pg_hba.conf[code]host all squash-tm 127.0.0.1/32 trust[/code]
[/li]
[li]Edition de /etc/sysconfig/squash-tm pour connexion base[code]DB_URL="jdbc:postgresql://localhost:5432/squashtm"
DB_TYPE="postgresql"
DB_USERNAME="squash-tm"
DB_PASSWORD="XXXXXXXXXXXX"[/code][/li]
[li]Activation service et lancement Squash-TM[code]systemctl enable squash-tm
systemctl restart postgresql-9.6.service
systemctl start squash-tm[/code][/li]
[/ol]
[ol]
[li]Ajouter le dépôt /etc/yum.repos.d/squashtest.repo
[code][squashtest]
name=Squashtest
baseurl=http://repo.squashtest.org/redhat/7/
gpgcheck=1[/code][/li]
[li]Importer la clé et installer Squash-TM, JAVA[code]rpm --import http://repo.squashtest.org/repo.squashtest.org.gpg.key
yum update
yum install java squash-tm[/code][/li]
[li]Crétation de l'utilisateur PostgreSQL squash-tm[code]su - postgres
psql
CREATE USER "squash-tm" WITH PASSWORD 'XXXXXXXXX';
CREATE DATABASE squashtm WITH ENCODING='UTF8' OWNER "squash-tm";
GRANT ALL PRIVILEGES ON DATABASE squashtm TO "squash-tm";[/code][/li]
[li]Peuplement de la base avec le script avec l'utilisateur squash-tm
[code]psql --username="squash-tm" -d squashtm -f /usr/share/doc/squash-tm/database-scripts/postgresql-full-install-version-1.18.4.RELEASE.sql
[/code][/li]
[li]Autorisation de la connexion à la base en local en mode trust dans /var/lib/pgsql/9.6/data/pg_hba.conf[code]host all squash-tm 127.0.0.1/32 trust[/code]
[/li]
[li]Edition de /etc/sysconfig/squash-tm pour connexion base[code]DB_URL="jdbc:postgresql://localhost:5432/squashtm"
DB_TYPE="postgresql"
DB_USERNAME="squash-tm"
DB_PASSWORD="XXXXXXXXXXXX"[/code][/li]
[li]Activation service et lancement Squash-TM[code]systemctl enable squash-tm
systemctl restart postgresql-9.6.service
systemctl start squash-tm[/code][/li]
[/ol]