appcanary / agent Goto Github PK
View Code? Open in Web Editor NEWThe Appcanary agent
Home Page: https://www.appcanary.com
License: GNU General Public License v3.0
The Appcanary agent
Home Page: https://www.appcanary.com
License: GNU General Public License v3.0
we don't need to barf on literally every error
Check this out @phillmv https://github.com/quii/mockingjay-server
Sysname [65]int8
Nodename [65]int8
Release [65]int8
Version [65]int8
Machine [65]int8
Domainname [65]int8
agent/models/file.go
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$fn__22446$fn__22457$fn__22458 invoke agent.clj 70]
[canary.web.auth$fn__21965$require_auth__21966$fn__21967$fn__21968 invoke auth.clj 29]
[buddy.auth.middleware$wrap_authentication$fn__20966 invoke middleware.clj 39]
[buddy.auth.middleware$wrap_authorization$fn__20973 invoke middleware.clj 73]
[canary.web.routes.agent$fn__22446$fn__22457 invoke agent.clj 56]
[compojure.core$make_route$fn__17692 invoke core.clj 113]
[compojure.core$wrap_route_middleware$fn__17688 invoke core.clj 103]
[compojure.core$if_route$fn__17671 invoke core.clj 41]
[compojure.core$if_method$fn__17663 invoke core.clj 27]
[compojure.api.meta$body_coercer_middleware$fn__18645 invoke meta.clj 56]
[compojure.core$routing$fn__17698 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$fn__17702 invoke core.clj 132]
[compojure.core$routing$fn__17698 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$fn__22446 invoke agent.clj 40]
[compojure.core$if_context$fn__17720 invoke core.clj 194]
[compojure.core$routing$fn__17698 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$fn__17702 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$fn__17698 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$fn__17702 invoke core.clj 132]
[compojure.core$routing$fn__17698 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$fn__10168 invoke handler.clj 49]
[compojure.core$if_context$fn__17720 invoke core.clj 194]
[compojure.core$routing$fn__17698 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$fn__17702 invoke core.clj 132]
[canary.web.utils$eval6284$ignore_trailing_slash__6285$fn__6286$fn__6287 invoke utils.clj 187]
[canary.web.utils$eval6240$wrap_logging__6241$fn__6242$fn__6243 invoke utils.clj 170]
[compojure.core$routing$fn__17698 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$fn__17702 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$fn__19909 invoke middleware.clj 33]
[ring.middleware.http_response$wrap_http_response$fn__19766 invoke http_response.clj 8]
[ring.swagger.middleware$wrap_validation_errors$fn__19934 invoke middleware.clj 68]
[compojure.api.middleware$wrap_exceptions$fn__19959 invoke middleware.clj 53]
[ring.swagger.middleware$wrap_swagger_data$fn__19909 invoke middleware.clj 33]
[compojure.api.middleware$wrap_options$fn__19962 invoke middleware.clj 67]
[ring.middleware.format_params$wrap_format_params$fn__19566 invoke format_params.clj 111]
[ring.middleware.format_response$wrap_format_response$fn__19697 invoke format_response.clj 175]
[ring.middleware.keyword_params$wrap_keyword_params$fn__19800 invoke keyword_params.clj 35]
[ring.middleware.nested_params$wrap_nested_params$fn__19844 invoke nested_params.clj 84]
[ring.middleware.params$wrap_params$fn__19900 invoke params.clj 64]
[compojure.api.middleware$wrap_options$fn__19962 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_datomic__6131$fn__6135$fn__6137 invoke utils.clj 144]
[canary.web.utils$eval6155$wrap_rubygems_api_key__6156$fn__6157$fn__6158 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]]}
�[1;31mjava.lang.ArrayIndexOutOfBoundsException�[m: �[3m-1�[m
�[33mbase64-clj.core/�[1;33mdecode-bytes�[m �[32m core.clj: 106�[m
�[33mbase64-clj.core/�[1;33mdecode�[m �[32m core.clj: 125�[m
�[33mbase64-clj.core/�[1;33mdecode�[m �[32m core.clj: 123�[m
�[33mcanary.web.routes.agent/fn/fn/�[1;33mfn�[m �[32m agent.clj: 70�[m
�[33mcanary.web.auth/fn/require-auth/fn/�[1;33mfn�[m �[32m auth.clj: 29�[m
�[33mbuddy.auth.middleware/wrap-authentication/�[1;33mfn�[m �[32m middleware.clj: 39�[m
�[33mbuddy.auth.middleware/wrap-authorization/�[1;33mfn�[m �[32m middleware.clj: 73�[m
�[33mcanary.web.routes.agent/fn/�[1;33mfn�[m �[32m agent.clj: 56�[m
�[33mcompojure.core/make-route/�[1;33mfn�[m �[32m core.clj: 113�[m
�[33mcompojure.core/wrap-route-middleware/�[1;33mfn�[m �[32m core.clj: 103�[m
�[33mcompojure.core/if-route/�[1;33mfn�[m �[32m core.clj: 41�[m
�[33mcompojure.core/if-method/�[1;33mfn�[m �[32m core.clj: 27�[m
�[33mcompojure.api.meta/body-coercer-middleware/�[1;33mfn�[m �[32m meta.clj: 56�[m
�[33mcompojure.core/routing/�[1;33mfn�[m �[32m core.clj: 127�[m
�[33mclojure.core/�[1;33msome�[m �[32m core.clj: 2568�[m
�[33mcompojure.core/�[1;33mrouting�[m �[32m core.clj: 127�[m
�[37mclojure.lang.RestFn.applyTo�[m �[32m RestFn.java: 139�[m
�[33mclojure.core/�[1;33mapply�[m �[32m core.clj: 630�[m
�[33mcompojure.core/routes/�[1;33mfn�[m �[32m core.clj: 132�[m
�[33mcompojure.core/routing/�[1;33mfn�[m �[32m core.clj: 127�[m
�[33mclojure.core/�[1;33msome�[m �[32m core.clj: 2568�[m
�[33mcompojure.core/�[1;33mrouting�[m �[32m core.clj: 127�[m
�[37mclojure.lang.RestFn.invoke�[m �[32m RestFn.java: 423�[m
�[33mcanary.web.routes.agent/�[1;33mfn�[m �[32m agent.clj: 40�[m
�[33mcompojure.core/if-context/�[1;33mfn�[m �[32m core.clj: 194�[m
�[33mcompojure.core/routing/�[1;33mfn�[m �[32m core.clj: 127�[m
�[33mclojure.core/�[1;33msome�[m �[32m core.clj: 2568�[m
�[33mcompojure.core/�[1;33mrouting�[m �[32m core.clj: 127�[m
�[37mclojure.lang.RestFn.applyTo�[m �[32m RestFn.java: 139�[m
�[33mclojure.core/�[1;33mapply�[m �[32m core.clj: 630�[m
�[33mcompojure.core/routes/�[1;33mfn�[m �[32m core.clj: 132�[m
�[37mclojure.lang.AFn.applyToHelper�[m �[32m AFn.java: 154�[m
�[37mclojure.lang.AFn.applyTo�[m �[32m AFn.java: 144�[m
�[37mclojure.lang.AFunction$1.doInvoke�[m �[32m AFunction.java: 29�[m
�[37mclojure.lang.RestFn.invoke�[m �[32m RestFn.java: 408�[m
�[37mclojure.lang.Var.invoke�[m �[32m Var.java: 379�[m
�[33mcompojure.core/routing/�[1;33mfn�[m �[32m core.clj: 127�[m
�[33mclojure.core/�[1;33msome�[m �[32m core.clj: 2568�[m
�[33mcompojure.core/�[1;33mrouting�[m �[32m core.clj: 127�[m
�[37mclojure.lang.RestFn.applyTo�[m �[32m RestFn.java: 139�[m
�[33mclojure.core/�[1;33mapply�[m �[32m core.clj: 630�[m
�[33mcompojure.core/routes/�[1;33mfn�[m �[32m core.clj: 132�[m
�[33mcompojure.core/routing/�[1;33mfn�[m �[32m core.clj: 127�[m
�[33mclojure.core/�[1;33msome�[m �[32m core.clj: 2568�[m
�[33mcompojure.core/�[1;33mrouting�[m �[32m core.clj: 127�[m
�[37mclojure.lang.RestFn.invoke�[m �[32m RestFn.java: 423�[m
�[33mcanary.web.handler/�[1;33mfn�[m �[32m handler.clj: 49�[m
�[33mcompojure.core/if-context/�[1;33mfn�[m �[32m core.clj: 194�[m
�[33mcompojure.core/routing/�[1;33mfn�[m �[32m core.clj: 127�[m
�[33mclojure.core/�[1;33msome�[m �[32m core.clj: 2568�[m
�[33mcompojure.core/�[1;33mrouting�[m �[32m core.clj: 127�[m
�[37mclojure.lang.RestFn.applyTo�[m �[32m RestFn.java: 139�[m
�[33mclojure.core/�[1;33mapply�[m �[32m core.clj: 630�[m
�[33mcompojure.core/routes/�[1;33mfn�[m �[32m core.clj: 132�[m
�[33mcanary.web.utils/eval6284/ignore-trailing-slash/fn/�[1;33mfn�[m �[32m utils.clj: 187�[m
�[33mcanary.web.utils/eval6240/wrap-logging/fn/�[1;33mfn�[m �[32m utils.clj: 170�[m
�[33mcompojure.core/routing/�[1;33mfn�[m �[32m core.clj: 127�[m
�[33mclojure.core/�[1;33msome�[m �[32m core.clj: 2568�[m
�[33mcompojure.core/�[1;33mrouting�[m �[32m core.clj: 127�[m
�[37mclojure.lang.RestFn.applyTo�[m �[32m RestFn.java: 139�[m
�[33mclojure.core/�[1;33mapply�[m �[32m core.clj: 630�[m
�[33mcompojure.core/routes/�[1;33mfn�[m �[32m core.clj: 132�[m
�[37mclojure.lang.AFn.applyToHelper�[m �[32m AFn.java: 154�[m
�[37mclojure.lang.AFn.applyTo�[m �[32m AFn.java: 144�[m
�[37mclojure.lang.AFunction$1.doInvoke�[m �[32m AFunction.java: 29�[m
�[37mclojure.lang.RestFn.invoke�[m �[32m RestFn.java: 408�[m
�[33mring.swagger.middleware/wrap-swagger-data/�[1;33mfn�[m �[32m middleware.clj: 33�[m
�[33mring.middleware.http-response/wrap-http-response/�[1;33mfn�[m �[32m http_response.clj: 8�[m
�[33mring.swagger.middleware/wrap-validation-errors/�[1;33mfn�[m �[32m middleware.clj: 68�[m
�[33mcompojure.api.middleware/wrap-exceptions/�[1;33mfn�[m �[32m middleware.clj: 53�[m
�[33mring.swagger.middleware/wrap-swagger-data/�[1;33mfn�[m �[32m middleware.clj: 33�[m
�[33mcompojure.api.middleware/wrap-options/�[1;33mfn�[m �[32m middleware.clj: 67�[m
�[33mring.middleware.format-params/wrap-format-params/�[1;33mfn�[m �[32m format_params.clj: 111�[m
�[33mring.middleware.format-response/wrap-format-response/�[1;33mfn�[m �[32m format_response.clj: 175�[m
�[33mring.middleware.keyword-params/wrap-keyword-params/�[1;33mfn�[m �[32m keyword_params.clj: 35�[m
�[33mring.middleware.nested-params/wrap-nested-params/�[1;33mfn�[m �[32m nested_params.clj: 84�[m
�[33mring.middleware.params/wrap-params/�[1;33mfn�[m �[32m params.clj: 64�[m
�[33mcompojure.api.middleware/wrap-options/�[1;33mfn�[m �[32m middleware.clj: 67�[m
�[37mclojure.lang.AFn.applyToHelper�[m �[32m AFn.java: 154�[m
�[37mclojure.lang.AFn.applyTo�[m �[32m AFn.java: 144�[m
�[37mclojure.lang.AFunction$1.doInvoke�[m �[32m AFunction.java: 29�[m
�[37mclojure.lang.RestFn.invoke�[m �[32m RestFn.java: 408�[m
�[33mcanary.web.utils/eval6130/wrap-datomic/fn/�[1;33mfn�[m �[32m utils.clj: 144�[m
�[33mcanary.web.utils/eval6155/wrap-rubygems-api-key/fn/�[1;33mfn�[m �[32m utils.clj: 153�[m
�[37morg.httpkit.server.HttpHandler.run�[m �[32m RingHandler.java: 91�[m
�[37mjava.util.concurrent.Executors$RunnableAdapter.call�[m �[32m Executors.java: 511�[m
�[37mjava.util.concurrent.FutureTask.run�[m �[32m FutureTask.java: 266�[m
�[37mjava.util.concurrent.ThreadPoolExecutor.runWorker�[m �[32mThreadPoolExecutor.java: 1142�[m
�[37mjava.util.concurrent.ThreadPoolExecutor$Worker.run�[m �[32mThreadPoolExecutor.java: 617�[m
�[37mjava.lang.Thread.run�[m �[32m Thread.java: 745�[m
While watching gemcanary-nest locally
after several iterations of git checkout origin/master
and git checkout HEAD^
we stop posting to the api.
sprockets error
go-logging isn't threadsafe lol
Also I don't know what the point is...
2015/04/09 15:32:54 Reading file: /Users/phillmv/code/state/canary-web/Gemfile.lock
2015/04/09 15:32:54
parse error near Unknown (line 1 symbol 1 - line 1 symbol 1):
parse error near Space (line 178 symbol 24 - line 178 symbol 25):
parse error near Spaces (line 178 symbol 24 - line 178 symbol 25):
parse error near Constraint (line 178 symbol 22 - line 178 symbol 30):
>= 4.2.0
parse error near Spaces (line 178 symbol 21 - line 178 symbol 21):
parse error near Spaces (line 178 symbol 20 - line 178 symbol 21):
parse error near LineEnd (line 178 symbol 0 - line 178 symbol 1):
parse error near Space (line 178 symbol 6 - line 178 symbol 7):
parse error near Spaces (line 178 symbol 1 - line 178 symbol 7):
parse error near Specs (line 3 symbol 1 - line 178 symbol 1):
specs:
actionmailer (4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0)
actionview (= 4.2.0)
activesupport (= 4.2.0)
rack (~> 1.6.0)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
active_model_serializers (0.9.3)
activemodel (>= 3.2)
activejob (4.2.0)
activesupport (= 4.2.0)
globalid (>= 0.3.0)
activemodel (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
arel (~> 6.0)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
annotate (2.6.5)
activerecord (>= 2.3.0)
rake (>= 0.8.7)
ansi (1.5.0)
arel (6.0.0)
autoprefixer-rails (5.0.0.3)
execjs
json
bcrypt (3.1.9)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.3)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
bourbon (4.2.1)
sass (~> 3.4)
thor
builder (3.2.2)
byebug (3.5.1)
columnize (~> 0.8)
debugger-linecache (~> 1.2)
slop (~> 3.6)
capistrano (3.2.1)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
capistrano-bundler (1.1.4)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-npm (1.0.1)
capistrano (>= 3.0.0)
capistrano-rails (1.1.2)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rails-console (0.5.0)
capistrano (>= 3.0.0, < 4.0.0)
capistrano3-unicorn (0.2.1)
capistrano (~> 3.1, >= 3.1.0)
chunky_png (1.3.4)
coderay (1.1.0)
colorize (0.7.5)
columnize (0.9.0)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
erubis (2.7.0)
execjs (2.2.2)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faker (1.4.3)
i18n (~> 0.5)
faraday (0.9.1)
multipart-post (>= 1.2, < 3)
font-awesome-rails (4.3.0.0)
railties (>= 3.2, < 5.0)
globalid (0.3.0)
activesupport (>= 4.1.0)
hike (1.2.3)
htmlentities (4.3.3)
httparty (0.13.3)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.7.0)
jbuilder (2.2.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (4.0.3)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
jwt (1.2.1)
kgio (2.9.3)
loofah (2.0.1)
nokogiri (>= 1.5.9)
m (1.3.2)
method_source (>= 0.6.7)
rake (>= 0.9.2.2)
mail (2.6.3)
mime-types (>= 1.16, < 3)
method_source (0.8.2)
mime-types (2.4.3)
mini_portile (0.6.2)
minitest (5.5.1)
minitest-reporters (1.0.10)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
minitest-spec-rails (5.2.0)
minitest (~> 5.0)
rails (~> 4.1)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
neat (1.7.2)
bourbon (>= 4.0)
sass (>= 3.3)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.2)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
oauth (0.4.7)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
pg (0.18.1)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.0.1)
byebug (~> 3.4)
pry (~> 0.10)
pry-rails (0.3.2)
pry (>= 0.9.10)
rack (1.6.0)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.0)
actionmailer (= 4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
activemodel (= 4.2.0)
activerecord (= 4.2.0)
activesupport (= 4.2.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.0)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
parse error near Action0 (line 2 symbol 1 - line 2 symbol 1):
parse error near Unknown (line 1 symbol 1 - line 1 symbol 1):
parse error near Unknown (line 1 symbol 1 - line 1 symbol 1):
=== RUN TestHeartbeat
==================
WARNING: DATA RACE
Read by goroutine 21:
reflect.Value.Bool()
/usr/local/Cellar/go/1.4/libexec/src/reflect/value.go:242 +0x4d
encoding/json.boolEncoder()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:478 +0x6e
encoding/json.(*structEncoder).encode()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:584 +0x35b
encoding/json.*structEncoder.(encoding/json.encode)·fm()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:598 +0x65
encoding/json.(*ptrEncoder).encode()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:706 +0x11a
encoding/json.*ptrEncoder.(encoding/json.encode)·fm()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:711 +0x65
encoding/json.(*arrayEncoder).encode()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:687 +0x148
encoding/json.*arrayEncoder.(encoding/json.encode)·fm()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:694 +0x65
encoding/json.(*sliceEncoder).encode()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:664 +0xd6
encoding/json.*sliceEncoder.(encoding/json.encode)·fm()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:673 +0x65
encoding/json.(*mapEncoder).encode()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:619 +0x397
encoding/json.*mapEncoder.(encoding/json.encode)·fm()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:629 +0x65
encoding/json.(*encodeState).reflectValue()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:299 +0x7f
encoding/json.(*encodeState).marshal()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:270 +0x103
encoding/json.Marshal()
/usr/local/Cellar/go/1.4/libexec/src/encoding/json/encode.go:135 +0xdb
github.com/stateio/canary-agent/agent.(*CanaryClient).Heartbeat()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/client.go:42 +0x114
github.com/stateio/canary-agent/agent.(*ClientTestSuite).TestHeartbeat()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/client_test.go:78 +0x2d2
runtime.call16()
/usr/local/Cellar/go/1.4/libexec/src/runtime/asm_amd64.s:401 +0x44
reflect.Value.Call()
/usr/local/Cellar/go/1.4/libexec/src/reflect/value.go:296 +0xd8
github.com/stateio/testify/suite.func·003()
/Users/phillmv/code/go/src/github.com/stateio/testify/suite/suite.go:94 +0x32c
testing.tRunner()
/usr/local/Cellar/go/1.4/libexec/src/testing/testing.go:447 +0x133
Previous write by goroutine 22:
github.com/stateio/canary-agent/agent/models.(*WatchedFile).SetBeingWatched()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/models/file.go:81 +0x50
github.com/stateio/canary-agent/agent/models.(*WatchedFile).scan()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/models/file.go:107 +0x6d
github.com/stateio/canary-agent/agent/models.(*WatchedFile).listen()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/models/file.go:92 +0x4d
Goroutine 21 (running) created at:
testing.RunTests()
/usr/local/Cellar/go/1.4/libexec/src/testing/testing.go:555 +0xd4e
github.com/stateio/testify/suite.Run()
/Users/phillmv/code/go/src/github.com/stateio/testify/suite/suite.go:102 +0x797
github.com/stateio/canary-agent/agent.TestClient()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/client_test.go:31 +0x76
testing.tRunner()
/usr/local/Cellar/go/1.4/libexec/src/testing/testing.go:447 +0x133
Goroutine 22 (running) created at:
github.com/stateio/canary-agent/agent/models.(*WatchedFile).StartListener()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/models/file.go:62 +0x9d
github.com/stateio/canary-agent/agent/models.NewWatchedFileWithHook()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/models/file.go:35 +0x5c
github.com/stateio/canary-agent/agent.(*ClientTestSuite).SetupTest()
/Users/phillmv/code/go/src/github.com/stateio/canary-agent/agent/client_test.go:43 +0x11d
github.com/stateio/testify/suite.func·003()
/Users/phillmv/code/go/src/github.com/stateio/testify/suite/suite.go:86 +0x10f
testing.tRunner()
/usr/local/Cellar/go/1.4/libexec/src/testing/testing.go:447 +0x133
==================
D0614 18:16:42.27197 33295 client.go:135] Request: POST http://127.0.0.1:60810/api/v1/agent/heartbeat/server uuid
D0614 18:16:42.274448 33295 client.go:63] Heartbeat: 0001-01-01 00:00:00 +0000 UTC
D0614 18:16:42.27455 33295 file.go:67] No longer listening to: /Users/phillmv/code/go/src/github.com/stateio/canary-agent/test/data/test.conf
--- PASS: TestHeartbeat (0.51s)
=== RUN TestSendFile
D0614 18:16:42.275987 33295 client.go:135] Request: PUT http://127.0.0.1:60812/api/v1/agent/servers/server uuid
--- PASS: TestSendFile (0.00s)
--- PASS: TestClient (0.53s)
PASS
ok github.com/stateio/canary-agent/agent
It should be back in the agent package
or better named
About 20% of the time TestWatchFileHookLoop
will just hang until the go test utility kills the test because of a timeout.
The remainder of the time it works as intended.
The timer in the inner go routine won't fire For Reasons.
That's as far as I've been able to determine; the test will run, all of the right files get written to, the callbacks fire - except for the timers. I've narrowed down on the timers because, on the trial runs where the test fails, the debug "print" statements near the timer code never show up.
On successful runs, the output file becomes filled with "microloop"
print statements.
If on the failing runs the loop never writes to invokedCount
, that would explain why the test hangs and never exits.
(Not only that, but hanging tests won't print to stdout, thus forcing me to resource to all the write calls to /tmp/wtf
as a means of getting debugging values)
I can reproduce this some of the time by running the test:
make testr t=WatchFileHookLoop
and in a separate terminal tab,
touch /tmp/wtf && tail -f /tmp/wtf
Once this gets cleaned up, it'd be real smart to get rid of all of the /tmp/wtf
calls.
i.e. what happens when connections fail.
i.e. what happens when a file moves but doesn't reappear within 100 milliseconds?
on testing gemcanary.
"why is this here"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.