You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

创建Hyperledger Fabric钱包与网关配置文件时遇WEFT警告及错误

问题排查:Weft工具执行Hyperledger Fabric配置命令报错

问题场景

执行以下命令生成Hyperledger Fabric钱包和网关配置文件时,出现警告及错误:

curl -s http://console.127-0-0-1.nip.io:8080/ak/api/v1/components | weft microfab -w ./_wallets -p ./_gateways -m ./_msp -f

命令输出:

$:  % curl -s http://console.127-0-0-1.nip.io:8080/ak/api/v1/components | weft microfab -w ./_wallets -p ./_gateways -m ./_msp -f
WEFT WARNING: skipping argument microfab
WEFT WARNING: skipping argument ./_wallets
WEFT WARNING: skipping argument ./_gateways
WEFT WARNING: skipping argument -m
WEFT WARNING: skipping argument ./_msp
WEFT ERROR 1: No file name specified!
WEFT WILL NOW EXIT...
Usage: Weft [args]
  -b: specify the CTA id to simulate (default 0x0x0)
      can be an integer or an x-separated tuple e.g. 0x0x1 or 1x2
  -d: print detailed information for error reporting
      this includes line numbers for blocked threads under deadlock and
      and per-thread and per-address information for races
  -f: specify the input file
  -g: specify the grid dimensions for the kernel being simulated
      can be an integer or an x-separated tuple e.g. 32x32x2 or 32x1
      Weft will still only simulate a single CTA specified by '-b'
  -i: instrument execution
  -n: number of threads per CTA
      can be an integer or an x-separated tuple e.g. 64x2 or 32x8x1
  -p: print individual Weft thread files (one file per thread!)

报错原因

  1. 工具调用错误:你当前执行的weft是一款CUDA线程模拟器,而非Hyperledger Fabric生态中用于生成MicroFab配置的fabric-weft工具,两者同名但功能完全不同,导致工具无法识别Hyperledger相关参数。
  2. 参数格式错误:原命令中-f参数要求指定输入文件,但你通过管道传递输入,同时错误地将microfab等Hyperledger专属参数传给了CUDA模拟器,导致工具无法解析,最终报错“未指定文件名”。

解决方法

  1. 安装正确的Hyperledger Fabric Weft工具
    使用npm安装官方工具:

    npm install -g @hyperledger/fabric-weft
    

    执行fabric-weft --help验证,输出应为Hyperledger Fabric相关的命令说明,而非CUDA模拟器用法。

  2. 修正命令格式
    将工具名改为fabric-weft,同时移除多余的-f参数(因为输入通过管道传递,无需指定文件):

    curl -s http://console.127-0-0-1.nip.io:8080/ak/api/v1/components | fabric-weft microfab -w ./_wallets -p ./_gateways -m ./_msp
    
  3. 冲突处理(可选)
    如果系统中同时存在CUDA的weft工具,可通过指定完整路径调用fabric-weft,避免命令冲突。

内容的提问来源于stack exchange,提问作者Shreekesh Pillai

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 17:52:33