dtm-labs / client Goto Github PK
View Code? Open in Web Editor NEWthe new client for dtm in go, including workflow, dtmcli, and dtmgrpc
Home Page: http://d.dtm.pub
License: BSD 3-Clause "New" or "Revised" License
the new client for dtm in go, including workflow, dtmcli, and dtmgrpc
Home Page: http://d.dtm.pub
License: BSD 3-Clause "New" or "Revised" License
Go version
go version 1.20.0
panic stack:
........
/usr/local/go/src/runtime/panic.go:884 +0x213 database/sql.(*Tx).grabConn(0x0, {0x15c40c8, 0xc00004e030})
/usr/local/go/src/database/sql/sql.go:2209 +0x52 database/sql.(*Tx).ExecContext(0x0, {0x15c40c8, 0xc00004e030}, {0xc0004c0230, 0x6e}, {0xc000ecd7a0, 0x6, 0x6})
/usr/local/go/src/database/sql/sql.go:2467 +0x51\ndatabase/sql.(*Tx).Exec(0x11d1c40?, {0xc0004c0230?, 0x13862c0?}, {0xc000ecd7a0?, 0x10?, 0x116e9a0?})
/usr/local/go/src/database/sql/sql.go:2480 +0x45 github.com/dtm-labs/client/dtmcli/dtmimp.DBExec({0x13862c0, 0x5}, {0x15bcc58, 0x0}, {0xc0004c0230, 0x6e}, {0xc000ecd7a0, 0x6, 0x6})
/go/pkg/mod/github.com/dtm-labs/[email protected]/dtmcli/dtmimp/utils.go:211 +0x157\ngithub.com/dtm-labs/client/dtmcli/dtmimp.InsertBarrier({0x15bcc58, 0x0}, {0xc000e55128, 0x4}, {0xc00005a378, 0x16}, {0xc000dcf5de, 0x2}, {0xc000e55146, 0x6}, ...)
/go/pkg/mod/github.com/dtm-labs/[email protected]/dtmcli/dtmimp/utils.go:292 +0x377\ngithub.com/dtm-labs/client/dtmcli.(*BranchBarrier).Call(0xc0001f5b20, 0x0, 0xc0016ab050)
/go/pkg/mod/github.com/dtm-labs/[email protected]/dtmcli/barrier.go:77 +0x468\noasis/app/ams/amsbalanceinfrastructure/internal/data.(*Data).BarrierInTx(0xc00071adc0, {0x15c4138, 0xc000349bc0}, {0xc000053e86, 0x6}, 0xc0016ca340)
.......
Im using dtm-labs/client/workflow packaged to register gRPC workflow server in following way:
import (
"github.com/dtm-labs/client/dtmcli"
"github.com/dtm-labs/client/dtmgrpc/dtmgimp"
"github.com/dtm-labs/client/workflow"
...
)
...
func InitDtmGrpc(grpcDtm string, host string, port int) {
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
if err != nil {
log.Fatal(err)
}
server := grpc.NewServer(grpc.UnaryInterceptor(dtmgimp.GrpcServerLog))
workflow.InitGrpc(grpcDtm, fmt.Sprintf("%s:%d", host, port), server)
go func() {
if err := server.Serve(lis); err != nil {
log.Fatal(err)
}
}()
}
But the DTM which calls the workflow server can't find the service as if it was unregistered.
"log": "{\"level\":\"error\",\"ts\":\"2023-03-22T17:48:21.809Z\",\"caller\":\"dtmsvr/trans_process.go:63\",\"msg\":\"processInner got error: rpc error: code = Unimplemented desc = unknown service workflow.Workflow\",\"stacktrace\":\"github.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).processInner.func1\\n\\t/app/dtm/dtmsvr/trans_process.go:63\\ngithub.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).processInner\\n\\t/app/dtm/dtmsvr/trans_process.go:74\\ngithub.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).process\\n\\t/app/dtm/dtmsvr/trans_process.go:45\\ngithub.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).Process\\n\\t/app/dtm/dtmsvr/trans_process.go:22\\ngithub.com/dtm-labs/dtm/dtmsvr.CronTransOnce\\n\\t/app/dtm/dtmsvr/cron.go:37\\ngithub.com/dtm-labs/dtm/dtmsvr.CronExpiredTrans\\n\\t/app/dtm/dtmsvr/cron.go:45\"}\n",
"stream": "stderr",
"log_processed": {
"level": "error",
"ts": "2023-03-22T17:48:21.809Z",
"caller": "dtmsvr/trans_process.go:63",
"msg": "processInner got error: rpc error: code = Unimplemented desc = unknown service workflow.Workflow",
"stacktrace": "github.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).processInner.func1\n\t/app/dtm/dtmsvr/trans_process.go:63\ngithub.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).processInner\n\t/app/dtm/dtmsvr/trans_process.go:74\ngithub.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).process\n\t/app/dtm/dtmsvr/trans_process.go:45\ngithub.com/dtm-labs/dtm/dtmsvr.(*TransGlobal).Process\n\t/app/dtm/dtmsvr/trans_process.go:22\ngithub.com/dtm-labs/dtm/dtmsvr.CronTransOnce\n\t/app/dtm/dtmsvr/cron.go:37\ngithub.com/dtm-labs/dtm/dtmsvr.CronExpiredTrans\n\t/app/dtm/dtmsvr/cron.go:45"
}
I've checked the ports and connection and it seems to be fine, it's just that workflow service doesn't seem to be registered for some reason
github.com/dtm-labs/client v1.18.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.