Skip to content

Instantly share code, notes, and snippets.

@imbriaco
Created December 11, 2015 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imbriaco/3241577621ef887d4bf0 to your computer and use it in GitHub Desktop.
Save imbriaco/3241577621ef887d4bf0 to your computer and use it in GitHub Desktop.
error.txt
2015-12-11 14:06:52.247 [error] GenServer #PID<0.615.0> terminating
** (Protocol.UndefinedError) protocol Enumerable not implemented for %Ecto.Changeset{action: :insert, changes: %{command_id: "183926b9-1fc9-46d4-bbfa-6f675469825a", id: "23c0aaa6-4aa0-4b18-b286-8ea851d2ccf2", parse_tree: "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}", score: 0}, constraints: [%{constraint: "rules_command_id_parse_tree_index", field: :no_dupes, message: "has already been taken", type: :unique}], errors: [no_dupes: "has already been taken"], filters: %{}, model: %Loop.Models.Rule{__meta__: #Ecto.Schema.Metadata<:built>, command: #Ecto.Association.NotLoaded<association :command is not loaded>, command_id: "183926b9-1fc9-46d4-bbfa-6f675469825a", id: nil, parse_tree: "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}", permission_grants: #Ecto.Association.NotLoaded<association :permission_grants is not loaded>, permissions: #Ecto.Association.NotLoaded<association :permissions is not loaded>, score: 0}, optional: [], opts: [source: :changeset], params: %{"parse_tree" => "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}", "score" => 0}, repo: Loop.Repo, required: [:parse_tree, :score], types: %{command_id: Ecto.UUID, id: Ecto.UUID, parse_tree: :string, permission_grants: {:assoc, %Ecto.Association.Has{cardinality: :many, defaults: [], field: :permission_grants, on_cast: :changeset, on_delete: :nothing, on_replace: :raise, owner: Loop.Models.Rule, owner_key: :id, queryable: Loop.Models.RulePermission, related: Loop.Models.RulePermission, related_key: :rule_id}}, score: :integer}, valid?: false, validations: []}
(elixir) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) lib/enum.ex:112: Enumerable.reduce/3
(elixir) lib/enum.ex:1391: Enum.reduce/3
(elixir) lib/enum.ex:1047: Enum.map/2
(loop) lib/loop/commands/admin/rules.ex:89: Loop.Commands.Admin.Rules.failure/1
(loop) lib/loop/commands/admin.ex:44: Loop.Commands.Admin.handle_message/2
(loop) lib/loop/gen_command.ex:465: Loop.GenCommand.handle_info/2
(stdlib) gen_server.erl:615: :gen_server.try_dispatch/4
Last message: {:publish, "/bot/commands/operable/admin", "{\"request\":{\"room\":{\"topic\":{\"value\":\"\",\"last_set\":0,\"creator\":\"\"},\"name\":\"demo-prep\",\"id\":\"C0GEA42GN\"},\"requestor\":{\"id\":\"U0GE6MJKT\",\"handle\":\"imbriaco\"},\"reply_to\":\"/bot/pipelines/bb56d7f679fb461c8a4fbc225f987014/reply\",\"options\":{\"add\":true},\"command\":\"operable:admin\",\"args\":[\"rules\",\"when command is ec2:list must have ec2:read\"]}}"}
State: %Loop.GenCommand{cb_module: Loop.Commands.Admin, cb_state: [], mq_conn: #PID<0.616.0>, next_service_req_id: 0, reply_topic: "/bot/commands/operable/admin/reply", service_reqs: []}
2015-12-11 14:06:52.293 [error] ** State machine #PID<0.616.0> terminating
** Last message in was {:EXIT, #PID<0.615.0>,
{%Protocol.UndefinedError{description: nil, protocol: Enumerable,
value: %Ecto.Changeset{action: :insert,
changes: %{command_id: "183926b9-1fc9-46d4-bbfa-6f675469825a",
id: "23c0aaa6-4aa0-4b18-b286-8ea851d2ccf2",
parse_tree: "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}",
score: 0},
constraints: [%{constraint: "rules_command_id_parse_tree_index",
field: :no_dupes, message: "has already been taken", type: :unique}],
errors: [no_dupes: "has already been taken"], filters: %{},
model: %Loop.Models.Rule{__meta__: #Ecto.Schema.Metadata<:built>,
command: #Ecto.Association.NotLoaded<association :command is not loaded>,
command_id: "183926b9-1fc9-46d4-bbfa-6f675469825a", id: nil,
parse_tree: "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}",
permission_grants: #Ecto.Association.NotLoaded<association :permission_grants is not loaded>,
permissions: #Ecto.Association.NotLoaded<association :permissions is not loaded>,
score: 0}, optional: [], opts: [source: :changeset],
params: %{"parse_tree" => "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}",
"score" => 0}, repo: Loop.Repo, required: [:parse_tree, :score],
types: %{command_id: Ecto.UUID, id: Ecto.UUID, parse_tree: :string,
permission_grants: {:assoc,
%Ecto.Association.Has{cardinality: :many, defaults: [],
field: :permission_grants, on_cast: :changeset, on_delete: :nothing,
on_replace: :raise, owner: Loop.Models.Rule, owner_key: :id,
queryable: Loop.Models.RulePermission,
related: Loop.Models.RulePermission, related_key: :rule_id}},
score: :integer}, valid?: false, validations: []}},
[{Enumerable, :impl_for!, 1, [file: 'lib/enum.ex', line: 1]},
{Enumerable, :reduce, 3, [file: 'lib/enum.ex', line: 112]},
{Enum, :reduce, 3, [file: 'lib/enum.ex', line: 1391]},
{Enum, :map, 2, [file: 'lib/enum.ex', line: 1047]},
{Loop.Commands.Admin.Rules, :failure, 1,
[file: 'lib/loop/commands/admin/rules.ex', line: 89]},
{Loop.Commands.Admin, :handle_message, 2,
[file: 'lib/loop/commands/admin.ex', line: 44]},
{Loop.GenCommand, :handle_info, 2,
[file: 'lib/loop/gen_command.ex', line: 465]},
{:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 615]}]}}
** When State == :connected
** Data == {:state, #PID<0.615.0>, '<0.616.0>', {127, 0, 0, 1}, 1883, #Port<0.30813>,
#PID<0.650.0>,
{:proto_state, #Port<0.30813>, '127.0.0.1:61319', 4, "MQTT",
"emqttc_trogdor_8441b894cb81d0420d5c", true, 90, false,
{:mqtt_message, 0, false, false, :undefined, :undefined, :undefined},
:undefined, :undefined, 3,
%{"/bot/commands/operable/admin" => 1,
"/bot/commands/operable/admin/reply" => 1}, %{}, %{}, %{},
{:gen_logger, :lager_logger, 2}}, [{#PID<0.615.0>, #Reference<0.0.4.66>}],
%{"/bot/commands/operable/admin" => {1, [#PID<0.615.0>]},
"/bot/commands/operable/admin/reply" => {1, [#PID<0.615.0>]}}, [], [], %{},
2, false,
{:keepalive, #Port<0.30813>, :send_oct, 686, 90, {:keepalive, :timeout},
#Reference<0.0.2.742>}, 90, 60, 4, 8, :undefined, :tcp, :undefined,
{:gen_logger, :lager_logger, 2}, []}
** Reason for termination =
** {%Protocol.UndefinedError{description: nil, protocol: Enumerable,
value: %Ecto.Changeset{action: :insert,
changes: %{command_id: "183926b9-1fc9-46d4-bbfa-6f675469825a",
id: "23c0aaa6-4aa0-4b18-b286-8ea851d2ccf2",
parse_tree: "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}",
score: 0},
constraints: [%{constraint: "rules_command_id_parse_tree_index",
field: :no_dupes, message: "has already been taken", type: :unique}],
errors: [no_dupes: "has already been taken"], filters: %{},
model: %Loop.Models.Rule{__meta__: #Ecto.Schema.Metadata<:built>,
command: #Ecto.Association.NotLoaded<association :command is not loaded>,
command_id: "183926b9-1fc9-46d4-bbfa-6f675469825a", id: nil,
parse_tree: "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}",
permission_grants: #Ecto.Association.NotLoaded<association :permission_grants is not loaded>,
permissions: #Ecto.Association.NotLoaded<association :permissions is not loaded>,
score: 0}, optional: [], opts: [source: :changeset],
params: %{"parse_tree" => "{\"score\":0,\"permission_selector\":{\"perms\":{\"value\":\"ec2:read\",\"quotes\":null,\"line\":1,\"col\":35,\"$ast$\":\"string\"},\"op\":\"has\",\"line\":1,\"col\":35,\"$ast$\":\"perm_expr\"},\"command_selector\":{\"right\":{\"value\":\"ec2:list\",\"quotes\":null,\"line\":1,\"col\":16,\"$ast$\":\"string\"},\"parens\":false,\"op\":\"is\",\"line\":1,\"left\":{\"name\":\"command\",\"$ast$\":\"var\"},\"col\":13,\"$ast$\":\"binary_expr\"},\"command\":\"ec2:list\",\"$ast$\":\"rule\"}",
"score" => 0}, repo: Loop.Repo, required: [:parse_tree, :score],
types: %{command_id: Ecto.UUID, id: Ecto.UUID, parse_tree: :string,
permission_grants: {:assoc,
%Ecto.Association.Has{cardinality: :many, defaults: [],
field: :permission_grants, on_cast: :changeset, on_delete: :nothing,
on_replace: :raise, owner: Loop.Models.Rule, owner_key: :id,
queryable: Loop.Models.RulePermission,
related: Loop.Models.RulePermission, related_key: :rule_id}},
score: :integer}, valid?: false, validations: []}},
[{Enumerable, :impl_for!, 1, [file: 'lib/enum.ex', line: 1]},
{Enumerable, :reduce, 3, [file: 'lib/enum.ex', line: 112]},
{Enum, :reduce, 3, [file: 'lib/enum.ex', line: 1391]},
{Enum, :map, 2, [file: 'lib/enum.ex', line: 1047]},
{Loop.Commands.Admin.Rules, :failure, 1,
[file: 'lib/loop/commands/admin/rules.ex', line: 89]},
{Loop.Commands.Admin, :handle_message, 2,
[file: 'lib/loop/commands/admin.ex', line: 44]},
{Loop.GenCommand, :handle_info, 2,
[file: 'lib/loop/gen_command.ex', line: 465]},
(truncated)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment