0.2.0: Feedback

6 views
Skip to first unread message

CEA-SEPIA

unread,
Jan 12, 2011, 6:12:45 AM1/12/11
to UCengine
I'm getting weird result from the new version. I change the call to
fit with your new prototypes.

If I register a new user I'm getting a 500 Internal server error, but
the user is well created since I can retrieve it with bin/ucectl user
list.

The new user systematically can not be authentified and get a 401
unauthorized.

I also try to add the user from ucectl but even if the user is
successfully created I'm getting the same result (401) at the
authentification part.

My set of tuple:
bin/ucectl org add --name 'cea' --fullname 'Comissariat a lEnergie
Atomique'
bin/ucectl user add --uid "mms" --auth 'password' --credential 'mms' --
org 'cea'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'meeting' --action
'add'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'meeting' --action
'join'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'meeting' --action
'delete'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'event' --action
'add'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'event' --action
'join'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'event' --action
'delete'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'org' --action
'add'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'org' --action
'join'
bin/ucectl acl add --uid 'mms' --org 'cea' --object 'org' --action
'delete'
bin/ucectl acl add --uid 'encre-video' --org 'cea' --object 'event' --
action 'add'
bin/ucectl acl add --uid 'encre-video' --org 'cea' --object 'event' --
action 'join'

CEA-SEPIA

unread,
Jan 12, 2011, 7:16:21 AM1/12/11
to UCengine
It is because jQuery send application/x-www-form-urlencoded and you
expect a multipart/form-data.

=ERROR REPORT==== 12-Jan-2011::13:07:19 ===
Can't parse multipart if we find no multipart/form-data
=INFO REPORT==== 12-Jan-2011::13:07:19 ===
DEBUG: appmod_uce:122: Call user_controller:add matching ["test"] with
["password",

"test",

[{"org",

"cea"}]]

=ERROR REPORT==== 12-Jan-2011::13:07:19 ===
appmod_uce:133: Error: user_controller:add: {undef,

[{crypto,rand_uniform,"0:"},
{utils,random,1},
{uce_event,add,1},
{user_controller,add,3},

{appmod_uce,call_handlers,4},

{yaws_server,deliver_dyn_part,8},
{yaws_server,aloop,3},

{yaws_server,acceptor0,2}]}

On 12 jan, 12:54, Victor Goya <bebepho...@gmail.com> wrote:
> On 01/12/2011 12:12 PM, CEA-SEPIA wrote:
>
> > I'm getting weird result from the new version. I change the call to
> > fit with your new prototypes.
>
> > If I register a new user I'm getting a 500 Internal server error, but
> > the user is well created since I can retrieve it with bin/ucectl user
> > list.
>
> We couldn't reproduce this error, can you please give us more
> informations ? Are there any errors in tmp/ucengine.log ?
> You need to allow the newly created user to add his presence:
>
> $ bin/ucectl acl add --uid 'mms' --org 'cea' --object 'presence'
> --action 'add'
>
> --
> Victor Goya

CEA-SEPIA

unread,
Jan 12, 2011, 7:21:07 AM1/12/11
to UCengine
In the case of a multipart/form-data I'm getting this error:

=ERROR REPORT==== 12-Jan-2011::13:20:55 ===


ERROR erlang code crashed:
File: appmod:0
Reason: {{badmatch,false},
[{yaws_api,parse_multipart_post,1},
{uce_http,extract,2},
{appmod_uce,out,1},
{yaws_server,deliver_dyn_part,8},
{yaws_server,aloop,3},
{yaws_server,acceptor0,2},
{proc_lib,init_p_do_apply,3}]}
Req: {http_request,'POST',{abs_path,"/api/0.2/presence/mms"},{1,1}}
Stack: [{yaws_api,parse_multipart_post,1},
{uce_http,extract,2},
{appmod_uce,out,1},
{yaws_server,deliver_dyn_part,8},
{yaws_server,aloop,3},
{yaws_server,acceptor0,2},
{proc_lib,init_p_do_apply,3}]
Message has been deleted

CEA-SEPIA

unread,
Jan 12, 2011, 11:26:48 AM1/12/11
to UCengine
I'm getting this error(cf. below) it is my yaws configuration I think.

Can you send me yours please ?

=ERROR REPORT==== 12-Jan-2011::17:25:40 ===
uce_app:32:
"[67,111,117,108,100,32,110,111,116,32,115,101,116,117,112,32,72,84,84,80,32,\n
115,101,114,118,101,114,58,32,\n [123,\n [\"undef\",44,10,\n [\"
\",\" \",32,\n [[32,\" \",32,32,32],32,\" \",32,32,32],\n
[32,\" \",32,32,32],\n 32,\" \",32,32,32],\n [91,\n
[[123,\n [\"yaws\",44,\"start_embedded\",44,10,\n [\" \",
\" \",32,\" \",\" \",32,\n [[32,\" \",32,32,32],32,\" \",
32,32,32],\n [32,\" \",32,32,32],\n 32,\" \",
32,32,32],\n [91,\n [\"\\\"priv/www/\\\"\",
44,10,\n [32,\" \",\" \",32,\" \",\" \",32,\n
[[32,\" \",32,32,32],32,\" \",32,32,32],\n [32,\" \",
32,32,32],\n 32,\" \",32,32,32],\n [91,\n
[[123,[\"servername\",44,\"\\\"ucengine\\\"\"],125],\n
44,10,\n [32,32,\" \",\" \",32,\" \",\" \",
32,\n [[32,\" \",32,32,32],32,\" \",32,32,32],
\n [32,\" \",32,32,32],\n 32,\" \",32,32,32],
\n [123,[\"listen\",44,[123,[\"0\",44,\"0\",44,\"0\",
44,\"0\"],125]],125],\n 44,10,\n [32,32,\" \",\"
\",32,\" \",\" \",32,\n [[32,\" \",32,32,32],32,\" \",
32,32,32],\n [32,\" \",32,32,32],\n 32,\" \",
32,32,32],\n [123,[\"port\",44,\"5280\"],125],\n
44,10,\n [32,32,\" \",\" \",32,\" \",\" \",
32,\n [[32,\" \",32,32,32],32,\" \",32,32,32],
\n [32,\" \",32,32,32],\n 32,\" \",32,32,32],
\n [123,\n [\"appmods\",44,\n [91,
[[123,[\"\\\"/api/0.2\\\"\",44,\"appmod_uce\"],125]],93]],
\n 125]],\n 93],\n 44,10,\n
[32,\" \",\" \",32,\" \",\" \",32,\n [[32,\" \",
32,32,32],32,\" \",32,32,32],\n [32,\" \",32,32,32],
\n 32,\" \",32,32,32],\n [91,\n [[123,
[\"auth_log\",44,\"false\"],125],\n 44,10,\n
[32,32,\" \",\" \",32,\" \",\" \",32,\n [[32,\" \",
32,32,32],32,\" \",32,32,32],\n [32,\" \",32,32,32],
\n 32,\" \",32,32,32],\n [123,[\"access_log\",
44,\"false\"],125],\n 44,10,\n [32,32,\" \",\"
\",32,\" \",\" \",32,\n [[32,\" \",32,32,32],32,\" \",
32,32,32],\n [32,\" \",32,32,32],\n 32,\" \",
32,32,32],\n [123,[\"copy_errlog\",44,\"false\"],125],
\n 44,10,\n [32,32,\" \",\" \",32,\" \",\" \",
32,\n [[32,\" \",32,32,32],32,\" \",32,32,32],
\n [32,\" \",32,32,32],\n 32,\" \",32,32,32],
\n [123,[\"debug\",44,\"false\"],125],\n
44,10,\n [32,32,\" \",\" \",32,\" \",\" \",
32,\n [[32,\" \",32,32,32],32,\" \",32,32,32],
\n [32,\" \",32,32,32],\n 32,\" \",32,32,32],
\n [123,[\"copy_error_log\",44,\"false\"],125],\n
44,10,\n [32,32,\" \",\" \",32,\" \",\" \",
32,\n [[32,\" \",32,32,32],32,\" \",32,32,32],
\n [32,\" \",32,32,32],\n 32,\" \",32,32,32],
\n [123,[\"max_connections\",44,\"nolimit\"],125]],
\n 93]],\n 93]],\n 125],\n 44,10,\n
[32,\" \",\" \",32,\n [[32,\" \",32,32,32],32,\" \",
32,32,32],\n [32,\" \",32,32,32],\n 32,\" \",32,32,32],
\n [123,[\"uce_app\",44,\"setup_server\",44,\"0\"],125],\n
44,10,\n [32,\" \",\" \",32,\n [[32,\" \",32,32,32],
32,\" \",32,32,32],\n [32,\" \",32,32,32],\n 32,\" \",
32,32,32],\n [123,[\"uce_app\",44,\"setup\",44,\"0\"],125],\n
44,10,\n [32,\" \",\" \",32,\n [[32,\" \",32,32,32],
32,\" \",32,32,32],\n [32,\" \",32,32,32],\n 32,\" \",
32,32,32],\n [123,[\"uce_app\",44,\"start\",44,\"2\"],125],\n
44,10,\n [32,\" \",\" \",32,\n [[32,\" \",32,32,32],
32,\" \",32,32,32],\n [32,\" \",32,32,32],\n 32,\" \",
32,32,32],\n [123,[\"application_master\",44,\"start_it_old\",
44,\"4\"],125]],\n 93]],\n 125]]"

=INFO REPORT==== 12-Jan-2011::17:25:40 ===
application: uce
exited: {"Could not setup HTTP server: {undef,
\n [{yaws,start_embedded,
\n [\"priv/www/\",
\n [{servername,\"ucengine\"},
\n {listen,{0,0,0,0}},
\n {port,5280},
\n {appmods,[{\"/api/
0.2\",appmod_uce}]}],\n
[{auth_log,false},\n
{access_log,false},\n
{copy_errlog,false},\n
{debug,false},\n
{copy_error_log,false},\n
{max_connections,nolimit}]]},\n
{uce_app,setup_server,0},\n
{uce_app,setup,0},\n {uce_app,start,
2},\n
{application_master,start_it_old,4}]}",
{uce_app,start,[normal,[]]}}
type: temporary

On 12 jan, 14:48, Victor Goya <bebepho...@gmail.com> wrote:
> On 01/12/2011 01:12 PM, CEA-SEPIA wrote:
>
>
>
> > It seems that it's because jQuery send a application/x-www-form-
> > urlencoded (cf. below)
>
> > =ERROR REPORT==== 12-Jan-2011::13:09:33 ===
> > Can't parse multipart if we find no multipart/form-data
> > =INFO REPORT==== 12-Jan-2011::13:09:33 ===
> > DEBUG: appmod_uce:122: Call presence_controller:add matching ["mms"]
> > with ["mms",
>
> > [{"nickname",
>
> > "mms"}]]
>
> > =ERROR REPORT==== 12-Jan-2011::13:09:33 ===
> > appmod_uce:133: Error: presence_controller:add: {undef,
>
> > [{crypto,rand_uniform,"0:"},
> >                                                    {utils,random,1},
> >                                                    {uce_presence,add,
> > 1},
>
> > {presence_controller,add,3},
>
> > {appmod_uce,call_handlers,4},
> >                                                    {yaws_server,
> >                                                     deliver_dyn_part,
> > 8},
> >                                                    {yaws_server,aloop,
> > 3},
>
> > {yaws_server,acceptor0,2}]}
>
> > =ERROR REPORT==== 12-Jan-2011::13:09:33 ===
> > Can't parse multipart if we find no multipart/form-data
>
> > On 12 jan, 12:54, Victor Goya<bebepho...@gmail.com>  wrote:
> >> On 01/12/2011 12:12 PM, CEA-SEPIA wrote:
>
> >>> I'm getting weird result from the new version. I change the call to
> >>> fit with your new prototypes.
>
> >>> If I register a new user I'm getting a 500 Internal server error, but
> >>> the user is well created since I can retrieve it with bin/ucectl user
> >>> list.
>
> >> We couldn't reproduce this error, can you please give us more
> >> informations ? Are there any errors in tmp/ucengine.log ?
>
> >> You need to allow the newly created user to add his presence:
>
> >> $ bin/ucectl acl add --uid 'mms' --org 'cea' --object 'presence'
> >> --action 'add'
>
> >> --
> >> Victor Goya
>
> Actually the error about multipart encoding is not really an error for
> us, we always try to parse the data as multipart before parsing the
> request body. We want to get rid of this useless error message but it is
> written by Yaws so we don't have a lot of control over it.
>
> The true error here is in the Erlang stacktrace : the
> crypto:random_uniform/2 function is undefined. It is very likely that
> there is a problem with your installation, especially if you have two
> versions of Erlang installed. Can you uninstall the older version of
> Erlang (including all the libraries in /usr/erlang/lib), install the
> newest version from souce, and try again ? If the libraries of the newer
> version are installed in /usr/local/lib/erlang/lib you should probably
> try to make a symbolic link between it and /usr/lib/erlang/lib.
>
> --
> Victor Goya

CEA-SEPIA

unread,
Jan 13, 2011, 2:52:22 PM1/13/11
to UCengine
For record:

On a other computer (the system configuration is exactly the same that
usual) I get this message at the launch by bin/ucectl run

$ bin/ucectl run
{error_logger,{{2011,1,13},{20,51,43}},"Can't set long node name!
\nPlease check your configuration\n",[]}
{error_logger,{{2011,1,13},{20,51,43}},crash_report,[[{initial_call,
{net_kernel,init,['Argument__1']}},{pid,<0.21.0>},{registered_name,[]},
{error_info,{exit,{error,badarg},[{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]}},{ancestors,
[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[<0.18.0>]},
{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},
{heap_size,987},{stack_size,24},{reductions,787}],[]]}
{error_logger,{{2011,1,13},{20,51,43}},supervisor_report,[{supervisor,
{local,net_sup}},{errorContext,start_error},{reason,
{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},
{mfargs,{net_kernel,start_link,[[ucengine,longnames]]}},
{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2011,1,13},{20,51,43}},supervisor_report,[{supervisor,
{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},
{offender,[{pid,undefined},{name,net_sup},{mfargs,
{erl_distribution,start_link,[]}},{restart_type,permanent},
{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2011,1,13},{20,51,43}},std_info,[{application,kernel},
{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid
terminated",application_controller,"{application_start_failure,kernel,
{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller)
({application_start_failure,kernel,{shutdown,{kernel,start,[normal,
[]]}}})
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages