Guest User

drone-api-error-20201015

a guest
Oct 15th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.55 KB | None | 0 0
  1. $ curl -i -X POST -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxx" https://drone.mydomain.com/api/repos/{ONWER}/{REPO}/builds
  2. HTTP/1.1 500 Internal Server Error
  3. Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
  4. Content-Type: text/plain; charset=utf-8
  5. Expires: Thu, 01 Jan 1970 00:00:00 UTC
  6. Pragma: no-cache
  7. Vary: Origin
  8. X-Accel-Expires: 0
  9. X-Content-Type-Options: nosniff
  10. Date: Thu, 15 Oct 2020 06:05:42 GMT
  11. Content-Length: 22
  12. Connection: close
  13. Strict-Transport-Security: max-age=15768000
  14.  
  15. Internal Server Error
  16.  
  17. ---
  18.  
  19. $ curl -i -X POST -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxx" https://drone.mydomain.com/api/repos/{ONWER}/{REPO}/builds?branch=master
  20. HTTP/1.1 500 Internal Server Error
  21. Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
  22. Content-Type: text/plain; charset=utf-8
  23. Expires: Thu, 01 Jan 1970 00:00:00 UTC
  24. Pragma: no-cache
  25. Vary: Origin
  26. X-Accel-Expires: 0
  27. X-Content-Type-Options: nosniff
  28. Date: Thu, 15 Oct 2020 06:11:40 GMT
  29. Content-Length: 22
  30. Connection: close
  31. Strict-Transport-Security: max-age=15768000
  32.  
  33. Internal Server Error
  34.  
  35. ---
  36.  
  37. ## Drone pod error log ##
  38. Panic: runtime error: index out of range [0] with length 0
  39. goroutine 1894392 [running]:
  40. runtime/debug.Stack(0x3b, 0x0, 0x0)
  41. /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
  42. runtime/debug.PrintStack()
  43. /usr/local/go/src/runtime/debug/stack.go:16 +0x22
  44. github.com/go-chi/chi/middleware.Recoverer.func1.1(0xc00001a600, 0x1ea7f20, 0xc0006c8a80)
  45. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/middleware/recoverer.go:28 +0x1b6
  46. panic(0x19f2ae0, 0xc00027a2a0)
  47. /usr/local/go/src/runtime/panic.go:969 +0x166
  48. github.com/drone/go-scm/scm/driver/stash.(*Error).Error(0xc0006c4500, 0x0, 0xc0002dafb8)
  49. /go/pkg/mod/github.com/drone/go-scm@v1.7.1-0.20200621203823-3731ec1f1136/scm/driver/stash/stash.go:133 +0x41
  50. github.com/drone/drone/handler/api/render.ErrorCode(0x1ea7f20, 0xc0006c8a80, 0x1e6f1c0, 0xc0006c4500, 0x194)
  51. /drone/src/handler/api/render/render.go:55 +0x35
  52. github.com/drone/drone/handler/api/render.NotFound(...)
  53. /drone/src/handler/api/render/render.go:79
  54. github.com/drone/drone/handler/api/repos/builds.HandleCreate.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  55. /drone/src/handler/api/repos/builds/create.go:73 +0xa95
  56. net/http.HandlerFunc.ServeHTTP(0xc0004aa870, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  57. /usr/local/go/src/net/http/server.go:2012 +0x44
  58. github.com/drone/drone/handler/api/acl.CheckAccess.func1.1(0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  59. /drone/src/handler/api/acl/check.go:78 +0x1268
  60. net/http.HandlerFunc.ServeHTTP(0xc0003aecc0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  61. /usr/local/go/src/net/http/server.go:2012 +0x44
  62. github.com/go-chi/chi.(*ChainHandler).ServeHTTP(0xc000082a40, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  63. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/chain.go:31 +0x52
  64. github.com/go-chi/chi.(*Mux).routeHTTP(0xc0004a13e0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  65. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:424 +0x278
  66. net/http.HandlerFunc.ServeHTTP(0xc00036cf70, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  67. /usr/local/go/src/net/http/server.go:2012 +0x44
  68. github.com/go-chi/chi.(*Mux).ServeHTTP(0xc0004a13e0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  69. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:69 +0x4f3
  70. github.com/go-chi/chi.(*Mux).Mount.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  71. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:291 +0x11b
  72. net/http.HandlerFunc.ServeHTTP(0xc0002c65c0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  73. /usr/local/go/src/net/http/server.go:2012 +0x44
  74. github.com/go-chi/chi.(*Mux).routeHTTP(0xc0004a11a0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  75. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:424 +0x278
  76. net/http.HandlerFunc.ServeHTTP(0xc00036cef0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  77. /usr/local/go/src/net/http/server.go:2012 +0x44
  78. github.com/drone/drone/handler/api/acl.CheckAccess.func1.1(0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  79. /drone/src/handler/api/acl/check.go:78 +0x1268
  80. net/http.HandlerFunc.ServeHTTP(0xc0003ae870, 0x1ea7f20, 0xc0006c8a80, 0xc00001ad00)
  81. /usr/local/go/src/net/http/server.go:2012 +0x44
  82. github.com/drone/drone/handler/api/acl.InjectRepository.func1.1(0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  83. /drone/src/handler/api/acl/repo.go:133 +0xf0a
  84. net/http.HandlerFunc.ServeHTTP(0xc0004aa7d0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  85. /usr/local/go/src/net/http/server.go:2012 +0x44
  86. github.com/go-chi/chi.(*Mux).ServeHTTP(0xc0004a11a0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  87. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:69 +0x4f3
  88. github.com/go-chi/chi.(*Mux).Mount.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  89. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:291 +0x11b
  90. net/http.HandlerFunc.ServeHTTP(0xc0002c6ae0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  91. /usr/local/go/src/net/http/server.go:2012 +0x44
  92. github.com/go-chi/chi.(*Mux).routeHTTP(0xc0004a10e0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  93. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:424 +0x278
  94. net/http.HandlerFunc.ServeHTTP(0xc00036ce50, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  95. /usr/local/go/src/net/http/server.go:2012 +0x44
  96. github.com/go-chi/chi.(*Mux).ServeHTTP(0xc0004a10e0, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  97. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:69 +0x4f3
  98. github.com/go-chi/chi.(*Mux).Mount.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  99. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:291 +0x11b
  100. net/http.HandlerFunc.ServeHTTP(0xc0002c6c00, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  101. /usr/local/go/src/net/http/server.go:2012 +0x44
  102. github.com/go-chi/chi.(*Mux).routeHTTP(0xc0004a1080, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  103. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:424 +0x278
  104. net/http.HandlerFunc.ServeHTTP(0xc00036d310, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  105. /usr/local/go/src/net/http/server.go:2012 +0x44
  106. github.com/go-chi/cors.(*Cors).Handler.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  107. /go/pkg/mod/github.com/go-chi/cors@v1.0.0/cors.go:199 +0x183
  108. net/http.HandlerFunc.ServeHTTP(0xc0002c6c20, 0x1ea7f20, 0xc0006c8a80, 0xc00001ac00)
  109. /usr/local/go/src/net/http/server.go:2012 +0x44
  110. github.com/drone/drone/handler/api/auth.HandleAuthentication.func1.1(0x1ea7f20, 0xc0006c8a80, 0xc00001a700)
  111. /drone/src/handler/api/auth/auth.go:51 +0x467
  112. net/http.HandlerFunc.ServeHTTP(0xc0003afc50, 0x1ea7f20, 0xc0006c8a80, 0xc00001a700)
  113. /usr/local/go/src/net/http/server.go:2012 +0x44
  114. github.com/drone/drone/logger.Middleware.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  115. /drone/src/logger/handler.go:36 +0x373
  116. net/http.HandlerFunc.ServeHTTP(0xc0002c6c40, 0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  117. /usr/local/go/src/net/http/server.go:2012 +0x44
  118. github.com/go-chi/chi/middleware.NoCache.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  119. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/middleware/nocache.go:54 +0x2a0
  120. net/http.HandlerFunc.ServeHTTP(0xc0002c6c60, 0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  121. /usr/local/go/src/net/http/server.go:2012 +0x44
  122. github.com/go-chi/chi/middleware.Recoverer.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  123. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/middleware/recoverer.go:35 +0x83
  124. net/http.HandlerFunc.ServeHTTP(0xc0002c6c80, 0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  125. /usr/local/go/src/net/http/server.go:2012 +0x44
  126. github.com/go-chi/chi.(*Mux).ServeHTTP(0xc0004a1080, 0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  127. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:69 +0x4f3
  128. github.com/go-chi/chi.(*Mux).Mount.func1(0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  129. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:291 +0x11b
  130. net/http.HandlerFunc.ServeHTTP(0xc0004a58c0, 0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  131. /usr/local/go/src/net/http/server.go:2012 +0x44
  132. github.com/go-chi/chi.(*Mux).routeHTTP(0xc0004a1020, 0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  133. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:424 +0x278
  134. net/http.HandlerFunc.ServeHTTP(0xc00036cd70, 0x1ea7f20, 0xc0006c8a80, 0xc00001a600)
  135. /usr/local/go/src/net/http/server.go:2012 +0x44
  136. github.com/go-chi/chi.(*Mux).ServeHTTP(0xc0004a1020, 0x1ea7f20, 0xc0006c8a80, 0xc00001a100)
  137. /go/pkg/mod/github.com/go-chi/chi@v3.3.3+incompatible/mux.go:81 +0x2b2
  138. net/http.serverHandler.ServeHTTP(0xc00047e1c0, 0x1ea7f20, 0xc0006c8a80, 0xc00001a100)
  139. /usr/local/go/src/net/http/server.go:2807 +0xa3
  140. net/http.(*conn).serve(0xc0001e61e0, 0x1eacee0, 0xc000230300)
  141. /usr/local/go/src/net/http/server.go:1895 +0x86c
  142. created by net/http.(*Server).Serve
  143. /usr/local/go/src/net/http/server.go:2933 +0x35c
Add Comment
Please, Sign In to add comment