Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lequocvieet opened this issue May 17, 2023 · 2 comments

Comments

@lequocvieet
Copy link

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
            }
        }
    }

}

@hmoazzem
Copy link

@lequocvieet downgrade to go version 1.18

@lequocvieet
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants