Re: "Failed to connect to Postgres database" : No usage specified for certificate (update)

2019-10-01 Thread Adrian Klaver
On 9/30/19 9:21 AM, Marco Ippolito wrote: Hi Adrian, important update. After adding in fabric-ca-server-config.yaml ca:   # Name of this CA   name: fabric_ca   # Key file (is only used to import a private key into BCCSP)   keyfile: /etc/ssl/private/fabric_ca.key   # Certificate file (defau

Re: "Failed to connect to Postgres database" : No usage specified for certificate (update)

2019-09-30 Thread Marco Ippolito
/fabric-ca/fabric-ca-server-config.yaml > 2019/09/30 17:56:22 [INFO] Server Version: 1.4.4 > 2019/09/30 17:56:22 [INFO] Server Levels: &{Identity:2 Affiliation:1 > Certificate:1 Credential:1 RAInfo:1 Nonce:1} > 2019/09/30 17:56:22 [INFO] The CA key and certificate already exist >

Re: "Failed to connect to Postgres database"

2019-09-30 Thread Marco Ippolito
x27; 2019/09/30 17:56:22 [ERROR] Error occurred initializing database: Failed to connect to Postgres database. Postgres requires connecting to a specific database, the following databases were tried: [fabmnet_ca postgres template1]. Please create one of these database before continuing 2019/09/3

Re: "Failed to connect to Postgres database"

2019-09-28 Thread Adrian Klaver
On 9/28/19 12:07 AM, Marco Ippolito wrote: Hi Adrian, Il giorno ven 27 set 2019 alle ore 21:39 Adrian Klaver mailto:adrian.kla...@aklaver.com>> ha scritto: On 9/27/19 11:02 AM, Marco Ippolito wrote: > Thank you very much Adrian. > Two things: > > 1) >   Why if I j

Re: "Failed to connect to Postgres database"

2019-09-28 Thread Marco Ippolito
Hi Adrian, Il giorno ven 27 set 2019 alle ore 21:39 Adrian Klaver < adrian.kla...@aklaver.com> ha scritto: > On 9/27/19 11:02 AM, Marco Ippolito wrote: > > Thank you very much Adrian. > > Two things: > > > > 1) > > Why if I just specify through port the cluster and the host connection > > I con

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Adrian Klaver
On 9/27/19 11:19 AM, Marco Ippolito wrote: Sorry again, I was cheering up too quickly. With this configuration in fabric-ca-server-config.yaml :    db:   type: postgres   datasource: host=localhost port=5433 user=postgres password=1234 dbname=fabmnet_ca sslmode=disable   tls:  

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Adrian Klaver
On 9/27/19 11:02 AM, Marco Ippolito wrote: Thank you very much Adrian. Two things: 1)  Why if I just specify through port the cluster and the host connection I connect correctly with SSL,  but if I specify also the database and the user it connects it doesn't usel SSL connection, or at least

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Marco Ippolito
erver Version: 1.4.4 > 2019/09/27 19:37:46 [INFO] Server Levels: &{Identity:2 Affiliation:1 > Certificate:1 Credential:1 RAInfo:1 Nonce:1} > 2019/09/27 19:37:46 [INFO] The CA key and certificate already exist > 2019/09/27 19:37:46 [INFO] The key is stored by BCCSP provider

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Marco Ippolito
19:37:46 [INFO] The certificate is at: /home/marco/fabric/fabric-ca/ca-cert.pem 2019/09/27 19:37:46 [WARNING] Failed to connect to database 'fabmnet_ca' 2019/09/27 19:37:46 [WARNING] Failed to connect to database 'postgres' 2019/09/27 19:37:46 [WARNING] Failed to conne

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Adrian Klaver
    client:         certfile:         keyfile: Initializing the fabric-ca-server gives "Failed to connect to Postgres database" and in postgresql-11-fabmnet.log : sslv3 alert bad certificate (base) marco@pc:~/fabric/fabric-ca$ fabric-ca-server init -b admin:adminpw 2019/09/27 17:07:27 [INFO

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Marco Ippolito
=verify-full tls: enabled: false certfiles: client: certfile: keyfile: Initializing the fabric-ca-server gives "Failed to connect to Postgres database" and in postgresql-11-fabmnet.log : sslv3 alert bad certificate (base) marco@pc:~/fabric/fabric-ca$ fabric-c

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Marco Ippolito
datasource: host=localhost port=5433 user=postgres password=pwd dbname=fabmnet_ca sslmode=verify-full tls: enabled: false certfiles: client: certfile: keyfile: Initializing the fabric-ca-server gives "Failed to connect to Postgres database" and in po

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Adrian Klaver
On 9/27/19 5:58 AM, Marco Ippolito wrote: Thanks Daniel. After adding the password, now ssh connection to the cluster fabmnet works: You might want to take a look at: https://help.ubuntu.com/lts/serverguide/postgresql.html And may be the fact the it's compulsory to add a password is testifie

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Marco Ippolito
Thanks Daniel. After adding the password, now ssh connection to the cluster fabmnet works: postgres=# \l List of databases Name| Owner | Encoding | Collate | Ctype | Access privileges +--+--+-+-+-

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Daniel Verite
Marco Ippolito wrote: > (base) postgres@pc:~$ psql --cluster 11/fabmnet -h localhost > Password for user postgres: > psql: FATAL: password authentication failed for user "postgres" > FATAL: password authentication failed for user "postgres" Did you set a password for the postgres user i

Re: "Failed to connect to Postgres database"

2019-09-27 Thread Marco Ippolito
x27;SW' > > 2019/09/26 15:56:50 [INFO] The certificate is at: /home/marco/fabric > > /fabric-ca/ca-cert.pem > > 2019/09/26 15:56:50 [WARNING] Failed to connect to database > > 'fabmnetdb' > > 2019/09/26 15:56:50 [WARNING] Failed to connect to database &g

Re: "Failed to connect to Postgres database"

2019-09-26 Thread rob stone
6 15:56:50 [WARNING] Failed to connect to database > 'template1' > 2019/09/26 15:56:50 [ERROR] Error occurred initializing database: > Failed > to connect to Postgres database. Postgres requires connecting to a > specific database, the following databases were tried: [fabmnetdb

Re: "Failed to connect to Postgres database"

2019-09-26 Thread Adrian Klaver
On 9/26/19 10:10 AM, Marco Ippolito wrote: Hi Adrian, I removed the previous fabmentdb and created a new one whose owner is postgres: (base) postgres@pc:/usr/local/pgsql$ psql --cluster 11/fabmnet psql (11.5 (Ubuntu 11.5-1.pgdg18.04+1)) Type "help" for help. postgres=# \l                  

Re: "Failed to connect to Postgres database"

2019-09-26 Thread Marco Ippolito
Hi Adrian, I removed the previous fabmentdb and created a new one whose owner is postgres: (base) postgres@pc:/usr/local/pgsql$ psql --cluster 11/fabmnet psql (11.5 (Ubuntu 11.5-1.pgdg18.04+1)) Type "help" for help. postgres=# \l List of databases Name| Owne

Re: "Failed to connect to Postgres database"

2019-09-26 Thread Adrian Klaver
On 9/26/19 7:21 AM, Marco Ippolito wrote: In order to restart from a clean situation and configuration, I removed the previous fabric-ca folder, created a new one, and then initiated the fabric-ca-server. With the default SQLite everything seem working fine. But one I try to use the PostgreSQL-

"Failed to connect to Postgres database"

2019-09-26 Thread Marco Ippolito
WARNING] Failed to connect to database 'fabmnetdb' > 2019/09/26 11:56:18 [WARNING] Failed to connect to database 'postgres' > 2019/09/26 11:56:18 [WARNING] Failed to connect to database 'template1' > 2019/09/26 11:56:18 [ERROR] Error occurred initializing database: F