WeBASE 把节点、签名服务和应用管理串起来。这里整理部署入口、配置文件、用户类型以及合约命名服务的学习记录。
本文由个人备赛旧笔记整理,整理日期为 2026-11-03。命令、输出和测试记录属于当时的实验环境;本文未重新搭建整套环境验证。
阅读前先确认 先核对各组件版本和配置,再按依赖关系检查数据库、签名服务、Front 与管理服务。导入公钥不等于拥有对应私钥的签名能力。
WeBase部署 微众银行开源的自研区块链中间件平台——WeBase 是区块链应用和FISCO BCOS节点之间搭建的中间件平台。
WeBASE屏蔽了区块链底层的复杂度,降低区块链使用的门槛,大幅提高区块链应用的开发效率,包含节点前置、节点管理、交易链路,数据导出,Web管理平台等子系统。用户可以根据业务所需,选择子系统进行部署,可以进一步体验丰富交互的体验、可视化智能合约开发环境IDE。
下载(or clone)解压后cd进去
1 2 3 4 5 6 7 ┌──(cure㉿LAPTOP-CMAM5D0J)-[~] └─$ cd webase-deploy ┌──(cure㉿LAPTOP-CMAM5D0J)-[~/webase-deploy] └─$ ls comm deploy.py install.md nodeconf telnet.py visual-deploy.properties webase-upgrade.shcommon.properties docker log README-en.md upgrade WeBASE-Front
输入命令启动安装程序,会自动检测需要配置的环境
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ┌──(cure㉿LAPTOP-CMAM5D0J)-[~/webase-deploy] └─$ python3 deploy.py installAll ============================================================ _ _ ______ ___ _____ _____ | | | | | ___ \/ _ \/ ___| ___| | | | | ___| |_/ / /_\ \ `--.| |__ | |/\| |/ _ | ___ | _ |`--. | __| \ /\ | __| |_/ | | | /\__/ | |___ \/ \/ \___\____/\_| |_\____/\____/ ============================================================ ============== checking envrionment ============== check git... check finished sucessfully. check openssl... check finished sucessfully. check curl... check finished sucessfully. check wget... check finished sucessfully. check dos2unix... check finished sucessfully. check config webase v1.5.5 and fisco version v2.11.0... check finished sucessfully. check host free memory and cpu core... check finished sucessfully. check nginx... check finished sucessfully. check java...
从输出可以看到:git、openssl、curl、wget、dos2unix、nginx、java(我使用的是openjdk-11)
除此之外,官方文档明确要求了需要准备MYSQL 由于我使用的是wsl-kali 官方源并不支持MYSQL,我使用了外部的远程MYSQL 连接,运行正常。
相关配置在vim common.properties 配置。
关于两个配置文件 common.properties:公共配置文件
主要作用 :包含所有 WeBase 组件共用的基础配置
visual-deploy.properties:可视化配置文件
主要作用 :专门用于 WeBase-Visual 可视化部署工具的配置
到了这一步,我们已经部署并启动了所有服务
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2025-09-11 11:10:50 (325 KB/s) - 已保存 “webase-web-mobile.zip” [1402252/1402252]) onelineOutput: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok Defualt nginx config path: /etc/nginx ============== Starting WeBASE-Web ============== ============== WeBASE-Web Started ============== ============== Init Front for Mgr start... ============== ====================================================================================================================================== Init Front for Mgr fail. ============== ============================================================ ============== deploy has completed ============== ============================================================ ============== webase-web version v1.5.5 ======== ============== webase-node-mgr version v1.5.5 ======== ============== webase-sign version v1.5.5 ======== ============== webase-front version v1.5.5 ======== ============================================================
命令方面官方文档给了讲解
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 部署并启动所有服务 python3 deploy.py installAll 停止一键部署的所有服务 python3 deploy.py stopAll 启动一键部署的所有服务 python3 deploy.py startAll 启动FISCO-BCOS节点: python3 deploy.py startNode 停止FISCO-BCOS节点: python3 deploy.py stopNode 启动WeBASE-Web: python3 deploy.py startWeb 停止WeBASE-Web: python3 deploy.py stopWeb 启动WeBASE-Node-Manager: python3 deploy.py startManager 停止WeBASE-Node-Manager: python3 deploy.py stopManager 启动WeBASE-Sign: python3 deploy.py startSign 停止WeBASE-Sign: python3 deploy.py stopSign 启动WeBASE-Front: python3 deploy.py startFront 停止WeBASE-Front: python3 deploy.py stopFront 部署并启动可视化部署的所有服务 python3 deploy.py installWeBASE 停止可视化部署的所有服务 python3 deploy.py stopWeBASE 启动可视化部署的所有服务 python3 deploy.py startWeBASE
踩坑 根据文档提示,我们输入http://localhost:5000/#/login 进入WeBase登录页面
此时却弹出错误提示
立即抓包发现
http://localhost:5000/mgr/WeBASE-Node-Manager/config/encrypt 和 /mgr/WeBASE-Node-Manager/account/pictureCheckCode以及 /mgr/WeBASE-Node-Manager/config/auth 三个路由均返回404错误。
根据路由名称判断大概是 webase-node-mgr 这个服务没有启动好,固尝试重新启动
1 2 3 4 5 ┌──(cure㉿LAPTOP-CMAM5D0J)-[~/webase-deploy] └─$ python3 deploy.py startManager ============== Starting WeBASE-Node-Manager ============== ============== WeBASE-Node-Manager starting. Please check through the log file (default path:./webase-node-mgr/log/). ============== ============== WeBASE-Node-Manager Started ==============
查看进程
1 2 3 4 ┌──(cure㉿LAPTOP-CMAM5D0J)-[~/webase-deploy] └─$ ps -ef | grep java cure 56504 23135 0 11:07 pts/5 00:00:35 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Dfile.encoding=UTF-8 -Xmx256m -Xms256m -Xmn128m -Xss512k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/cure/webase-deploy/webase-sign/log/heap_error.hprof -cp conf/:apps/*:lib/* com.webank.webase.sign.Application cure 82084 23136 0 13:31 pts/5 00:00:00 grep --color=auto java
发现 webase-sign 运行正常 但并未发现WeBase-Node-Manager 服务
查询log文件WeBASE-Node-Manager-error.log发现字段
1 2 Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: missing_extension
可以得出结论是MYSQL服务的SSL验证问题
而又因为 MySQL 8.0+ 默认启用 SSL
可得出 Node-Manager 的 MySQL 驱动与服务器 SSL 配置不兼容
我同时连接数据库去看了下,发现MYSQL中需要的数据库已经创建和写入数据
说明和公共配置无关
进入查看 webase-node-mgr的配置文件 发现application-docker.yml 和 application.yml 文件
1 2 3 ┌──(cure㉿LAPTOP-CMAM5D0J)-[~/webase-deploy/webase-node-mgr] └─$ ls conf application-docker.yml application.yml Arial log mapper swagger templates temp.yml warehouse
由于我们未采用Docker部署因此应该是修改 application.yml文件
进入在spring 字段下果然发现有关MySQL的Url,我们在参数加入useSSL=false 禁用SSL验证
1 url: jdbc:mysql://xxx.xxx.xx.xx:3306/webasenodemanager?useUnicode=true&characterEncoding=UTF-8&useSSL=true&requireSSL=false&verifyServerCertificate=false&serverTimezone=Asia/Shanghai
现在再进入登录界面果然恢复正常
后续
发现账号登录显示 系统未初始化
1 2 3 4 5 6 7 8 9 10 11 12 ============== FISCO-BCOS Started ============== ============== Starting WeBASE-Sign ============== ============== WeBASE-Sign starting. Please check through the log file (default path:./webase-sign/log/). ============== ============== WeBASE-Sign Started ============== ============== Starting WeBASE-Front ============== ============== WeBASE-Front starting. Please check through the log file (default path:./webase-front/log/). ============== ============== WeBASE-Front Started. ============== ============== Starting WeBASE-Node-Manager ============== ============== WeBASE-Node-Manager starting. Please check through the log file (default path:./webase-node-mgr/log/). ============== ============== WeBASE-Node-Manager Started ============== ============== Starting WeBASE-Web ============== ============== WeBASE-Web Started ==============
大坑
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ┌──(cure㉿LAPTOP-CMAM5D0J)-[~/webase-deploy] └─$ python3 deploy.py check ============================================================ _ _ ______ ___ _____ _____ | | | | | ___ \/ _ \/ ___| ___| | | | | ___| |_/ / /_\ \ `--.| |__ | |/\| |/ _ | ___ | _ |`--. | __| \ /\ | __| |_/ | | | /\__/ | |___ \/ \/ \___\____/\_| |_\____/\____/ ============================================================ ============== checking envrionment ============== check git... check finished sucessfully. check openssl... check finished sucessfully. check curl... check finished sucessfully. check wget... check finished sucessfully. check dos2unix... check finished sucessfully. check config webase v1.5.5 and fisco version v2.11.0... check finished sucessfully. check host free memory and cpu core... check finished sucessfully. check nginx... check finished sucessfully. check java... check finished sucessfully. check FISCO-BCOS node port... error! port 8545 has been used. please check.
8545端口的不是你自己启动的吗,报什么错啊
官方文档有说明:
注:使用国密版需要修改设置配置项encrypt.type=1。前置SDK与节点默认使用非国密SSL,如果需要使用国密SSL,需要修改设置配置项encrypt.sslType=1。
新版本又改了
遗漏这个选项会造成 webase-front 启动失败,非常难修,和证书有关系
默认是双通道双认证的
大坑!!!!
Mulander-J
on Aug 23, 2023
刚踩了个坑 fisco-bcos-v3 版本不兼容 WeBase-v2版本,需要使用 WeBase-v3(lab分支)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ---------------------------- ====> STEP1: try to connect nodes with ecdsa context... <==== STEP1-1: Load certificates for ecdsa context success... <==== STEP1 Result: try to connect nodes with ecdsa context failed. reason: Failed to connect to all the nodes! * ssl handshake failed:/127.0.0.1:20200 reason: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error. Please make sure the certificate are correctly configured and copied. ---------------------------- ====> STEP2: connect nodes with ecdsa context failed, try to connect nodes with sm-context... <==== STEP2 Result: connect with sm context failed for cert missing. * Missed certificates: [conf/gm/gmca.crt,conf/gm/gmsdk.crt,conf/gm/gmsdk.key,conf/gm/gmensdk.key,conf/gm/gmensdk.crt,] currentPath: /home/mulander/fisco/WeBASE-Front/dist ---------------------------- <====> Error: try to connect nodes with both ecdsa and sm context failed <====> <====> Please refer to github issue: https://github.com/FISCO-BCOS/java-sdk/issues/536 <====> Please refer to fisco-docs: https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/faq/connect.html ---------------------------- * FISCO BCOS Java SDK Version: 2.9.1 * Support secp256k1 : true * Java Version : 11.0.20 * JDK Disabled NamedCurves : null * JDK DisableNative Option : false * OS Name : Linux * OS Arch : amd64 * OS Version : 5.15.90.1-microsoft-standard-WSL2 * JVM Version : 11.0.20+8-post-Ubuntu-1ubuntu122.04 * JVM Vendor : Ubuntu * JVM Vendor URL : https://ubuntu.com/
如果已经部署过旧合约切记删除掉数据库,重新安装部署时会生成新的
WeBase用户 用户管理 WeBase有新建私钥用户和导入公钥用户两种用户导入方式
新建用户(私钥托管在签名服务中):在管理平台的合约管理中部署和调用合约
导入公钥用户:把交易和用户关联
科普 Contract Name Service 简称CNS 在我们新建用户私钥时可以看到
CNS的中文名叫 合约命名服务 可以把它理解为区块链世界的DNS(域名系统)
实例
1 2 3 4 5 // 没有CNS:硬编码地址,难以维护 HelloWorld contract = HelloWorld(0x742d35Cc6634C893292...); // 使用CNS:通过名称访问,易于维护 HelloWorld contract = HelloWorld(CNS.getAddress("HelloWorld"));
CNS工作原理
1 2 3 4 +----------------+ +----------------+ +-----------------+ | DApp应用 | -> | CNS代理 | -> | 实际合约实例 | | (使用合约别名) | | (名称->地址映射) | | (0x742d35Cc...) | +----------------+ +----------------+ +-----------------+
复现时的自查
记录自己实际使用的版本、配置和缺失依赖。
对照本篇关键步骤,保存命令或调用结果,并解释结果代表什么。
对失败或与原记录不一致的情况保留错误信息,不把历史输出当成自己的验证结果。
返回系列导读 · 上一篇 · 下一篇