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. P1417 烹调方案 背包DP

    题目背景 由于你的帮助,火星只遭受了最小的损失.但gw懒得重建家园了,就造了一艘飞船飞向遥远的earth星.不过飞船飞到一半,gw发现了一个很严重的问题:肚子饿了~ gw还是会做饭的,于是拿出了储藏的 ...

  2. redis 相关知识点

    (1)什么是redis? Redis 是一个基于内存的高性能key-value数据库. (有空再补充,有理解错误或不足欢迎指正) (2)Reids的特点 Redis本质上是一个Key-Value类型的 ...

  3. 升级到AndroidStudio3.2.1的注意事项

    升级到AndroidStudio3.2.1的注意事项     即不用再在二级结构的build.gradle中的compileSdkVersion 28 下声明 buildToolsVersion &q ...

  4. C# 动态加载组件后怎么在开发环境中调试

    动态加载组件 那就是简单的Assembly.Load动态加载dll而以.这网上资料也有不少.基本的思路基本上就是在本地上一个指定目录如[plugs]存在着一堆dll文件.主程序在初始运行时一般会把指定 ...

  5. 捕获程序异常之onerror

    问题描述:html5页面在电脑上打开,功能正常,没有报错,一旦嵌进微信或者APP,页面就卡住了,不好排查js问题. 预期结果:手机微信页面功能失效时,开发人员在console面板能明确看到出错信息,出 ...

  6. linux安装project lemon测评机

    (写下备用) 机子:xubuntu 16.04 LTS 1.下载lemon github地址:https://github.com/Sojiv/Project_lemon 这里download zip ...

  7. android shareUID

    韩梦飞沙  韩亚飞  313134555@qq.com  yue31313  han_meng_fei_sha 安卓中 全局进程,其他应用可以通过 分享UID 方式 和它 在同一个进程中.

  8. android 四大组件

     韩梦飞沙  韩亚飞  313134555@qq.com  yue31313  han_meng_fei_sha 活动,服务,广播接受者,内容提供者. 活动 能够提供 用户界面.服务 没有用户界面.广 ...

  9. ScrollView中嵌套GridView,Listview的办法

    按照android的标准,ScrollView中是不能嵌套具有滑动特性的View的,但是有时如果设计真的有这样做的需要,或者为了更方便简单的实现外观(比如在外在的大布局需要有滑动的特性,并且内部有类似 ...

  10. 自动添加 Qt 开发生成的 exe 所需的依赖环境

    双击获取 exe 文件路径 cd 进入文件目录的命令 调用 Qt 自带的软件进行环境配置,命令如下 windeployqt ***.exe 自动配置了依赖环境