-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
panic : runtime error : index out of range [1] with length 1 #4302
Comments
Which version of go are you using? |
I’m so sorry. late comment due to different time zone. I’m using golang version 1.20.5
If channel is not join, peer is working. but orderer still not working. I used the Maybe i’m using it wrong? |
After checking, there is a problem when verifying the Root CA certificate part from genesis block, but I put in all the keys correctly.
|
Fortunately i solved it. In hyperledger fabric v1.4 and v2.2, verification succeeded even if Thank you for your help. |
Thanks for your investigation, though I am still not clear what exactly happened since the panic stack trace indeed indicates there is a problem... not sure what exactly did you do, cause the error shows that it was trying to sanitize the certificate and wasn't able to extract the chain for non-root CA cert, which is odd. |
Ok, I succeeded in reproducing the bug. The problem manifests when configuring a peer node, intermediate CA configured without root CAs. It worked previously because during certs sanitization, intermediate certs, and root certs were treated in the same way, while now there is a clear difference in how it works now. I think the best way to treat it is to provide meaningful errors instead of letting peers fail with panic. |
This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (hyperledger#4302). Signed-off-by: Artem Barger <artem@bargr.net>
This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (#4302). Signed-off-by: Artem Barger <artem@bargr.net>
…4307) This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (hyperledger#4302). Signed-off-by: Artem Barger <artem@bargr.net> (cherry picked from commit ffc6803)
This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (#4302). Signed-off-by: Artem Barger <artem@bargr.net> (cherry picked from commit ffc6803)
This commit handles the error where the certificate sanitization procedure fails to construct the certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without a clear explanation of what exactly was wrong. Addresses (hyperledger#4302). Signed-off-by: David Enyeart <enyeart@us.ibm.com>
This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (#4302). Signed-off-by: Artem Barger <artem@bargr.net> (cherry picked from commit ffc6803)
…#4324) This commit handles the error where the certificate sanitization procedure fails to construct the certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without a clear explanation of what exactly was wrong. Addresses (#4302). Signed-off-by: David Enyeart <enyeart@us.ibm.com>
what are you think about? |
What did you mean? |
Description
Hello, I started the peer node with version 2.5.3 but got an error.
The error is follow:
I used a full chain peer root certificate.
Versions v1.4.12 and v2.2.10 worked fine, but I ran into a problem with v2.5.3.
Please check this issues and reply.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: