1

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

zac
  • 11
  • 3
  • Please, share source code. A random guess is that the database configured is not reachable, or a resource from the Internet is not reachable (is the PI able to connect to the Internet?) – Stian Skjelstad May 25 '16 at 08:12
  • I am not sure which is the source code.this might be the source code i get from the open source https://github.com/leanote/leanote #!/bin/sh SCRIPTPATH=$(cd "$(dirname "$0")"; pwd) # set link path="$SCRIPTPATH/src/github.com/leanote" if [ ! -d "$path" ]; then mkdir -p "$path" fi rm -rf $SCRIPTPATH/src/github.com/leanote/leanote # 先删除 ln -s ../../../../ $SCRIPTPATH/src/github.com/leanote/leanote # set GOPATH export GOPATH=$SCRIPTPATH script="$SCRIPTPATH/leanote-linux-arm" chmod 777 $script $script -importPath github.com/leanote/leanote – zac May 27 '16 at 10:53

1 Answers1

0

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.

deranjer
  • 309
  • 3
  • 17