cronsun
cronsun copied to clipboard
cronsun 启动问题
Please answer these questions before submitting your issue. Thanks! 在你提交 issue 前,请先回答以下问题,谢谢!
-
What version of Go and cronsun version are you using? go version go1.20.2 darwin/arm64 cronsun-v0.3.5
-
What operating system and processor architecture are you using (
go env
)? GOHOSTARCH="arm64" GOHOSTOS="darwin" -
What did you do? If possible, provide a recipe for reproducing the error. A complete runnable program is good. install etcd and mongo and download cronsun
-
What did you expect to see? run cronnode and cronweb
-
What did you see instead?
./cronnode -conf conf/base.json -l -1
2023-04-27T14:44:32.740+0800 ERROR node/server.go:38 Connect to MongoDB [127.0.0.1:27017] failed: no reachable servers
cat conf/db.json
{
"Hosts": [
"127.0.0.1:27017"
],
"Database": "cronsun",
"#AuthSource": "AuthSource Specify the database name associated with the user’s credentials.",
"#AuthSource": "AuthSource defaults to the cronsun's Database.",
"#AuthSource": "If connect mongodb like './bin/mongo mytest -u test -p 123 --authenticationDatabase admin' ",
"#AuthSource": "the AuthSource is 'admin'. ",
"AuthSource": "cronsun",
"UserName": "shuke",
"Password": "xxxxxx!",
"#Timeout": "connect timeout duration/second",
"Timeout": 15
}

我也遇到了这个问题。cronsun不兼容新版本mongo导致的,你把mongo版本改低点试试,比如mongo:4.4.23。或者你改下cronsun的源码,自己编译一下就行