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

supervisor using default config fails. #2

Open
bciceron opened this issue Mar 21, 2012 · 1 comment
Open

supervisor using default config fails. #2

bciceron opened this issue Mar 21, 2012 · 1 comment

Comments

@bciceron
Copy link

using the master branch with the default config fails.
i confirmed i was able to connect to the same IP+port and query the redis server.

it build ok but a simple run as well as eunit fail:

$ make
==> eredis (clean)
==> poolboy (clean)
==> edown (clean)
==> eredis_pool (clean)
==> eredis (compile)
Compiled src/eredis.erl
Compiled src/eredis_client.erl
Compiled src/eredis_sub_client.erl
Compiled src/basho_bench_driver_erldis.erl
Compiled src/eredis_sub.erl
Compiled src/basho_bench_driver_eredis.erl
Compiled src/eredis_parser.erl
==> poolboy (compile)
Compiled src/poolboy_sup.erl
Compiled src/poolboy.erl
==> edown (compile)
Compiled src/edown_make.erl
Compiled src/edown_lib.erl
Compiled src/edown_xmerl.erl
Compiled src/edown_doclet.erl
Compiled src/edown_layout.erl
==> eredis_pool (compile)
Compiled src/eredis_pool_app.erl
Compiled src/eredis_pool.erl
Compiled src/eredis_pool_sup.erl
==> eredis_pool (xref)

$ erl -boot start_sasl -pa ebin/
Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:16:16] [rq:16] [async-threads:0] [kernel-poll:false]

=PROGRESS REPORT==== 21-Mar-2012::18:28:17 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.35.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 21-Mar-2012::18:28:17 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.36.0>},
{name,overload},
{mfargs,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 21-Mar-2012::18:28:17 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.34.0>},
{name,sasl_safe_sup},
{mfargs,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]

=PROGRESS REPORT==== 21-Mar-2012::18:28:17 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.37.0>},
{name,release_handler},
{mfargs,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]

=PROGRESS REPORT==== 21-Mar-2012::18:28:17 ===
application: sasl
started_at: nonode@nohost
Eshell V5.8.5 (abort with ^G)
1> eredis_pool:start().

=SUPERVISOR REPORT==== 21-Mar-2012::18:28:30 ===
Supervisor: {local,eredis_pool_sup}
Context: start_error
Reason: {'EXIT',
{undef,
[{poolboy,start_link,
[[{name,{global,dbsrv}},
{worker_module,eredis},
{size,10},
{max_overflow,30},
{host,"10.10.0.141"},
{port,6379}]]},
{supervisor,do_start_child,2},
{supervisor,start_children,3},
{supervisor,init_children,2},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]}}
Offender: [{pid,undefined},
{name,dbsrv},
{mfargs,{poolboy,start_link,
[[{name,{global,dbsrv}},
{worker_module,eredis},
{size,10},
{max_overflow,30},
{host,"10.10.0.141"},
{port,6379}]]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]

=INFO REPORT==== 21-Mar-2012::18:28:30 ===
application: eredis_pool
exited: {shutdown,{eredis_pool_app,start,[normal,[]]}}
type: temporary
{error,{shutdown,{eredis_pool_app,start,[normal,[]]}}}
2>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
a

$ make check
==> eredis_pool (eunit)
Compiled src/eredis_pool.erl
Compiled src/eredis_pool_sup.erl
Compiled test/eredis_pool_tests.erl
Compiled src/eredis_pool_app.erl

=ERROR REPORT==== 21-Mar-2012::18:29:25 ===
** Generic server <0.109.0> terminating
** Last message in was {'EXIT',<0.108.0>,
{{badmatch,
{error,
{'EXIT',
{function_clause,
[{string,tokens1,[false,":/@",[]]},
{eredis,parse_redistogo_uri,0},
{eredis,start_link,1},
{supervisor,do_start_child_i,3},
{supervisor,handle_call,3},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}}}},
[{poolboy,new_worker,2},
{poolboy,prepopulate,4},
{poolboy,init,2},
{gen_fsm,init_it,6},
{proc_lib,init_p_do_apply,3}]}}
*
When Server state == {state,
{<0.109.0>,poolboy_sup},
simple_one_for_one,
[{child,undefined,eredis,
{eredis,start_link,
[[{size,10},
{max_overflow,30},
{host,"10.10.0.141"},
{port,6379}]]},
temporary,brutal_kill,worker,
[eredis]}],
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
0,1,[],poolboy_sup,
{eredis,
[{size,10},
{max_overflow,30},
{host,"10.10.0.141"},
{port,6379}]}}
** Reason for termination ==
* {{badmatch,
{error,
{'EXIT',
{function_clause,
[{string,tokens1,[false,":/
@",[]]},
{eredis,parse_redistogo_uri,0},
{eredis,start_link,1},
{supervisor,do_start_child_i,3},
{supervisor,handle_call,3},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}}}},
[{poolboy,new_worker,2},
{poolboy,prepopulate,4},
{poolboy,init,2},
{gen_fsm,init_it,6},
{proc_lib,init_p_do_apply,3}]}

=INFO REPORT==== 21-Mar-2012::18:29:25 ===
application: eredis_pool
exited: {shutdown,{eredis_pool_app,start,[normal,[]]}}
type: temporary
eredis_pool_tests: basic_test_ (get and set)...failed
::exit:{noproc,{gen_fsm,sync_send_event,
[{global,dbsrv},{checkout,true,5000},5000]}}
in function gen_fsm:sync_send_event/3
in call from eredis_pool:q/3
in call from eredis_pool_tests:'-basic_test_/0-fun-2-'/0
in call from eredis_pool_tests:'-basic_test_/0-fun-6-'/0

eredis_pool_tests: basic_test_ (delete test)...failed
::exit:{noproc,{gen_fsm,sync_send_event,
[{global,dbsrv},{checkout,true,5000},5000]}}
in function gen_fsm:sync_send_event/3
in call from eredis_pool:q/3
in call from eredis_pool_tests:'-basic_test_/0-fun-7-'/0
in call from eredis_pool_tests:'-basic_test_/0-fun-11-'/0

eredis_pool_tests: basic_test_ (mset and mget)...failed
::exit:{noproc,{gen_fsm,sync_send_event,
[{global,dbsrv},{checkout,true,5000},5000]}}
in function gen_fsm:sync_send_event/3
in call from eredis_pool:q/3
in call from eredis_pool_tests:'-basic_test_/0-fun-12-'/1
in call from eredis_pool_tests:'-basic_test_/0-fun-16-'/0

eredis_pool_tests: basic_test_ (new pool create and delete)...failed
::exit:{noproc,
{gen_server,call,
[eredis_pool_sup,
{start_child,
{pool1,
{poolboy,start_link,
[[{name,{global,...}},
{worker_module,eredis},
{size,...},
{...}]]},
permanent,5000,worker,
[poolboy,eredis]}},
infinity]}}
in function gen_server:call/3
in call from eredis_pool_tests:'-basic_test_/0-fun-17-'/0
in call from eredis_pool_tests:'-basic_test_/0-fun-23-'/0

Failed: 4. Skipped: 0. Passed: 0.
Cover analysis: /home/dirt/eredis_pool/.eunit/index.html
ERROR: One or more eunit tests failed.
make: *** [check] Error 1

@hiroeorz
Copy link
Owner

I separated config for test to "test.config".
Please check #3

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