fabric-sdk-go icon indicating copy to clipboard operation
fabric-sdk-go copied to clipboard

sanitizeCert failed the supplied identity is not valid: x509: certificate signed by unknown authority

Open lequocvieet opened this issue 1 year ago • 2 comments

Get this error when creating a new SDK instance based on the loaded configuration: [fabsdk/util] 2023/05/17 12:26:10 UTC - lazyref. (*Reference).refreshValue -> WARN Error - initializer returned error: load MSPs from config failed: configure MSP failed: sanitizeCert failed the supplied identity is not valid: x509: certificate signed by unknown authority. Will retry again later

My config.json file is below:

{
    "name": "first-network-org1",
    "version": "1.0.0",
    "client": {
        "organization": "Org1",
        "logging": {
            "level": "info"
        },
        "cryptoconfig": {
            "path": "/home/lequocvieet/Desktop/fabric-samples/test-network/organizations"
        },
        "credentialStore": {
            "path": "/tmp/keystore",
            "cryptoStore": {
                "path": "/tmp/msp"
            }
        },
        "connection": {
            "timeout": {
                "peer": {
                    "endorser": "300"
                }
            }
        }
    },
    "channels": {
        "mychannel": {
            "peers": {
                "peer0.org1.example.com": {},
                "peer0.org2.example.com": {}
            }
        }
    },
    "orderers": {
        "orderer.example.com": {
            "url": "orderer.example.com:7050",
            "cryptoPath": "ordererOrganizations/example.com/msp",
            "grpcOptions": {
                "ssl-target-name-override": "orderer.example.com",
                "keep-alive-time": "60s",
                "keep-alive-timeout": "60s",
                "keep-alive-permit": false,
                "fail-fast": false,
                "allow-insecure": false
            },
            "tlsCACerts": {
                "path": "/home/lequocvieet/Desktop/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"
            }
        }
    },
    "organizations": {
        "Org1": {
            "mspid": "Org1MSP",
            "cryptoPath": "peerOrganizations/org1.example.com/users/[email protected]/msp",
            "peers": [
                "peer0.org1.example.com"
            ],
            "certificateAuthorities": [
                "ca.org1.example.com"
            ]
        }
    },
    "peers": {
        "peer0.org1.example.com": {
            "url": "peer0.org1.example.com:7051",
            "tlsCACerts": {
                "path": "/home/lequocvieet/Desktop/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"
            },
            "grpcOptions": {
                "ssl-target-name-override": "peer0.org1.example.com"
            }
        }
    },
    "certificateAuthorities": {
        "ca.org1.example.com": {
            "url": "https://localhost:7054",
            "caName": "ca-org1",
            "tlsCACerts": {
                "path": "/home/lequocvieet/Desktop/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"
            },
            "httpOptions": {
                "verify": false
            }
        }
    }

}

lequocvieet avatar May 17 '23 12:05 lequocvieet

@lequocvieet downgrade to go version 1.18

hmoazzem avatar Aug 24 '23 15:08 hmoazzem

Thanks a lot, but I waited a long time so I decided to move my project to Ethereum blockchain.

lequocvieet avatar Aug 25 '23 06:08 lequocvieet