<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE> [99s-extend] Problems with Bullet
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Problems%20with%20Bullet&In-Reply-To=%3CA39F0108-E420-4FAB-A1A9-33C062509565%40gmail.com%3E">
<META NAME="robots" CONTENT="index,nofollow">
<style type="text/css">
pre {
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
}
</style>
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="000084.html">
<LINK REL="Next" HREF="000083.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[99s-extend] Problems with Bullet</H1>
<B>Lee Sylvester</B>
<A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Problems%20with%20Bullet&In-Reply-To=%3CA39F0108-E420-4FAB-A1A9-33C062509565%40gmail.com%3E"
TITLE="[99s-extend] Problems with Bullet">lee.sylvester at gmail.com
</A><BR>
<I>Mon Apr 8 16:21:53 CEST 2013</I>
<P><UL>
<LI>Previous message: <A HREF="000084.html">[99s-extend] Problems with Bullet
</A></li>
<LI>Next message: <A HREF="000083.html">[99s-extend] Problems with Bullet
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#85">[ date ]</a>
<a href="thread.html#85">[ thread ]</a>
<a href="subject.html#85">[ subject ]</a>
<a href="author.html#85">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Thanks guys, that was exactly the problem. I feel a little stupid :-) I use Rebar to compile my apps, but none of the three books I have on Erlang describe the config files in much detail. I probably have my entire setup wrong.
Anyhow, it looks to be working, now :-)
Thanks again,
Lee
On 8 Apr 2013, at 15:18, "Phillips, Christopher" <<A HREF="https://lists.ninenines.eu/listinfo/extend">Christopher.Phillips at turner.com</A>> wrote:
><i> *facepalm* Or that, yeah. Should have correlated the stack trace with
</I>><i> the error. Not used to seeing cowboy run as the app, not a dependency.
</I>><i>
</I>><i> On 4/8/13 10:08 AM, "Loïc Hoguin" <<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>> wrote:
</I>><i>
</I>>><i> Sounds like Bullet isn't in your path. Forgot -pa deps/*/ebin?
</I>>><i>
</I>>><i> On 04/08/2013 03:53 PM, Lee Sylvester wrote:
</I>>>><i> Hi all,
</I>>>><i>
</I>>>><i> I'm currently having problems getting a websocket to connect to a
</I>>>><i> simple bare bones Bullet handler. Unfortunately, I'm still quite an
</I>>>><i> Erlang noob, so the stack traces tend to lead me in circles. I'm hoping
</I>>>><i> this is obvious stuff to you Erlang pros :-)
</I>>>><i>
</I>>>><i> Given the below handler:
</I>>>><i>
</I>>>><i> init(_Transport, Req, _Opts, _Active) ->
</I>>>><i> {ok, Req, undefined_state}.
</I>>>><i>
</I>>>><i> stream(Data, Req, State) ->
</I>>>><i> {ok, Req, State}.
</I>>>><i>
</I>>>><i> info(Info, Req, State) ->
</I>>>><i> {reply, Info, Req, State}.
</I>>>><i>
</I>>>><i> terminate(_Req, _State) ->
</I>>>><i> ok.
</I>>>><i>
</I>>>><i> Connecting with a websocket throws the following error:
</I>>>><i>
</I>>>><i> =ERROR REPORT==== 8-Apr-2013::14:46:11 ===
</I>>>><i> ** Cowboy handler bullet_handler terminating in init/3
</I>>>><i> for the reason error:undef
</I>>>><i> ** Options were [{handler,connection_handler}]
</I>>>><i> ** Request was [{socket,#Port<0.926>},
</I>>>><i> {transport,ranch_tcp},
</I>>>><i> {connection,keepalive},
</I>>>><i> {pid,<0.491.0>},
</I>>>><i> {method,<<"GET">>},
</I>>>><i> {version,{1,1}},
</I>>>><i> {peer,{{127,0,0,1},56630}},
</I>>>><i> {host,<<"localhost">>},
</I>>>><i> {host_info,undefined},
</I>>>><i> {port,8080},
</I>>>><i> {path,<<"/">>},
</I>>>><i> {path_info,undefined},
</I>>>><i> {qs,<<"encoding=text">>},
</I>>>><i> {qs_vals,undefined},
</I>>>><i> {fragment,<<>>},
</I>>>><i> {bindings,[]},
</I>>>><i> {headers,[{<<"upgrade">>,<<"websocket">>},
</I>>>><i> {<<"connection">>,<<"Upgrade">>},
</I>>>><i> {<<"host">>,<<"localhost:8080">>},
</I>>>><i>
</I>>>><i> {<<"origin">>,<<"<A HREF="http://www.websocket.org">http://www.websocket.org</A>">>},
</I>>>><i> {<<"pragma">>,<<"no-cache">>},
</I>>>><i> {<<"cache-control">>,<<"no-cache">>},
</I>>>><i> {<<"sec-websocket-key">>,
</I>>>><i> <<"fEj/SOOcQgSKATOjhbNJBQ==">>},
</I>>>><i> {<<"sec-websocket-version">>,<<"13">>},
</I>>>><i> {<<"sec-websocket-extensions">>,
</I>>>><i> <<"x-webkit-deflate-frame">>}]},
</I>>>><i> {p_headers,[{<<"connection">>,[<<"upgrade">>]}]},
</I>>>><i> {cookies,undefined},
</I>>>><i> {meta,[]},
</I>>>><i> {body_state,waiting},
</I>>>><i> {multipart,undefined},
</I>>>><i> {buffer,<<>>},
</I>>>><i> {resp_compress,false},
</I>>>><i> {resp_state,waiting},
</I>>>><i> {resp_headers,[]},
</I>>>><i> {resp_body,<<>>},
</I>>>><i> {onresponse,undefined}]
</I>>>><i> ** Stacktrace: [{bullet_handler,init,
</I>>>><i> [{tcp,http},
</I>>>><i>
</I>>>><i> {http_req,#Port<0.926>,ranch_tcp,keepalive,<0.491.0>,
</I>>>><i> <<"GET">>,
</I>>>><i> {1,1},
</I>>>><i> {{127,0,0,1},56630},
</I>>>><i> <<"localhost">>,undefined,8080,<<"/">>,
</I>>>><i> undefined,<<"encoding=text">>,undefined,<<>>,
</I>>>><i> [],
</I>>>><i> [{<<"upgrade">>,<<"websocket">>},
</I>>>><i> {<<"connection">>,<<"Upgrade">>},
</I>>>><i> {<<"host">>,<<"localhost:8080">>},
</I>>>><i>
</I>>>><i> {<<"origin">>,<<"<A HREF="http://www.websocket.org">http://www.websocket.org</A>">>},
</I>>>><i> {<<"pragma">>,<<"no-cache">>},
</I>>>><i> {<<"cache-control">>,<<"no-cache">>},
</I>>>><i> {<<"sec-websocket-key">>,
</I>>>><i> <<"fEj/SOOcQgSKATOjhbNJBQ==">>},
</I>>>><i> {<<"sec-websocket-version">>,<<"13">>},
</I>>>><i> {<<"sec-websocket-extensions">>,
</I>>>><i> <<"x-webkit-deflate-frame">>}],
</I>>>><i> [{<<"connection">>,[<<"upgrade">>]}],
</I>>>><i>
</I>>>><i> undefined,[],waiting,undefined,<<>>,false,waiting,[],
</I>>>><i> <<>>,undefined},
</I>>>><i> [{handler,connection_handler}]],
</I>>>><i> []},
</I>>>><i> {cowboy_handler,handler_init,4,
</I>>>><i> [{file,"src/cowboy_handler.erl"},{line,69}]},
</I>>>><i> {cowboy_protocol,execute,4,
</I>>>><i> [{file,"src/cowboy_protocol.erl"},{line,514}]}]
</I>>>><i>
</I>>>><i> Can anyone see what might be throwing this off? I'd like to get a
</I>>>><i> minimal handler running before I attempt to add some logic.
</I>>>><i>
</I>>>><i> Thanks,
</I>>>><i> Lee
</I>>>><i> _______________________________________________
</I>>>><i> Extend mailing list
</I>>>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>>>><i> <A HREF="http://lists.ninenines.eu:81/listinfo/extend">http://lists.ninenines.eu:81/listinfo/extend</A>
</I>>>><i>
</I>>><i>
</I>>><i>
</I>>><i> --
</I>>><i> Loïc Hoguin
</I>>><i> Erlang Cowboy
</I>>><i> Nine Nines
</I>>><i> <A HREF="http://ninenines.eu">http://ninenines.eu</A>
</I>>><i> _______________________________________________
</I>>><i> Extend mailing list
</I>>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>>><i> <A HREF="http://lists.ninenines.eu:81/listinfo/extend">http://lists.ninenines.eu:81/listinfo/extend</A>
</I>>><i>
</I>><i>
</I>><i>
</I>><i> _______________________________________________
</I>><i> Extend mailing list
</I>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>><i> <A HREF="http://lists.ninenines.eu:81/listinfo/extend">http://lists.ninenines.eu:81/listinfo/extend</A>
</I>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="000084.html">[99s-extend] Problems with Bullet
</A></li>
<LI>Next message: <A HREF="000083.html">[99s-extend] Problems with Bullet
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#85">[ date ]</a>
<a href="thread.html#85">[ thread ]</a>
<a href="subject.html#85">[ subject ]</a>
<a href="author.html#85">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>