Skip to content

同步到ES时打开web监控,程序启动会报错,关掉就正常。同步到多个不同target时能否在同一app.yml中配置还是要分多个程序运行? #122

@ifakeu

Description

@ifakeu

将数据同步到ES时,同步全量数据时是正常的,后台启动程序会报错:
[bba@MySQL transfer2]# tail -fn 30 nohup.out
2022-08-18 17:14:38.008047 I | process id: 10254
2022-08-18 17:14:38.008113 I | GOMAXPROCS :16
2022-08-18 17:14:38.008121 I | source mysql(127.0.0.1:3306)
2022-08-18 17:14:38.008129 I | destination elasticsearch(http://192.168.4.3:9200)
panic: open statics/index.html: no such file or directory

goroutine 1 [running]:
html/template.Must(...)
D:/dev/golang/root/src/html/template/template.go:372
github.com/gin-gonic/gin.(*Engine).LoadHTMLFiles(0xc00001b180, 0xc00075e0c0, 0x1, 0x1)
D:/dev/golang/workspace/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:204 +0x36e
go-mysql-transfer/web.Start(0x0, 0x0)
D:/dev/golang/projects/go-mysql-transfer/web/router.go:36 +0x1d6
main.main()
D:/dev/golang/projects/go-mysql-transfer/main.go:132 +0x11e
后面把web监控设为false后就能正常运行。
另外,如果想同时把mysql的数据同步部分同步到redis,部分同步到es,能在一个app.yml中配置多个target吗?还是需要运行两个transfer,每个transfer只能同步一个类型的target?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions