Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/permissions crashes with rabbitmq v. 1.7.0 #22

Open
therevoltingx opened this issue Jan 28, 2010 · 3 comments
Open

/permissions crashes with rabbitmq v. 1.7.0 #22

therevoltingx opened this issue Jan 28, 2010 · 3 comments

Comments

@therevoltingx
Copy link

I'm getting this error with v. 1.7.0 using the default configuration. Which gives guest read/write permissions:

curl -i http://localhost:9999/permissions/
curl: (52) Empty reply from server

In the erlang console:
Error: {json_encode,{bad_term,{<<"guest">>,<<".">>,<<".">>,<<".*">>}}}

=CRASH REPORT==== 27-Jan-2010::22:16:44 ===
crasher:
pid: <0.83.0>
registered_name: []
exception error: bad argument
in function iolist_size/1
called as iolist_size({permissions,
{struct,
[{vhosts,
[{struct,
[{"name",<<"/">>},
{"users",
[{struct,
[{"name",
{<<"guest">>,<<".">>,<<".">>,
<<".">>}},
{"configure",<<".
">>},
{"write",<<".">>},
{"read",<<".
">>}]}]}]}]}]}})
in call from mochiweb_request:respond/2
in call from mochiweb_http:headers/5
initial call: mochiweb_socket_server:acceptor_loop/1
ancestors: [mochiweb_http,rest_server,rest_server_sup,<0.57.0>,<0.56.0>]
messages: []
links: [<0.68.0>,#Port<0.832>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 23
reductions: 906
neighbours:

=ERROR REPORT==== 27-Jan-2010::22:16:44 ===
{mochiweb_socket_server,235,{child_error,badarg}}

However, running:
curl -i http://localhost:9999/permissions/vhost/root works ok.

@amr
Copy link
Contributor

amr commented Apr 22, 2010

I can reproduce this was RabbitMQ 1.7.2. Please find the crash report below.

(alice@pipeline)1> Error: {json_encode,{bad_term,{<<"guest">>,<<".">>,<<".">>,<<".*">>}}}

=CRASH REPORT==== 22-Apr-2010::16:53:09 ===
crasher:
initial call: mochiweb_socket_server:acceptor_loop/1
pid: <0.85.0>
registered_name: []
exception error: bad argument
in function iolist_size/1
called as iolist_size({permissions,
{struct,
[{vhosts,
[{struct,
[{"name",<<"/">>},
{"users",
[{struct,
[{"name",
{<<"guest">>,<<".">>,<<".">>,
<<".">>}},
{"configure",<<".
">>},
{"write",<<".">>},
{"read",<<".
">>}]}]}]}]}]}})
in call from mochiweb_request:respond/2
in call from mochiweb_http:headers/5
ancestors: [mochiweb_http,rest_server,rest_server_sup,<0.59.0>,<0.58.0>]
messages: []
links: [<0.70.0>,#Port<0.872>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 24
reductions: 914
neighbours:

Same happens with a POST request to /permissions to add a permission

@amr
Copy link
Contributor

amr commented Apr 22, 2010

This commit fixes the issue, not sure if it has been proposed by its author for merge.

@amr
Copy link
Contributor

amr commented Apr 28, 2010

Current HEAD had this fixed. Please update the issue if it's still crashing for you.

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

No branches or pull requests

2 participants