简体   繁体   English

管理员注册失败,错误:%o 消息=调用注册端点失败,连接超时

[英]Failed to enroll admin, error:%o message=Calling enroll endpoint failed, CONNECTION Timeout

I am running my fabric network on kubernetes and I have setup ca servers for all the organisations.我在 kubernetes 上运行我的结构网络,并且我已经为所有组织设置了 ca 服务器。 I am able to register and enroll the user from the cli but when i am using the fabric-ca-client library with nodejs to register and enroll the users.我可以从 cli 注册和注册用户,但是当我使用带有nodejsfabric-ca-client库来注册和注册用户时。 I am facing the CONNECTION Timeout issue, also at the same time if I look at the logs of my ca-server it show that is able to process the request.我正面临 CONNECTION Timeout 问题,同时如果我查看我的 ca-server 的日志,它显示能够处理请求。 Edit1: I am using the same code provided in fabric-sample to register and enroll the users. Edit1:我正在使用 fabric-sample 中提供的相同代码来注册和注册用户。

All the all the pods are communicating with each other using these services in kubernetes所有的 pod 都使用 kubernetes 中的这些服务相互通信

this is how my connection profile looks这就是我的连接配置文件的样子

"certificateAuthorities": {
    "ca-org2": {
        "url": "https://ca-org2:8054",
        "caName": "ca-org2",
        "tlsCACerts": {
            "pem": ["-----BEGIN CERTIFICATE-----\nMIICBjCCAa2gAwIBAgIUHwBYatG6KhezYWHxdGgYGqs77PIwCgYIKoZIzj0EAwIw\nYDELMAkGA1UEBhMCVUsxEjAQBgNVBAgTCUhhbXBzaGlyZTEQMA4GA1UEBxMHSHVy\nc2xleTEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEQMA4GA1UEAxMHY2Etb3Jn\nMjAeFw0yMTAzMjAxMDI4MDBaFw0zNjAzMTYxMDI4MDBaMGAxCzAJBgNVBAYTAlVL\nMRIwEAYDVQQIEwlIYW1wc2hpcmUxEDAOBgNVBAcTB0h1cnNsZXkxGTAXBgNVBAoT\nEG9yZzIuZXhhbXBsZS5jb20xEDAOBgNVBAMTB2NhLW9yZzIwWTATBgcqhkjOPQIB\nBggqhkjOPQMBBwNCAAQUIABkRhfPdwoy2QrCY3oh8ZuzP5OprZJawVXO2ojid3j4\nC9W4l46QXR5J7iG5MLczguPZWB9dZWygRQdUQeoAo0UwQzAOBgNVHQ8BAf8EBAMC\nAQYwEgYDVR0TAQH/BAgwBgEB/wIBATAdBgNVHQ4EFgQURx/h3nkH0fq+3TlRPnQW\nWTHbR7YwCgYIKoZIzj0EAwIDRwAwRAIgCF+vcLFERb+VHa6Att0rh5yhpMd0bHEn\nmkNo0YfKuX4CICodtpp6AKtNWXreskaN+kRMH8eDmwvxkhvTK68ejv8U\n-----END CERTIFICATE-----\n"]
        },
        "httpOptions": {
            "verify": false
        }
    }
}

nodejs应用程序日志

ca 服务器日志

I found the solution to this issue.我找到了解决这个问题的方法。 The issue was related to the connection timeout, my CA Server was receving the requests and able to process them also but due to the short timeout the request was being cancelled.该问题与连接超时有关,我的 CA 服务器正在接收请求并能够处理它们,但由于超时时间短,请求被取消。 The solution was to increase the connection timeout and request-timeout .解决方案是增加connection timeoutrequest-timeout The default value of timeouts is 3s and I increased it to 30s and it started working.超时的默认值为 3 秒,我将其增加到 30 秒并开始工作。 The default configuration can be found here默认配置可以在这里找到

{
    "request-timeout" : 3000,
    "tcert-batch-size" : 10,
    "crypto-hash-algo": "SHA2",
    "crypto-keysize": 256,
    "crypto-hsm": false,
    "connection-timeout": 3000
}

we can update the timeout values from source code of the fabric-ca-client library or simply can use the methods of fabric-common library to update the these configuration values like this.我们可以从 fabric-ca-client 库的源代码中更新超时值,也可以像这样简单地使用fabric-common库的方法来更新这些配置值。

const { Utils: utils } = require('fabric-common');
const path=require('path');
let config=utils.getConfig()
config.file(path.resolve(__dirname,'config.json'))

And here is our modified configuration file config.json这是我们修改后的配置文件config.json

  {
  "request-timeout" : 30000,
  "tcert-batch-size" : 10,
  "crypto-hash-algo": "SHA2",
  "crypto-keysize": 256,
  "crypto-hsm": false,
  "connection-timeout": 30000
  }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Filebeat 初始化失败,出现 10.96.0.1:443 i/o 超时错误 - Filebeat initialize failed with 10.96.0.1:443 i/o timeout error Kube-state-metrics错误:无法创建客户端:... i / o超时 - Kube-state-metrics error: Failed to create client: … i/o timeout Calico:networkPlugin cni 设置 pod 失败,i/o 超时 - Calico: networkPlugin cni failed to set up pod, i/o timeout 即扩展崩溃循环,请求失败错误未经授权的连接服务器代理管理员 - viz extension crashloop with Request failed error unauthorized connection on server proxy-admin 升级连接 10.96.0.1:443 时出错:I/o 超时 - Error upgrading connection 10.96.0.1:443: I/o timeout 等待连接时取消活动探测失败请求(等待标头时超出 Client.Timeout) - Liveness probe failed request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 收到错误“无法连接到 192.168.99.100 端口 31539:连接被拒绝” - Getting error “Failed to connect to 192.168.99.100 port 31539: Connection refused” Pod 仍然是 ContainerCreating。 networkPlugin cni 无法设置 pod netplugin 失败,没有错误消息 - Pods are remain ContainerCreating. networkPlugin cni failed to set up pod netplugin failed with no error message Kubernetes 入口 Controller:调用 webhook 失败,拨打 tcp 连接:连接被拒绝 - Kubernetes Ingress Controller: Failed calling webhook, dial tcp connect: connection refused 失败的/ healthz端点检查的返回码 - Return code for failed /healthz endpoint check
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM