helpshift / kafboy

A low latency HTTP server for writing to Kafka

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors on startup

gavinmcnair opened this issue · comments

When i try and fire up the kafboy demo i am getting the error

bash> erl -pa deps/*/ebin -pa ebin -s kafboy_demo
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false]

Eshell V7.1 (abort with ^G)
1>
1 => stopped:{error,not_found} started:{ok,<0.53.0>}

On the first attempted request i get the error

=ERROR REPORT==== 9-Oct-2015::16:02:27 ===
Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.183.0> exit with reason: {cowboy_handler,[{class,error},{reason,undef},{mfa,{kafboy_http_handler,init,2}},{stacktrace,[{kafboy_http_handler,init,[{http_req,#Port<0.2386>,ranch_tcp,keepalive,<0.183.0>,<<"POST">>,'HTTP/1.1',{{127,0,0,1},34492},<<"localhost">>,undefined,9903,<<"/batch/async/ekaf">>,undefined,<<>>,[{topic,<<"ekaf">>}],[{<<"user-agent">>,<<"curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3">>},{<<"host">>,<<"localhost:9903">>},{<<"accept">>,<<"/">>},{<<"content-length">>,<<"7">>},{<<"content-type">>,<<"application/x-www-form-urlencoded">>}],[],waiting,<<"hello=a">>,undefined,false,waiting,[],<<>>,undefined},{kafboy_http,0,false,true,false,undefined,{kafboy_demo,massage_json},undefined}],[]},{cowboy_handler,execute,2,[{file,"src/cowboy_handler.erl"},{line,41}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,470}]}]},{req,[{socket,#Port<0.2386>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.183.0>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{127,0,0,1},34492}},{host,<<"localhost">>},{host_info,undefined},{port,9903},{path,<<"/batch/async/ekaf">>},{path_info,undefined},{qs,<<>>},{bindings,[{topic,<<"ekaf">>}]},{headers,[{<<"user-agent">>,<<"curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3">>},{<<"host">>,<<"localhost:9903">>},{<<"accept">>,<<"/">>},{<<"content-length">>,<<"7">>},{<<"content-type">>,<<"application/x-www-form-urlencoded">>}]},{meta,[]},{body_state,waiting},{buffer,<<"hello=a">>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[]},{resp_body,<<>>},{onresponse,undefined}]},{opts,{kafboy_http,0,false,true,false,undefined,{kafboy_demo,massage_json},undefined}}]}

I am fairly new to erlang so apologies if the reason for this problem should be obvious.

Thanks