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

Get x509: certificate error when fabric-ca-client enroll #17

Open
cfengliu opened this issue Jul 3, 2019 · 1 comment
Open

Get x509: certificate error when fabric-ca-client enroll #17

cfengliu opened this issue Jul 3, 2019 · 1 comment

Comments

@cfengliu
Copy link

cfengliu commented Jul 3, 2019

Hi,
We are getting below " x509: certificate is valid for ingress.local" error while trying to enroll ord-admin on rancher 2.0. The error code is below:

admin@hosts:~/hlf/hgf-k8s-workshop/prod_example$ FABRIC_CA_CLIENT_HOME=./config fabric-ca-client enroll -u https://ord-admin:OrdAdm1nPW@$CA_INGRESS -M ./OrdererMSP
2019/07/03 09:54:35 [INFO] TLS Enabled
2019/07/03 09:54:35 [INFO] generating key: &{A:ecdsa S:256}
2019/07/03 09:54:35 [INFO] encoded CSR
Error: POST failure of request: POST https://k8s.blockchain.iii/enroll
{"hosts":["sysadmin-virtual-machine202"],"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIIBSDCB8AIBADBVMQsw-----END CERTIFICATE REQUEST-----\n"
,"profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","CAName":""}: 
Post https://k8s.blockchain/enroll: x509: certificate is valid for ingress.local, not k8s.blockchain

Is there any suggestion for this error?

@jchai002
Copy link

I'm also getting this error. My suspicion is that the SSL for the ingress controller is not set up. Because

curl https://$CA_INGRESS/cainfo fails with this error

`curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.`

But I'm not 100% sure this is the issue. Any help on this one would be highly appreciated!

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