PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 30/12/2009 13:26:21

artucus
Membre

[RÉSOLU] could not load server certificate file "server.crt": No s

bonjour
je suis sous kubuntu (bt4) monter sur un dd usb

je ne connais absolument pas PostgreSQL


donc voici toute les manip effectué

au démarage j 'ai une erreur de dépendence de postgresql
ayant suivi le wiki il semblerait que je n 'ai pas le paquet : >postgresql-common ssl-cert

je ne le trouve pas non plus avec synaptic

hors
le msg d'erreur viendrait de ce paquet manquant

je n 'arirve pas a faire de copier coller des détails du msg d'erreur synaptic, donc voici ce que j 'ai fait en terminal
, je ne sais pas ou trouver le log de connection me sortant les erreurs

moi@kubuntu:~$ finger postgres
Login: postgres                         Name: PostgreSQL administrator
Directory: /var/lib/postgresql          Shell: /bin/bash
Never logged in.
No mail.
No Plan.
moi@kubuntu:~$  sudo -s -u postgres
[sudo] password for moi:
postgres@kubuntu:~$ psql
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"?
postgres@kubuntu:~$

---------------------------------------------------------------------------------------------------------------------------
Utilise la ligne de commande pour voir les erreurs.

sudo aptitude update

pour mettre à jour la liste des dépôts puis

sudo aptitude install postgresql-common

Si tu as des erreurs, affiche les wink
----------------------------------------------------------------------------------------------------------------

les errreur

après avoir suivis tes indications voici les erreurs

Starting PostgreSQL 8.3 database server: main* The PostgreSQL server failed to s
tart. Please check the log output:
2009-12-30 00:30:57 CET FATAL:  could not load server certificate file "server.c
rt": No such file or directory
 failed!
invoke-rc.d: initscript postgresql-8.3, action "start" failed.
dpkg: error processing postgresql-8.3 (--configure):
 subprocess post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup erro
r from a previous failure.
                          dpkg: dependency problems prevent configuration of pos
tgresql:
 postgresql depends on postgresql-8.3; however:
  Package postgresql-8.3 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postgresql-8.3
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up postgresql-8.3 (8.3.8-0ubuntu8.10) ...
Starting PostgreSQL 8.3 database server: main* The PostgreSQL server failed to s
tart. Please check the log output:
2009-12-30 00:30:59 CET FATAL:  could not load server certificate file "server.c                                                                                                rt": No such file or directory
 failed!
invoke-rc.d: initscript postgresql-8.3, action "start" failed.
dpkg: error processing postgresql-8.3 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.3; however:
  Package postgresql-8.3 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postgresql-8.3
 postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done

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

u pourrais faire une réinstallation/installation de postgresql ?

sudo aptitude install postgresql

Si ça ne fait rien :

sudo aptitude reinstall postgresql

Et de la même manière, balance les messages.

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

les mesages d erreurs

 sudo aptitude install postgresql
[sudo] password for moi:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following partially installed packages will be configured:
  postgresql postgresql-8.3
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up postgresql-8.3 (8.3.8-0ubuntu8.10) ...
Starting PostgreSQL 8.3 database server: main* The PostgreSQL server failed to start. Please check the log output:
2009-12-30 04:12:07 CET FATAL:  could not load server certificate file "server.crt": No such file or directory
 failed!
invoke-rc.d: initscript postgresql-8.3, action "start" failed.
dpkg: error processing postgresql-8.3 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.3; however:
  Package postgresql-8.3 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 postgresql-8.3
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up postgresql-8.3 (8.3.8-0ubuntu8.10) ...
Starting PostgreSQL 8.3 database server: main* The PostgreSQL server failed to start. Please check the log output:
2009-12-30 04:12:10 CET FATAL:  could not load server certificate file "server.crt": No such file or directory
 failed!
invoke-rc.d: initscript postgresql-8.3, action "start" failed.
dpkg: error processing postgresql-8.3 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.3; however:
  Package postgresql-8.3 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postgresql-8.3
 postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done

moi@kubuntu:~$ sudo aptitude reinstall postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages will be REINSTALLED:
  postgresql
The following partially installed packages will be configured:
  postgresql-8.3
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up postgresql-8.3 (8.3.8-0ubuntu8.10) ...
Starting PostgreSQL 8.3 database server: main* The PostgreSQL server failed to start. Please check the log output:
2009-12-30 04:12:42 CET FATAL:  could not load server certificate file "server.crt": No such file or directory
 failed!
invoke-rc.d: initscript postgresql-8.3, action "start" failed.
dpkg: error processing postgresql-8.3 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.3; however:
  Package postgresql-8.3 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 postgresql-8.3
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up postgresql-8.3 (8.3.8-0ubuntu8.10) ...
Starting PostgreSQL 8.3 database server: main* The PostgreSQL server failed to start. Please check the log output:
2009-12-30 04:12:44 CET FATAL:  could not load server certificate file "server.crt": No such file or directory
 failed!
invoke-rc.d: initscript postgresql-8.3, action "start" failed.
dpkg: error processing postgresql-8.3 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.3; however:
  Package postgresql-8.3 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postgresql-8.3
 postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done

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

merci d'avance de vos aides neutral

Hors ligne

#2 30/12/2009 14:21:46

gleu
Administrateur

Re : [RÉSOLU] could not load server certificate file "server.crt": No s

Que donne un "dpkg -l | grep postgres" ?


Guillaume.

Hors ligne

#3 30/12/2009 14:32:59

artucus
Membre

Re : [RÉSOLU] could not load server certificate file "server.crt": No s

bonjour Gleu voi ci la réponse

moi@kubuntu:~$ "dpkg -l | grep postgres" ?
bash: dpkg -l | grep postgres: command not found
moi@kubuntu:~$ dpkg -l | grep postgres" ?
>

jai essayé 1 fois avec les guillemets devant , > une foi sans , >et une foi toute les comande en sudo

merci à toi

Hors ligne

#4 30/12/2009 15:23:08

Marc Cousin
Membre

Re : [RÉSOLU] could not load server certificate file "server.crt": No s

Sans les guillemets, et sans le point d'interrogation


Marc.

Hors ligne

#5 30/12/2009 15:31:26

artucus
Membre

Re : [RÉSOLU] could not load server certificate file "server.crt": No s

merci Marc Cousin smile

voici le retour

moi@kubuntu:~$ dpkg -l | grep postgres
iU  postgresql                                 8.3.8-0ubuntu8.10                       object-relational SQL database (supported ve
iF  postgresql-8.3                             8.3.8-0ubuntu8.10                       object-relational SQL database, version 8.3
ii  postgresql-client-8.3                      8.3.8-0ubuntu8.10                       front-end programs for PostgreSQL 8.3
ii  postgresql-client-common                   90                                      manager for multiple PostgreSQL client versi
ii  postgresql-common                          90                                      PostgreSQL database-cluster manager
moi@kubuntu:~$

Hors ligne

#6 30/12/2009 15:54:26

daamien
damien clochard

Re : [RÉSOLU] could not load server certificate file "server.crt": No s

Apparement le paramètre ssl est 'on' mais il n'y a pas de certificat SSL.

Je vois deux solutions.

A/ Tout désinstaller, installer le paquet ssl-cert puis reinstaller les paquets postgresql

B/ Créer le certificats "à la main"

su - postgres
cd /etc/postgresql/8.3/main/
openssl req -new -text -out server.req
openssl rsa -in privkey.pem -out server.key
rm privkey.pem
openssl req -x509 -in server.req -text -key server.key -out server.crt
chmod og-rwx server.key
chown postgres.postgres server.key
cd /var/lib/postgresql/8.3/main
ln -s /etc/postgresql/8.3/main/server.key .
ln -s /etc/postgresql/8.3/main/server.crt .

Hors ligne

#7 30/12/2009 16:31:53

artucus
Membre

Re : [RÉSOLU] could not load server certificate file "server.crt": No s

merci de vos aides big_smile

j'ai essayé la deuxième solution en premier :> je rencontrai des pb de droit en écriture

j'ai donc tout réinstallé et à priori cela fonctionne

encore merci)))

Hors ligne

Pied de page des forums