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

Unable to Register CA #218

Open
aliiraza4064 opened this issue Apr 26, 2024 · 2 comments
Open

Unable to Register CA #218

aliiraza4064 opened this issue Apr 26, 2024 · 2 comments

Comments

@aliiraza4064
Copy link

aliiraza4064 commented Apr 26, 2024

What happened?

Error: POST failure of request: POST https://10.6.0.4:30972/enroll
{"hosts":null,"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHvMIGWAgEAMBExDzANBgNVBAMTBmVucm9sbDBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABC+4JlU1k6iTZt7GlaZ/3sLz9zFqHm8Oyi9NnHNzwStd1aMk3iKCxPow\nHKFjpoWW3kOQgOlCG60rz6Ik7RXAXaugIzAhBgkqhkiG9w0BCQ4xFDASMBAGA1Ud\nEQQJMAeCBW5vZGUxMAoGCCqGSM49BAMCA0gAMEUCIQDRb7U1PtMesr3hNfsDiA8W\niI8LSHI0oZfxe3nuVxdSWgIgWzcGNWAJ/uHyxWZtO/tzyU/5xD1df6d6rut/BaHc\nW+c=\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","ReturnPrecert":false,"CAName":""}: Post "https://10.6.0.4:30972/enroll": tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not 10.6.0.4

What did you expect to happen?

Getting this error while registering CA to peer. When I use 1.8.0 then this error don't happen this is only on 1.9.2.

How can we reproduce it (as minimally and precisely as possible)?

kubectl hlf ca register --name=org1-ca --user=peer --secret=peerpw --type=peer
--enroll-id enroll --enroll-secret=enrollpw --mspid Org1MSP -n hlf

Anything else we need to know?

I was creating cluster with help of this https://youtu.be/CRfmFw3OVgU?si=_tZCXYs-xX7xCrVc by @adityajoshi12 .
I'm doing it without using Istio.

Kubernetes version

``` MicroK8s v1.29.2 revision 6641 ```
@hasanyeganeh
Copy link

I have same issue

@hasanyeganeh
Copy link

1- Create CA:
kubectl hlf ca create --storage-class=openebs-hostpath --capacity=2Gi --name=org1-ca --enroll-id=enroll --enroll-pw=enrollpw --namespace=fabric

2- Edit config file
kubectl edit fabriccas.hlf.kungfusoftware.es org1-ca -n fabric
replace all "localhost" with "Your Host IP address"
save and let CA to restart

3- register a peer user
kubectl hlf ca register --name=org1-ca --user=peer --secret=peerpw --type=peer --enroll-id enroll --enroll-secret=enrollpw --mspid Org1MSP --namespace=fabric

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