ok-borg / borg

Search and save shell snippets without leaving your terminal
Apache License 2.0
1.61k stars 58 forks source link

Error while making request #51

Closed pkuczynski closed 7 years ago

pkuczynski commented 7 years ago

When I run: $ borg list files I get the response:

Error while making request: Get http://borg.crufter.com:9992/v1/query?l=5&p=false&q=list: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x6f276]

goroutine 1 [running]:
panic(0x30ba80, 0xc4200160b0)
    /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:500 +0x1a1
github.com/crufter/borg/commands.Query(0x7fff5fbff79d, 0x4, 0x0, 0x0)
    /private/tmp/borg-20161029-46542-1hguymm/borg-0.0.2/src/github.com/crufter/borg/commands/query.go:29 +0x2d6
main.main()
    /private/tmp/borg-20161029-46542-1hguymm/borg-0.0.2/src/github.com/crufter/borg/main.go:29 +0x9e

Possibly this is due the port being blocked by the corporate firewall. Any idea how can I fix that?

In the other hand it should not fail. with SIGSEGV ;)

crufter commented 7 years ago

Hey, @pkuczynski, indeed, that SIGSEGV is not too pretty :D

Here is the thing: we had two hostnames pointing to the server, borg.crufter.com (in earlier versions) and ok-b.org.

Now since the server had an ephemeral IP address (because I'm lazy, terrible human being), when the server died and got a new IP address I forgot to update the borg.crufter.com one, hence your issue.

Should be fixed now if the gods of DNS propagation are merciful to us!

pkuczynski commented 7 years ago

Taaaadaaaa! It works :) Thanks :)