How to solve panic: no reachable servers

◇◆丶佛笑我妖孽 提交于 2019-12-11 04:47:38

问题


I am trying to use a Raspberry pi to host a leanote,when i try to run the leanote binary it keep give me this error where no reachable host, what could be the Possible reason?

Panic: no reachable servers

goroutine 1 [running]:
github.com/leanote/leanote/app/db.Init(0x111a4ab0, 0x21, 0x1103c46a, 0x7)
        /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/app/db/Mgo.go:104 +0x500
github.com/leanote/leanote/app.init.1.func27()
        /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/app/init.go:413 +0x2c
github.com/revel/revel.runStartupHooks()
        /Users/life/Documents/Go/package_base/src/github.com/revel/revel/server.go:135 +0x70
github.com/revel/revel.Run(0x1f90)
        /Users/life/Documents/Go/package_base/src/github.com/revel/revel/server.go:92 +0x20c
main.main()
        /Users/life/leanote2/app/tmp/main.go:2294 +0x4f3c4

goroutine 9 [sleep]:
time.Sleep(0x1dcd6500, 0x0)
        /Users/life/app/go1.5.1/src/runtime/time.go:59 +0x104
gopkg.in/mgo%2ev2.(*mongoCluster).syncServersLoop(0x110c50e0)
        /Users/life/Documents/Go/package_base/src/gopkg.in/mgo.v2/cluster.go:383 +0x410
created by gopkg.in/mgo%2ev2.newCluster
        /Users/life/Documents/Go/package_base/src/gopkg.in/mgo.v2/cluster.go:76 +0x1c4

goroutine 49 [sleep]:
time.Sleep(0x2a05f200, 0x1)
        /Users/life/app/go1.5.1/src/runtime/time.go:59 +0x104
gopkg.in/mgo%2ev2.(*mongoServer).pinger(0x111de0a0, 0x1)
        /Users/life/Documents/Go/package_base/src/gopkg.in/mgo.v2/server.go:297 +0x180
created by gopkg.in/mgo%2ev2.newServer
        /Users/life/Documents/Go/package_base/src/gopkg.in/mgo.v2/server.go:90 +0x140

goroutine 52 [sleep]:
time.Sleep(0x2a05f200, 0x1)
        /Users/life/app/go1.5.1/src/runtime/time.go:59 +0x104
gopkg.in/mgo%2ev2.(*mongoServer).pinger(0x10f0c460, 0x1)
        /Users/life/Documents/Go/package_base/src/gopkg.in/mgo.v2/server.go:297 +0x180
created by gopkg.in/mgo%2ev2.newServer
        /Users/life/Documents/Go/package_base/src/gopkg.in/mgo.v2/server.go:90 +0x140

sorry i am new to this XD


回答1:


Most likely your mongoDB server is not running, try checking ps and netstat to find out if mongod is running and is connected to an IP and port.



来源:https://stackoverflow.com/questions/37430510/how-to-solve-panic-no-reachable-servers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!