I try to run sample application as stated here : http://hyperledger-fabric.readthedocs.io/en/release/write_first_app.html

Everything looks good until I ran this command : node registerUser

Error :

Store path:/Users/johndoe/Desktop/myProject/fabric-samples/fabcar/hfc-key-store Successfully loaded admin from persistence Failed to register: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]]

I checked logs by running docker logs ca.example.com command:

2017/11/08 09:43:07 [DEBUG] Successful authentication of 'admin'

2017/11/08 09:43:07 [DEBUG] Register request received

2017/11/08 09:43:07 [DEBUG] Received registration request from admin: &{RegistrationRequest:{Name:user1 Type: Secret:<> MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:}}

2017/11/08 09:43:07 [DEBUG] Registration of 'user1' failed: No identity type provided. Please provide identity type

2017/11/08 09:43:07 [INFO] 172.18.0.1:60190 - "POST /api/v1/register" 0

解决方案:

在 fabcar/registerUser.js 文件修改第56行:

-    return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1'}, admin_user);
+ return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1',role: 'client'}, admin_user);

  

Did I miss anything here? I successfully ran node enrollAdmin.js and able to get the generated eCert & key material in hfc-key-store

In my case, adding the user's role type make it works.

return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1',role: 'client'}, admin_user);

Failed to register: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]]解决方案的更多相关文章

  1. Mongodb中经常出现的错误(汇总)child process failed, exited with error number

    异常处理汇总-服 务 器 http://www.cnblogs.com/dunitian/p/4522983.html 异常处理汇总-数据库系列  http://www.cnblogs.com/dun ...

  2. Hyperledger Fabric创建通道抛错Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied解决方案

    安装Hyperledger Fabric,服务整个都跑起来了,但是抛了一个错,Error: got unexpected status: FORBIDDEN -- Failed to reach im ...

  3. file_get_contents HTTP request failed! Internal Server Error

    使用file_get_contents报错 Severity: WarningMessage: file_get_contents(http://geetest.com:8000/select?gid ...

  4. OPENTSDB: Request failed: Internal Server Error net.opentsdb.core.IllegalDataException

    今天Opentsdb补传历史数据的时候,出现了如下的错误: Request failed: Internal Server Error net.opentsdb.core.IllegalDataExc ...

  5. Fabric CA环境的集成

    我们前面关于Fabric的所有文章中用到的例子都没有CA Server,都是由cryptogen这个工具根据crypto-config.yaml而生成的.但是在实际生产环境中,我们肯定不能这么做,我们 ...

  6. (转)Fabric CA环境的集成

    PS:因为我部署的是集群(4peer+1order),需要为order,org1,org2分别建立一个CA,拿org1使用举例,获取org1根证书私钥名称:PRIVATE_KEY.sh #!/bin/ ...

  7. Hyperledger Fabric CA User’s Guide——开始(三)

    Fabric CA User’s Guide——开始 先决条件 安装Go 1.9+ 设置正确的GOPATH环境变量 安装了libtool和libtdhl-dev包 下面是在Ubuntu上安装libto ...

  8. Fabric CA/数字证书管理

    MSP(Membership Service Provider)成员管理服务提供商 名词: 1.CSR(Cerificate Signing Request):证书签署请求文件 CSR里包含申请者的 ...

  9. Hyperledger:Fabric CA 用户指南 [译]

    Fabric CA 用户指南 Fabric CA 是 Hyperledger Fabric 的官方配套认证设施. 原文链接:http://hyperledger-fabric.readthedocs. ...

随机推荐

  1. 002.DNS-BIND简介

    一 Linux-BIND服务器简介 Bind是Berkeley Internet Name Domain Service的简写,它是一款实现DNS服务器的开放源码软件.已经成为世界上使用最为广泛的DN ...

  2. Android项目无法运行在x86的虚拟机上

    Android项目无法运行在x86的虚拟机上 解决办法来自 https://blog.csdn.net/qq_33495943/article/details/70255942 运行程序的时候报错如下 ...

  3. luogu P4779 【模板】单源最短路径(标准版)

    线段树优化dij 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈 我可能是个智障 // luogu-judger-enable-o2 #pragma GCC diagnostic error "-std= ...

  4. bzoj 3999 线段树区间提取 有序链剖

    看错题目了,想成每个城市都可以买一个东西,然后在后面的某个城市卖掉,问最大收益.这个可以类似维护上升序列的方法在O(nlog^3n)的时间复杂度内搞定 这道题用到的一些方法: 1. 可以将有关的线段提 ...

  5. 10分钟上手python pandas

    目录 Environment 开始 对象创建 查看数据 选择 直接选择 按标签选择 按位置选择 布尔索引 设置 缺失数据 操作 统计 应用(apply) 直方图化(Histogramming) 字符串 ...

  6. FireDAC 下的 Sqlite [3] - 获取数据库的基本信息

    在空白窗体上添加: TFDConnection, TFDPhysSQLiteDriverLink, TFDGUIxWaitCursor, TMemo procedure TForm1.FormCrea ...

  7. 在.net core 2.0中生成exe文件

    .net core 2.0程序默认生成的是一个dll,需要通过dotnet命令来执行他. dotnet ConsoleApp1.dll 这种方式有点类似于java程序.本身这种方式没有什么问题,但在调 ...

  8. WINUSB Descriptors

    Reading string descriptors: String (0x01): "Travis Robinson" String (0x02): "Benchmar ...

  9. 下载8000首儿歌的python代码

    下载8000首儿歌的python的代码: #-*- coding: UTF-8 -*- from pyquery import PyQuery as py from lxml import etree ...

  10. Exynos4412的外部中断是如何安排的?

    作者 彭东林 pengdonglin137@163.com   平台 Linux4.9 tiny4412   概述 结合tiny4412开发板分析一下Exynos4412的外部中断是如何组织的.   ...