Problème Database

56 views
Skip to first unread message

UBIqube Solutions

unread,
Sep 18, 2014, 6:03:46 AM9/18/14
to silverpe...@googlegroups.com

Bonjour,


J’ai fait l’installation et la configuration de Silverpeas et je tombe sur un problème de création de base de données suite à une erreur de Login. Il est correct car je peux me connecter et créer une base sur Postgres. Avez-vous une idée sur l’erreur que j’ai pu faire ?

Merci de votre retour.


Logs de la creation de la base en ligne de commande :

create database SilverpeasV5;

ERROR:  database "silverpeasv5" already exists

 

Logs error de ./dBuilder.sh

 

root@ServerValidation bin]# ./dbBuilder.sh

 

Start Database build using Silverpeas V 5.13.5 DBBuilder v 9/16/14 2:05 PM.

...org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "postgres")

        at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)

        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)

        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)

        at org.silverpeas.dbbuilder.sql.ConnectionFactory.getConnection(ConnectionFactory.java:75)

        at org.silverpeas.dbbuilder.sql.ConnectionFactory.getConnectionInfo(ConnectionFactory.java:84)

        at org.silverpeas.dbbuilder.DBBuilder.main(DBBuilder.java:136)

Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"

        at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:398)

        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:173)

        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)

        at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)

        at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)

        at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)

        at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)

        at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)

        at org.postgresql.Driver.makeConnection(Driver.java:393)

        at org.postgresql.Driver.connect(Driver.java:267)

        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)

        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)

        at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)

        at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)

        ... 5 more

.

ERROR - Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "postgres").

ERROR - Database build FAILED (9/16/14 2:05 PM).*******************************************************************

Database build FAILED (9/16/14 2:05 PM).

[root@ServerValidation bin]#

[root@ServerValidation bin]#

 

Fichier de configuration config.properties de silverpeas

 

[root@ServerValidation bin]# cat ../setup/settings/

config.properties         JBossSettings.xml         sample_config.properties  SilverpeasSettings.xml

[root@ServerValidation bin]# cat ../setup/settings/config.properties

# Copyright (C) 2000 - 2013 Silverpeas

#

# This program is free software: you can redistribute it and/or modify

# it under the terms of the GNU Affero General Public License as

# published by the Free Software Foundation, either version 3 of the

# License, or (at your option) any later version.

#

# As a special exception to the terms and conditions of version 3.0 of

# the GPL, you may redistribute this Program in connection withWriter Free/Libre

# Open Source Software ("FLOSS") applications as described in Silverpeas's

# FLOSS exception.  You should have recieved a copy of the text describing

# the FLOSS exception, and it is also available here:

# "http://www.silverpeas.org/legal/licensing"

#

# This program is distributed in the hope that it will be useful,

# but WITHOUT ANY WARRANTY; without even the implied warranty of

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

# GNU Affero General Public License for more details.

#

# You should have received a copy of the GNU Affero General Public License

# along with this program.  If not, see <http://www.gnu.org/licenses/>.

 

# SILVERPEAS_HOME_DEPENDANT=${SILVERPEAS_HOME}

# SILVERPEAS_DATA_HOME=${SILVERPEAS_HOME}/data

# SILVERPEAS_DATA_WEB=${SILVERPEAS_HOME}/data/web

# JBOSS_LISTEN_PORT=8000

# JBOSS_SERVER_PROFILE=default

# RAM_MAX=

# PERMSIZE_MAX=512

# JAVA_OPTS=

 

DB_SERVERTYPE=POSTGRES

DB_SERVER=localhost

DB_USER=postgres

DB_PASSWD=Ubiqube

DB_NAME=silverpeasv5

# MIN_POOL_SIZE=5

# MAX_POOL_SIZE=200

# IDLE_TIMEOUT=15

# STATEMENT_CACHE_SIZE=0

# SQL_LISTEN_PORT_MSSQL=1433

# SQL_LISTEN_PORT_ORACLE=1521

SQL_LISTEN_PORT_POSTGRES=5432

# SQL_LISTEN_PORT_H2=9092

 

ADMIN_LOGIN=SilverAdmin

ADMIN_PASSWD=SilverAdmin

# ADMIN_EMAIL=silveradmin@localhost

URL_SERVER=http://localhost:8000

 

# SMTP_SERVER=localhost

# SMTP_AUTHENTICATION=false

# SMTP_PORT=25

# SMTP_USER=

# SMTP_PWD=

# SMTP_SECURE=false

 

# PROXY_HOST=

# PROXY_PORT=

# NONPROXY_HOST=127.0.0.1|localhost

 

#LANGUAGE=fr

 

#webdav.workspace=jackrabbit

Miguel Moquillon

unread,
Sep 18, 2014, 9:06:26 AM9/18/14
to silverpe...@googlegroups.com
Bonjour,

Je suppose que pour créer la base de données en ligne de commande vous avez exécuté
une commande similaire à celle-ci :
$ sudo -u postgres psql -c 'create database "silverpeasv5"'

La connexion à la base de données ou à PostgreSQL avec une telle ligne de commande
fonctionne parce que vous vous connectez en tant qu'utilisateur Unix postgres (via le compte Unix) auquel est associé le compte utilisateur PostgreSQL de même nom.

La conf par défaut de PostgreSQL sous GNU/Linux est de n'autoriser la connexion de l'administrateur (postgres) que par le biais de son compte local Unix (ceci pour des raisons de sécurité) ; c'est une connexion locale et non réseau.

Or, l'outil dbBuilder ouvre une connexion réseau  avec les crédences d'un utilisateur PostgreSQL. Par conséquence la connexion à la base de données avec le compte postgres lui est refusé par le SGBDR.

Pour palier à ce problème, vous avez deux possibilités :
- soit vous créez un utilisateur PostgreSQL particulier avec des droits d'admin uniquement sur la base silverpeasv5 et c'est par cet utilisateur que Silverpeas (et dbBuilder) accède à la base de donnée.
- soit vous modifiez le fichier de conf pg_hba.conf de manière à autoriser les connexions avec le compte postgres par n'importe qui en localhost.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Miguel MOQUILLON
Software Architect

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#webdav.workspace=jackrabbit --
You received this message because you are subscribed to the Google Groups "Silverpeas-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverpeas-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicolas Eysseric

unread,
Sep 23, 2014, 1:15:35 AM9/23/14
to silverpe...@googlegroups.com
Bonjour,

La réponse apportée par Miguel vous a-t-elle aidée ou rencontrez-vous encore des difficultés ?

Nicolas

UBIqube Solutions

unread,
Sep 30, 2014, 2:53:28 AM9/30/14
to silverpe...@googlegroups.com
Bonjour,

J'ai encore des difficultés.

Quand j'utilise un script dbBuilder.sh, il me semble que le script doit créer la base de données et y insérer les tables. Il s’avère que ce script ne le fait pas et que j’ai rien vu sur la doc
( peut être mal lu ) qu’il fallait au préalable créer la base. Quand la base est créée dans postgrsql, le dbBuilder.sh exécute ces commandes sans problèmes.

Savez-vous pourquoi ?

Nicolas Eysseric

unread,
Sep 30, 2014, 3:01:02 AM9/30/14
to silverpe...@googlegroups.com
Bonjour,

La création de la base de données est bien un pré-requis (Section Pre-requisite de Installation) à l'installation de Silverpeas.
En d'autres termes, le script dbBuilder.sh ne crée pas la base. Il crée le contenu seulement (tables, contraintes, index...).

Nicolas EYSSERIC
Directeur produit
06 59 55 18 25
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 place Firmin Gautier 
38000 Grenoble 
Tél : 04 76 09 31 61

 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

--
Reply all
Reply to author
Forward
0 new messages