Error while Initializating Fabric-CA server - hyperledger-fabric

I am trying to initialize fabric-ca following its user guide using this config file but when executing the following command:
fabric-ca-server init --cafiles fabric-ca-server-config.yaml
I am getting the following error:
2018/11/12 22:59:45 [DEBUG] Intializing nonce manager for issuer 'undercroft'
2018/11/12 22:59:45 [DEBUG] Closing server DBs
2018/11/12 22:59:45 [FATAL] Initialization failure: CA name 'undercroft' is used in '/home/paradox/hyperledger/fabric/undercroft/fabric-ca/server/fabric-ca-server-config.yaml' and '/home/paradox/hyperledger/fabric/undercroft/fabric-ca/server/fabric-ca-server-config.yaml'
While I am getting this error if I am using the command line flags of fabric-ca-server I am successfully able to initialize and launch the
This is the full error log

As of now the --cafiles flag is only used when there are multiple CAs, in case of a single ca it will only use the config file at the $FABRIC_CA_SERVER_HOME directory.

Have you try if you change the CN of the fabric-ca-server ? or change the name of the CA ?

Related

Startup IAM Services failed

C:\domino-iam-service>npm start
> domino-iam-service#2.2.0 start
> cross-env NODE_ENV=production node iam-server.js
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
[11:52:41][info][master][master]: IAM version: 2.2.0
Start to unlock config:
? Enter current IAM server password: ********
Config is unlocked.
[11:53:43][info][master][master]: Starts as cluster mode.
[11:53:43][info][stats][master]: IAM StatsClient enabled: false
[11:53:43][info][cluster][master]: Worker 1 is started
[11:53:43][info][cluster][master]: Worker 2 is started
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
[11:53:49][info][worker][worker-1]: Worker 1 starts to provide service, which process id is: 3752
[11:53:49][info][initServices][worker-1]: Start IAM service on allAddress:9443
[11:53:49][info][worker][worker-2]: Worker 2 starts to provide service, which process id is: 2772
[11:53:49][info][stats][worker-1]: IAM StatsClient enabled: false
[11:53:49][info][initServices][worker-2]: Start IAM service on allAddress:9443
[11:53:50][warn][DBConnector][worker-1]: dbConfig.dominoConfig.credential.CLIENT_KEY_PASSPHRASE setting is empty, it is NOT SECURE.
[11:53:50][info][stats][worker-2]: IAM StatsClient enabled: false
[11:53:50][warn][DBConnector][worker-1]: Please use openssl tool to add passphrase for your client key file.
[11:53:50][warn][DBConnector][worker-2]: dbConfig.dominoConfig.credential.CLIENT_KEY_PASSPHRASE setting is empty, it is NOT SECURE.
[11:53:50][warn][DBConnector][worker-2]: Please use openssl tool to add passphrase for your client key file.
[11:53:50][error][ClusterCache][worker-2]: Error occurred when constructing ClusterCache with error: timeout
[11:53:50][error][ClusterCache][worker-1]: Error occurred when constructing ClusterCache with error: timeout
[11:53:50][info][DBConnector][worker-2]: Domino isn't connected, retry after 30s
[11:53:50][info][DBConnector][worker-1]: Domino isn't connected, retry after 30s
The domino server with only one error message.
0554:0002-0594] 2022/07/14 下午 12:06:17 AMgr: Error executing agent 'DeleteExpiredDocs' in 'iam-store.nsf'. Agent signer 'Domino Template Development/Domino': You are not authorized to perform that operation

Databricks DBT Runtime Error, cannot connect to Database. Maybe an SSL error?

I have a custom Databricks instance with a Domain name that points to an AWS Load Balancer. When I put that information in using either the HTTP instructions here or the databricks cluster instructions here, I get this response in the DBT CLI:
Connection:
host: https://subdomain.domain.com
port: 443
cluster: 123456-stuff00003
endpoint: None
schema: default
organization: 0
16:40:39.470091 [debug] [MainThread]: Acquiring new spark connection "debug"
16:40:39.471632 [debug] [MainThread]: Using spark connection "debug"
16:40:39.472524 [debug] [MainThread]: On debug: select 1 as id
16:40:39.472953 [debug] [MainThread]: Opening a new connection, currently in state init
Connection test: [ERROR]
1 check failed:
dbt was unable to connect to the specified database.
The database returned the following error:
>Runtime Error
Database Error
failed to connect
Unfortunately, DBT's debugging logs are terrible and I am not entirely sure why it is failing. I do know that when I connect to the cluster via Intellij I have to provide the CA file, the Client Certificate file, and the Client key file, because I am using a self-signed SSL cert (unfortunately, the self signed cert is required). Also, when defining my ~/.databrickscfg file I have to provide the argument insecure = true.
I've encountered this issue recently and I fixed it by installing root certificates by executing the "Install Certificates.command" script in the python home directory used to run dbt.
Laurent

Install TinyTex on a Ubuntu based Docker image: cannot verify yihui.org's certificate

I'm trying to build a Docker image, based on ubuntu:20.04, with R and bookdown with PDF support. But I'm getting ERROR: cannot verify yihui.org's certificate [...] with tinytex::install_tinytex():
> tinytex::install_tinytex()
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz'
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz'
--2020-11-23 09:19:05-- https://yihui.org/tinytex/TinyTeX-1.tar.gz
Resolving yihui.org (yihui.org)... 167.99.129.42, 134.209.226.211
Connecting to yihui.org (yihui.org)|167.99.129.42|:443... connected.
ERROR: cannot verify yihui.org's certificate, issued by 'CN=SSL-SG1-GROBU,OU=Operations,O=Cloud Services,C=US':
Unable to locally verify the issuer's authority.
To connect to yihui.org insecurely, use `--no-check-certificate'.
Error in download.file(url, output, ..., method = method) :
'wget' call had nonzero exit status
Calls: <Anonymous> ... download_file -> <Anonymous> -> download -> download.file
In addition: Warning messages:
1: In download.file(url, output, ..., method = method) :
URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz': status was 'SSL peer certificate or SSH remote key was not OK'
2: In download.file(url, output, ..., method = method) :
URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz': status was 'SSL peer certificate or SSH remote key was not OK'
You may have to restart your system after installing TinyTeX to make sure ~/bin appears in your PATH variable (https://github.com/yihui/tinytex/issues/16).
Execution halted
I need to find a way to verify and trust the certificate chain from yihui.org, as I'm not allowed to bypass the verification with --no-check-certificate.
Thanks in advance for any hint!
Mihai
The default docker image has no certificates installed, therefore there are also no root certificates. That is what is indicated by the error message Unable to locally verify the issuer's authority. You can obtain the root certificates from the package ca-certificates (install it via apt-get).

Hyperledger first network sample error

I am following this link first-network to run hyperledger samples name first-network.
I am using Ubuntu 18.04LTS
./byfn.sh -m generate got successfully executed.
When I am trying to execute ./byfn.sh -m up I am getting error
`2018-05-08 08:45:22.485 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp folder
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
Edits 1: Adding docker compose files
docker-compose-cli.yaml
docker-compose-couch.yaml
docker-compose-e2e.yaml
docker-compose-couch-org3.yaml
docker-compose-e2e-template.yaml
docker-compose-org3.yaml
Your crypto materials are not getting generated properly as required . Check that you have all the Prerequisites installed on the platform(s) I hope you have downloaded all the platform specific binaries https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.sh
This will make sure you have the correct Cryptogen and Configtxgen tools for creating crypto material,ca clients and channel configurations .

Hyperledger Fabric 1.0 e2e failure

I am facing couple of issues when running e2e_cli examples.
I was able to complete all the steps(mentioned in documentation) before running this example
LOGS
sudo ./network_setup.sh up sahil
Channel name - sahil
Building configtxgen
Makefile:72: *** "No go in PATH: Check dependencies". Stop.
Generating genesis block
2017/04/19 13:00:16 Loading configuration
2017/04/19 13:00:16 Could not find configtx.yaml in paths of [ ].Try setting ORDERER_CFG_PATH, PEER_CFG_PATH, or GOPATH correctly.
mv: cannot stat 'orderer.block': No such file or directory
Generating channel configuration transaction
2017/04/19 13:00:16 Loading configuration
2017/04/19 13:00:16 Could not find configtx.yaml in paths of [ ].Try setting ORDERER_CFG_PATH, PEER_CFG_PATH, or GOPATH correctly.
mv: cannot stat 'channel.tx': No such file or directory
Starting orderer0
peer0 is up-to-date
peer1 is up-to-date
peer2 is up-to-date
peer3 is up-to-date
Recreating cli
Channel name : sahil
2017-04-19 13:00:18.269 UTC [logging] InitFromViper -> DEBU 001 Setting default logging level to DEBUG for command 'channel'
2017-04-19 13:00:18.269 UTC [msp] GetLocalMSP -> DEBU 002 Returning existing local MSP
2017-04-19 13:00:18.269 UTC [msp] GetDefaultSigningIdentity -> DEBU 003 Obtaining default signing identity
Error connecting: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure
Error: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure
Usage:
peer channel create [flags]
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==================
go is in path
sahil.kapoor#a1dvmcphdlt01:~/work/src/github.com/hyperledger/fabric/examples/e2e_cli $ go version
go version go1.8 linux/amd64
Could not find configtx.yaml in paths of [ ].. This file also present.
GOPATH=/home/sahil.kapoor/work
GOROOT=/usr/local/go
And my farbic folder is inside GOPATH
/work/src/github.com/hyperledger/fabric/examples/e2e_cli
Apparently, there's some issue in latest e2e example which has not been fixed yet. Look at https://jira.hyperledger.org/browse/FAB-3042. You should be able to run it when this gets fixed.
if you want to set up a new network you will need the config files orderer.block and channel.tx
This script will create them for you.
cd $GOPATH/src/github.com/hyperledger/fabric/examples/e2e_cli
chmod +x generateCfgTrx.sh
./generateCfgTrx.sh <channel-ID>
in your case:
./generateCfgTrx.sh sahil
Please note that you have been cloning from the master branch of the git repo.
Followed these steps to get e2e_cli working( the $GOPATH/src/github.com/hyperledger/fabric project folder):
Once you've cloned as per the instruction, perform
git checkout fa3d88cde177750804c7175ae000e0923199735c
Download the docker images by executing the shell script
sh examples/e2e_cli/download-dockerimages.sh
Remake the configtxgen file in the home folder of the project:
make configtxgen
Now you can setup your network:
sh examples/e2e_cli/network_setup.sh
Try this out and let us know if this solution fits right in!
RESULT (run docker ps):
Result Screenshot
If you still have problems, please let us know along with the logs!!!
I experienced the same problem. The solution that worked for me is to run this command before ./byfn.sh -m generate the command is
docker rm $(docker ps -a -q)
This command really clears the docker containers. If you still have this issue let me know.

Resources