appcanary / agent

The Appcanary agent
https://www.appcanary.com
GNU General Public License v3.0
47 stars 6 forks source link

retry upload when 500 error #42

Closed mveytsman closed 9 years ago

mveytsman commented 9 years ago

got this in testing from the server

I think maybe we uploaded a partially complete file somehow?

2015-Jun-11 13:44:47 -0700 nabokov.local ERROR [canary.web.utils] - Error in PUT "/api/v1/agent/servers/5579eaf6-2b5e-4f20-add8-9f2dcf4f3cd2" for 127.0.0.1 at Thu Jun 11 13:44:47 PDT 2015 #error { :cause -1 :via [{:type java.lang.ArrayIndexOutOfBoundsException :message -1 :at [base64_clj.core$decode_bytes invoke core.clj 106]}] :trace [[base64_clj.core$decode_bytes invoke core.clj 106] [base64_clj.core$decode invoke core.clj 125] [base64_clj.core$decode invoke core.clj 123] [canary.web.routes.agent$fn22446$fn22457$fn22458 invoke agent.clj 70] [canary.web.auth$fn21965$require_auth21966$fn21967$fn21968 invoke auth.clj 29] [buddy.auth.middleware$wrap_authentication$fn__20966 invoke middleware.clj 39] [buddy.auth.middleware$wrap_authorization$fn20973 invoke middleware.clj 73] [canary.web.routes.agent$fn22446$fn22457 invoke agent.clj 56] [compojure.core$make_route$fn17692 invoke core.clj 113] [compojure.core$wrap_route_middleware$fn17688 invoke core.clj 103] [compojure.core$if_route$fn17671 invoke core.clj 41] [compojure.core$if_method$fn17663 invoke core.clj 27] [compojure.api.meta$body_coercer_middleware$fn18645 invoke meta.clj 56] [compojure.core$routing$fn17698 invoke core.clj 127] [clojure.core$some invoke core.clj 2568] [compojure.core$routing doInvoke core.clj 127] [clojure.lang.RestFn applyTo RestFn.java 139] [clojure.core$apply invoke core.clj 630] [compojure.core$routes$fn17702 invoke core.clj 132] [compojure.core$routing$fn17698 invoke core.clj 127] [clojure.core$some invoke core.clj 2568] [compojure.core$routing doInvoke core.clj 127] [clojure.lang.RestFn invoke RestFn.java 423] [canary.web.routes.agent$fn22446 invoke agent.clj 40] [compojure.core$if_context$fn17720 invoke core.clj 194] [compojure.core$routing$fn17698 invoke core.clj 127] [clojure.core$some invoke core.clj 2568] [compojure.core$routing doInvoke core.clj 127] [clojure.lang.RestFn applyTo RestFn.java 139] [clojure.core$apply invoke core.clj 630] [compojure.core$routes$fn17702 invoke core.clj 132] [clojure.lang.AFn applyToHelper AFn.java 154] [clojure.lang.AFn applyTo AFn.java 144] [clojure.lang.AFunction$1 doInvoke AFunction.java 29] [clojure.lang.RestFn invoke RestFn.java 408] [clojure.lang.Var invoke Var.java 379] [compojure.core$routing$fn17698 invoke core.clj 127] [clojure.core$some invoke core.clj 2568] [compojure.core$routing doInvoke core.clj 127] [clojure.lang.RestFn applyTo RestFn.java 139] [clojure.core$apply invoke core.clj 630] [compojure.core$routes$fn17702 invoke core.clj 132] [compojure.core$routing$fn17698 invoke core.clj 127] [clojure.core$some invoke core.clj 2568] [compojure.core$routing doInvoke core.clj 127] [clojure.lang.RestFn invoke RestFn.java 423] [canary.web.handler$fn10168 invoke handler.clj 49] [compojure.core$if_context$fn17720 invoke core.clj 194] [compojure.core$routing$fn17698 invoke core.clj 127] [clojure.core$some invoke core.clj 2568] [compojure.core$routing doInvoke core.clj 127] [clojure.lang.RestFn applyTo RestFn.java 139] [clojure.core$apply invoke core.clj 630] [compojure.core$routes$fn17702 invoke core.clj 132] [canary.web.utils$eval6284$ignore_trailing_slash6285$fn6286$fn6287 invoke utils.clj 187] [canary.web.utils$eval6240$wrap_logging6241$fn6242$fn6243 invoke utils.clj 170] [compojure.core$routing$fn17698 invoke core.clj 127] [clojure.core$some invoke core.clj 2568] [compojure.core$routing doInvoke core.clj 127] [clojure.lang.RestFn applyTo RestFn.java 139] [clojure.core$apply invoke core.clj 630] [compojure.core$routes$fn17702 invoke core.clj 132] [clojure.lang.AFn applyToHelper AFn.java 154] [clojure.lang.AFn applyTo AFn.java 144] [clojure.lang.AFunction$1 doInvoke AFunction.java 29] [clojure.lang.RestFn invoke RestFn.java 408] [ring.swagger.middleware$wrap_swagger_data$fn19909 invoke middleware.clj 33] [ring.middleware.http_response$wrap_http_response$fn19766 invoke http_response.clj 8] [ring.swagger.middleware$wrap_validation_errors$fn__19934 invoke middleware.clj 68] [compojure.api.middleware$wrap_exceptions$fn19959 invoke middleware.clj 53] [ring.swagger.middleware$wrap_swagger_data$fn19909 invoke middleware.clj 33] [compojure.api.middleware$wrap_options$fn__19962 invoke middleware.clj 67] [ring.middleware.format_params$wrap_format_params$fn19566 invoke format_params.clj 111] [ring.middleware.format_response$wrap_format_response$fn19697 invoke format_response.clj 175] [ring.middleware.keyword_params$wrap_keyword_params$fn19800 invoke keyword_params.clj 35] [ring.middleware.nested_params$wrap_nested_params$fn19844 invoke nested_params.clj 84] [ring.middleware.params$wrap_params$fn19900 invoke params.clj 64] [compojure.api.middleware$wrap_options$fn19962 invoke middleware.clj 67] [clojure.lang.AFn applyToHelper AFn.java 154] [clojure.lang.AFn applyTo AFn.java 144] [clojure.lang.AFunction$1 doInvoke AFunction.java 29] [clojure.lang.RestFn invoke RestFn.java 408] [canary.web.utils$eval6130$wrap_datomic6131$fn6135$fn__6137 invoke utils.clj 144] [canary.web.utils$eval6155$wrap_rubygems_api_key6156$fn6157$fn6158 invoke utils.clj 153] [org.httpkit.server.HttpHandler run RingHandler.java 91] [java.util.concurrent.Executors$RunnableAdapter call Executors.java 511] [java.util.concurrent.FutureTask run FutureTask.java 266] [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1142] [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 617] [java.lang.Thread run Thread.java 745]]} java.lang.ArrayIndexOutOfBoundsException: -1 base64-clj.core/decode-bytes  core.clj: 106 base64-clj.core/decode  core.clj: 125 base64-clj.core/decode  core.clj: 123 canary.web.routes.agent/fn/fn/fn  agent.clj: 70 canary.web.auth/fn/require-auth/fn/fn  auth.clj: 29 buddy.auth.middleware/wrap-authentication/fn  middleware.clj: 39 buddy.auth.middleware/wrap-authorization/fn  middleware.clj: 73 canary.web.routes.agent/fn/fn  agent.clj: 56 compojure.core/make-route/fn  core.clj: 113 compojure.core/wrap-route-middleware/fn  core.clj: 103 compojure.core/if-route/fn  core.clj: 41 compojure.core/if-method/fn  core.clj: 27 compojure.api.meta/body-coercer-middleware/fn  meta.clj: 56 compojure.core/routing/fn  core.clj: 127 clojure.core/some  core.clj: 2568 compojure.core/routing  core.clj: 127 clojure.lang.RestFn.applyTo  RestFn.java: 139 clojure.core/apply  core.clj: 630 compojure.core/routes/fn  core.clj: 132 compojure.core/routing/fn  core.clj: 127 clojure.core/some  core.clj: 2568 compojure.core/routing  core.clj: 127 clojure.lang.RestFn.invoke  RestFn.java: 423 canary.web.routes.agent/fn  agent.clj: 40 compojure.core/if-context/fn  core.clj: 194 compojure.core/routing/fn  core.clj: 127 clojure.core/some  core.clj: 2568 compojure.core/routing  core.clj: 127 clojure.lang.RestFn.applyTo  RestFn.java: 139 clojure.core/apply  core.clj: 630 compojure.core/routes/fn  core.clj: 132 clojure.lang.AFn.applyToHelper  AFn.java: 154 clojure.lang.AFn.applyTo  AFn.java: 144 clojure.lang.AFunction$1.doInvoke  AFunction.java: 29 clojure.lang.RestFn.invoke  RestFn.java: 408 clojure.lang.Var.invoke  Var.java: 379 compojure.core/routing/fn  core.clj: 127 clojure.core/some  core.clj: 2568 compojure.core/routing  core.clj: 127 clojure.lang.RestFn.applyTo  RestFn.java: 139 clojure.core/apply  core.clj: 630 compojure.core/routes/fn  core.clj: 132 compojure.core/routing/fn  core.clj: 127 clojure.core/some  core.clj: 2568 compojure.core/routing  core.clj: 127 clojure.lang.RestFn.invoke  RestFn.java: 423 canary.web.handler/fn  handler.clj: 49 compojure.core/if-context/fn  core.clj: 194 compojure.core/routing/fn  core.clj: 127 clojure.core/some  core.clj: 2568 compojure.core/routing  core.clj: 127 clojure.lang.RestFn.applyTo  RestFn.java: 139 clojure.core/apply  core.clj: 630 compojure.core/routes/fn  core.clj: 132 canary.web.utils/eval6284/ignore-trailing-slash/fn/fn  utils.clj: 187 canary.web.utils/eval6240/wrap-logging/fn/fn  utils.clj: 170 compojure.core/routing/fn  core.clj: 127 clojure.core/some  core.clj: 2568 compojure.core/routing  core.clj: 127 clojure.lang.RestFn.applyTo  RestFn.java: 139 clojure.core/apply  core.clj: 630 compojure.core/routes/fn  core.clj: 132 clojure.lang.AFn.applyToHelper  AFn.java: 154 clojure.lang.AFn.applyTo  AFn.java: 144 clojure.lang.AFunction$1.doInvoke  AFunction.java: 29 clojure.lang.RestFn.invoke  RestFn.java: 408 ring.swagger.middleware/wrap-swagger-data/fn  middleware.clj: 33 ring.middleware.http-response/wrap-http-response/fn  http_response.clj: 8 ring.swagger.middleware/wrap-validation-errors/fn  middleware.clj: 68 compojure.api.middleware/wrap-exceptions/fn  middleware.clj: 53 ring.swagger.middleware/wrap-swagger-data/fn  middleware.clj: 33 compojure.api.middleware/wrap-options/fn  middleware.clj: 67 ring.middleware.format-params/wrap-format-params/fn  format_params.clj: 111 ring.middleware.format-response/wrap-format-response/fn  format_response.clj: 175 ring.middleware.keyword-params/wrap-keyword-params/fn  keyword_params.clj: 35 ring.middleware.nested-params/wrap-nested-params/fn  nested_params.clj: 84 ring.middleware.params/wrap-params/fn  params.clj: 64 compojure.api.middleware/wrap-options/fn  middleware.clj: 67 clojure.lang.AFn.applyToHelper  AFn.java: 154 clojure.lang.AFn.applyTo  AFn.java: 144 clojure.lang.AFunction$1.doInvoke  AFunction.java: 29 clojure.lang.RestFn.invoke  RestFn.java: 408 canary.web.utils/eval6130/wrap-datomic/fn/fn  utils.clj: 144 canary.web.utils/eval6155/wrap-rubygems-api-key/fn/fn  utils.clj: 153 org.httpkit.server.HttpHandler.run  RingHandler.java: 91 java.util.concurrent.Executors$RunnableAdapter.call  Executors.java: 511 java.util.concurrent.FutureTask.run  FutureTask.java: 266 java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1142 java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 617 java.lang.Thread.run  Thread.java: 745

phillmv commented 9 years ago

fixed cos we totally changed the file watcher