Skip to content
This repository has been archived by the owner on Oct 6, 2019. It is now read-only.

Bug: Default install instructions do not work in Ubuntu #276

Open
vikaskedia opened this issue Apr 30, 2018 · 2 comments
Open

Bug: Default install instructions do not work in Ubuntu #276

vikaskedia opened this issue Apr 30, 2018 · 2 comments

Comments

@vikaskedia
Copy link

vikaskedia commented Apr 30, 2018

Vault v0.10.1

GOLDFISH_VERSION=v0.9.0

Operating system: Ubuntu 18.04

Steps to reproduce: Step 1 -- 4th command at: https://github.com/Caiyeon/goldfish/wiki/Production-Deployment
./vault write secret/goldfish DefaultSecretPath="secret/" UserTransitKey="usertransit" BulletinPath="secret/bulletins/"

Expected behaviour: Return success

Actual behaviour: Error

image

Error
writing data to secret/goldfish: Error making API request.

URL: PUT http://127.0.0.1:8200/v1/secret/goldfish
Code: 404. Errors:

WARNING! The following warnings were returned from Vault:

  * Invalid path for a versioned K/V secrets engine. See the API docs for the
  appropriate API endpoints to use. If using the Vault CLI, use 'vault kv put'
  for this operation.`

Q1) Should the above command be changed to?
./vault kv put secret/goldfish DefaultSecretPath="secret/" UserTransitKey="usertransit" BulletinPath="secret/bulletins/"

Q2) After I use the command from Q1 when I insert the "wrapping token" in web UI, I get the following error message. How to fix this?

image

Here is the content of config.hcl

listener "tcp" {
  address       = ":8000"         # listen on default http port
  tls_disable = 1
  
}
vault {
  address       = "http://127.0.0.1:8200"
  tls_skip_verify = 1
}
disable_mlock = 1

Here is the error message on the console:

image

Goldfish version: v0.9.0
Goldfish successfully bootstrapped to vault

  .
  ...             ...
  .........       ......
   ...........   ..........
     .......... ...............
     .............................
      .............................
         ...........................
        ...........................
        ..........................
        ...... ..................
      ......    ...............
     ..        ..      ....
    .                 ..


{"time":"2018-04-30T03:29:29.744634622Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/","status":200, "latency":4932647,"latency_human":"4.932647ms","bytes_in":0,"bytes_out":1017}
{"time":"2018-04-30T03:29:29.776492264Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/assets/js/manifest.47a7fdd660e1df2c5976.js","status":200, "latency":904676,"latency_human":"904.676µs","bytes_in":0,"bytes_out":1868}
{"time":"2018-04-30T03:29:29.79812789Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/assets/js/app.28dd93835375aefc420a.js","status":200, "latency":3320265,"latency_human":"3.320265ms","bytes_in":0,"bytes_out":35703}
{"time":"2018-04-30T03:29:29.799790103Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/assets/css/app.cad22887ff5ae9774c3db7ffdb37dc37.css","status":200, "latency":22031213,"latency_human":"22.031213ms","bytes_in":0,"bytes_out":250757}
{"time":"2018-04-30T03:29:29.880110108Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/assets/js/vendor.39969aea672c8e4f6fd2.js","status":200, "latency":79239207,"latency_human":"79.239207ms","bytes_in":0,"bytes_out":942634}
{"time":"2018-04-30T03:29:30.337703152Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/assets/js/11.8335c809476da0859479.js","status":200, "latency":548282,"latency_human":"548.282µs","bytes_in":0,"bytes_out":16842}
{"time":"2018-04-30T03:29:30.357628766Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/assets/img/logo.ba9a34f.svg","status":200, "latency":11584048,"latency_human":"11.584048ms","bytes_in":0,"bytes_out":247654}
{"time":"2018-04-30T03:29:30.385427206Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/assets/fonts/fontawesome-webfont.af7ae50.woff2","status":200, "latency":8952348,"latency_human":"8.952348ms","bytes_in":0,"bytes_out":77160}
{"time":"2018-04-30T03:29:30.468788125Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/v1/health","status":200, "latency":993825,"latency_human":"993.825µs","bytes_in":0,"bytes_out":74}
{"time":"2018-04-30T03:29:30.473430686Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"GET","uri":"/v1/vaulthealth","status":200, "latency":6266894,"latency_human":"6.266894ms","bytes_in":0,"bytes_out":202}
{"time":"2018-04-30T03:29:44.551480286Z","level":"-","prefix":"echo","file":"asm_amd64.s","line":"510","message":"[\x1b[31mPANIC RECOVER\x1b[0m] runtime error: invalid memory address or nil pointer dereference goroutine 34 [running]:\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware.RecoverWithConfig.func1.1.1(0x2384f40, 0x1000, 0xc4203d0000, 0x2e574a0, 0xc42048a620)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware/recover.go:75 +0x12a\npanic(0x15952a0, 0x2e9dda0)\n\tC:/Go/src/runtime/panic.go:491 +0x283\ngithub.com/caiyeon/goldfish/vault.VerifyTokenRights(0xc420012f90, 0x24, 0x12, 0xc420054e70, 0xc42004be60, 0x0)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vault/vault.go:261 +0x1ef\ngithub.com/caiyeon/goldfish/vault.Bootstrap(0xc420012c30, 0x24, 0xc42047e900, 0x0)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vault/vault.go:164 +0x1a0\ngithub.com/caiyeon/goldfish/handlers.Bootstrap.func1(0x2e574a0, 0xc42048a620, 0x17d6283, 0xd)\n\tF:/gopath/src/github.com/caiyeon/goldfish/handlers/handlers.go:101 +0x292\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo.(*Echo).add.func1(0x2e574a0, 0xc42048a620, 0xd,
0x1804304)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/echo.go:467 +0x87\ngithub.com/caiyeon/goldfish/server.StartListener.func1.1(0x2e574a0, 0xc42048a620, 0xc420483bc0, 0x2e49c60)\n\tF:/gopath/src/github.com/caiyeon/goldfish/server/server.go:54 +0xa4\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware.GzipWithConfig.func1.1(0x2e574a0, 0xc42048a620, 0x0, 0x0)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware/compress.go:92 +0x17f\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware.BodyLimitWithConfig.func1.1(0x2e574a0, 0xc42048a620, 0x0, 0x0)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware/body_limit.go:87 +0x19f\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware.RecoverWithConfig.func1.1(0x2e574a0, 0xc42048a620, 0x0, 0x0)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware/recover.go:82 +0xe1\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware.LoggerWithConfig.func2.1(0x2e574a0, 0xc42048a620, 0x0, 0x0)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/middleware/logger.go:111 +0x121\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo.(*Echo).ServeHTTP.func1(0x2e574a0, 0xc42048a620, 0xc420056538, 0x17b2e20)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/echo.go:558 +0x108\ngithub.com/caiyeon/goldfish/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0xc4200564e0, 0x2e49c60, 0xc42039c000, 0xc420158200)\n\tF:/gopath/src/github.com/caiyeon/goldfish/vendor/github.com/labstack/echo/echo.go:567 +0x228\nnet/http.serverHandler.ServeHTTP(0xc420062c30, 0x2e49c60, 0xc42039c000, 0xc420158200)\n\tC:/Go/src/net/http/server.go:2619 +0xb4\nnet/http.(*conn).serve(0xc42006bf40, 0x2e4aae0, 0xc420503c40)\n\tC:/Go/src/net/http/server.go:1801 +0x71d\ncreated by net/http.(*Server).Serve\n\tC:/Go/src/net/http/server.go:2720 +0x288\n\ngoroutine 1 [chan receive]:\nmain.main()\n\tF:/gopath/src/github.com/caiyeon/goldfish/server.go:106 +0x4fa\n\ngoroutine 5 [syscall]:\nos/signal.signal_recv(0x0)\n\tC:/Go/src/runtime/sigqueue.go:131 +0xa6\nos/signal.loop()\n\tC:/Go/src/os/signal/signal_unix.go:22 +0x22\ncreated by os/signal.init.0\n\tC:/Go/src/os/signal/signal_unix.go:28 +0x41\n\ngoroutine 8 [chan receive]:\ngithub.com/caiyeon/goldfish/vault.init.0.func1()\n\tF:/gopath/src/github.com/caiyeon/goldfish/vault/vault.go:34 +0x59\ncreated by github.com/caiyeon/goldfish/vault.init.0\n\tF:/gopath/src/github.com/caiyeon/goldfish/vault/vault.go:33 +0x35\n\ngoroutine 9 [IO wait]:\ninternal/poll.runtime_pollWait(0x7fcbe1f56f70, 0x72, 0xffffffffffffffff)\n\tC:/Go/src/runtime/netpoll.go:173 +0x57\ninternal/poll.(*pollDesc).wait(0xc4200ec298, 0x72, 0xc4203d7900, 0x0, 0x0)\n\tC:/Go/src/internal/poll/fd_poll_runtime.go:85 +0xae\ninternal/poll.(*pollDesc).waitRead(0xc4200ec298, 0xffffffffffffff00, 0x0, 0x0)\n\tC:/Go/src/internal/poll/fd_poll_runtime.go:90 +0x3d\ninternal/poll.(*FD).Accept(0xc4200ec280, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\n\tC:/Go/src/internal/poll/fd_unix.go:334 +0x1e2\nnet.(*netFD).acce\n"}
{"time":"2018-04-30T03:29:44.552957896Z","id":"","remote_ip":"10.0.1.9","host":"10.0.1.50:8000","method":"POST","uri":"/v1/bootstrap","status":500, "latency":11578470,"latency_human":"11.57847ms","bytes_in":57,"bytes_out":35}
@vikaskedia vikaskedia changed the title Bug: Default install instructions do not work in Ubuntu 18.04 Bug: Default install instructions do not work in Ubuntu Apr 30, 2018
@Caiyeon
Copy link
Owner

Caiyeon commented May 3, 2018

Hi there. This bug seems to be caused by vault's new API in their v0.10.1 release. There's many ways to fix this, but I am on vacation at the moment and will not be able to fix this anytime soon. I likely will not be able to dedicate time to investigate until July at the earliest.

On the bright side, v0.10.1 has the open sourced official UI, which should satisfy most use cases for the time being.

Cheers

@Caiyeon
Copy link
Owner

Caiyeon commented May 3, 2018

#277

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants