我尝试手动创建first-network而不是使用 byfn.sh 脚本,当我尝试在 cli 容器中创建通道时。
peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining
Run Code Online (Sandbox Code Playgroud)
来自订购者的这个错误:
ERRO 008 Principal deserialization failure (the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用paho pkg通过golang构建mqtt子客户端,当代理断开连接时,我的客户端出现问题,我认为应该会出现丢失的消息,但这不会发生,如果我启动代理,mqtt子客户端可以无法获取mqtt pub客户端发送的消息。
为什么会发生这种情况,我该如何解决?
码
package main
import (
"fmt"
"os"
mqtt "github.com/eclipse/paho.mqtt.golang"
)
var (
broker = "tcp://localhost:1883"
f mqtt.MessageHandler = func(client mqtt.Client, msg mqtt.Message) {
fmt.Printf("TOPIC: %s\n", msg.Topic())
fmt.Printf("MSG: %s\n", msg.Payload())
}
)
func main() {
//create a ClientOptions
opts := mqtt.NewClientOptions().AddBroker(broker)
opts.SetClientID("group-one")
opts.SetDefaultPublishHandler(f)
//create and start a client using the above ClientOptions
c := mqtt.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
if token := c.Subscribe("test", 0, nil); token.Wait() …Run Code Online (Sandbox Code Playgroud)