summaryrefslogblamecommitdiffstats
path: root/archives/extend/2013-April/000084.html
blob: 36ba2a5194f510500a00bb6d2e1b07f80635fdb9 (plain) (tree)































































































































































































                                                                                                                                                                                              
<!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=%3CCD8849A5.4807%25christopher.phillips%40turner.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="000082.html">
   <LINK REL="Next"  HREF="000085.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[99s-extend] Problems with Bullet</H1>
    <B>Phillips, Christopher</B> 
    <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Problems%20with%20Bullet&In-Reply-To=%3CCD8849A5.4807%25christopher.phillips%40turner.com%3E"
       TITLE="[99s-extend] Problems with Bullet">Christopher.Phillips at turner.com
       </A><BR>
    <I>Mon Apr  8 16:18:27 CEST 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="000082.html">[99s-extend] Problems with Bullet
</A></li>
        <LI>Next message: <A HREF="000085.html">[99s-extend] Problems with Bullet
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#84">[ date ]</a>
              <a href="thread.html#84">[ thread ]</a>
              <a href="subject.html#84">[ subject ]</a>
              <a href="author.html#84">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>  *facepalm* Or that, yeah. Should have correlated the stack trace with
the error. Not used to seeing cowboy run as the app, not a dependency.

On 4/8/13 10:08 AM, &quot;Lo&#239;c Hoguin&quot; &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>&gt; wrote:

&gt;<i>Sounds like Bullet isn't in your path. Forgot -pa deps/*/ebin?
</I>&gt;<i>
</I>&gt;<i>On 04/08/2013 03:53 PM, Lee Sylvester wrote:
</I>&gt;&gt;<i> Hi all,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I'm currently having problems getting a websocket to connect to a
</I>&gt;&gt;<i>simple bare bones Bullet handler.  Unfortunately, I'm still quite an
</I>&gt;&gt;<i>Erlang noob, so the stack traces tend to lead me in circles.  I'm hoping
</I>&gt;&gt;<i>this is obvious stuff to you Erlang pros :-)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Given the below handler:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> init(_Transport, Req, _Opts, _Active) -&gt;
</I>&gt;&gt;<i> 	{ok, Req, undefined_state}.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> stream(Data, Req, State) -&gt;
</I>&gt;&gt;<i> 	{ok, Req, State}.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> info(Info, Req, State) -&gt;
</I>&gt;&gt;<i> 	{reply, Info, Req, State}.
</I>&gt;&gt;<i> 	
</I>&gt;&gt;<i> terminate(_Req, _State) -&gt;
</I>&gt;&gt;<i> 	ok.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Connecting with a websocket throws the following error:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> =ERROR REPORT==== 8-Apr-2013::14:46:11 ===
</I>&gt;&gt;<i> ** Cowboy handler bullet_handler terminating in init/3
</I>&gt;&gt;<i>     for the reason error:undef
</I>&gt;&gt;<i> ** Options were [{handler,connection_handler}]
</I>&gt;&gt;<i> ** Request was [{socket,#Port&lt;0.926&gt;},
</I>&gt;&gt;<i>                  {transport,ranch_tcp},
</I>&gt;&gt;<i>                  {connection,keepalive},
</I>&gt;&gt;<i>                  {pid,&lt;0.491.0&gt;},
</I>&gt;&gt;<i>                  {method,&lt;&lt;&quot;GET&quot;&gt;&gt;},
</I>&gt;&gt;<i>                  {version,{1,1}},
</I>&gt;&gt;<i>                  {peer,{{127,0,0,1},56630}},
</I>&gt;&gt;<i>                  {host,&lt;&lt;&quot;localhost&quot;&gt;&gt;},
</I>&gt;&gt;<i>                  {host_info,undefined},
</I>&gt;&gt;<i>                  {port,8080},
</I>&gt;&gt;<i>                  {path,&lt;&lt;&quot;/&quot;&gt;&gt;},
</I>&gt;&gt;<i>                  {path_info,undefined},
</I>&gt;&gt;<i>                  {qs,&lt;&lt;&quot;encoding=text&quot;&gt;&gt;},
</I>&gt;&gt;<i>                  {qs_vals,undefined},
</I>&gt;&gt;<i>                  {fragment,&lt;&lt;&gt;&gt;},
</I>&gt;&gt;<i>                  {bindings,[]},
</I>&gt;&gt;<i>                  {headers,[{&lt;&lt;&quot;upgrade&quot;&gt;&gt;,&lt;&lt;&quot;websocket&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;connection&quot;&gt;&gt;,&lt;&lt;&quot;Upgrade&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;host&quot;&gt;&gt;,&lt;&lt;&quot;localhost:8080&quot;&gt;&gt;},
</I>&gt;&gt;<i>                 
</I>&gt;&gt;<i>{&lt;&lt;&quot;origin&quot;&gt;&gt;,&lt;&lt;&quot;<A HREF="http://www.websocket.org">http://www.websocket.org</A>&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;pragma&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;cache-control&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;sec-websocket-key&quot;&gt;&gt;,
</I>&gt;&gt;<i>                             &lt;&lt;&quot;fEj/SOOcQgSKATOjhbNJBQ==&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;sec-websocket-version&quot;&gt;&gt;,&lt;&lt;&quot;13&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;sec-websocket-extensions&quot;&gt;&gt;,
</I>&gt;&gt;<i>                             &lt;&lt;&quot;x-webkit-deflate-frame&quot;&gt;&gt;}]},
</I>&gt;&gt;<i>                  {p_headers,[{&lt;&lt;&quot;connection&quot;&gt;&gt;,[&lt;&lt;&quot;upgrade&quot;&gt;&gt;]}]},
</I>&gt;&gt;<i>                  {cookies,undefined},
</I>&gt;&gt;<i>                  {meta,[]},
</I>&gt;&gt;<i>                  {body_state,waiting},
</I>&gt;&gt;<i>                  {multipart,undefined},
</I>&gt;&gt;<i>                  {buffer,&lt;&lt;&gt;&gt;},
</I>&gt;&gt;<i>                  {resp_compress,false},
</I>&gt;&gt;<i>                  {resp_state,waiting},
</I>&gt;&gt;<i>                  {resp_headers,[]},
</I>&gt;&gt;<i>                  {resp_body,&lt;&lt;&gt;&gt;},
</I>&gt;&gt;<i>                  {onresponse,undefined}]
</I>&gt;&gt;<i> ** Stacktrace: [{bullet_handler,init,
</I>&gt;&gt;<i>                      [{tcp,http},
</I>&gt;&gt;<i>                 
</I>&gt;&gt;<i>{http_req,#Port&lt;0.926&gt;,ranch_tcp,keepalive,&lt;0.491.0&gt;,
</I>&gt;&gt;<i>                           &lt;&lt;&quot;GET&quot;&gt;&gt;,
</I>&gt;&gt;<i>                           {1,1},
</I>&gt;&gt;<i>                           {{127,0,0,1},56630},
</I>&gt;&gt;<i>                           &lt;&lt;&quot;localhost&quot;&gt;&gt;,undefined,8080,&lt;&lt;&quot;/&quot;&gt;&gt;,
</I>&gt;&gt;<i>                           undefined,&lt;&lt;&quot;encoding=text&quot;&gt;&gt;,undefined,&lt;&lt;&gt;&gt;,
</I>&gt;&gt;<i>                           [],
</I>&gt;&gt;<i>                           [{&lt;&lt;&quot;upgrade&quot;&gt;&gt;,&lt;&lt;&quot;websocket&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;connection&quot;&gt;&gt;,&lt;&lt;&quot;Upgrade&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;host&quot;&gt;&gt;,&lt;&lt;&quot;localhost:8080&quot;&gt;&gt;},
</I>&gt;&gt;<i>                 
</I>&gt;&gt;<i>{&lt;&lt;&quot;origin&quot;&gt;&gt;,&lt;&lt;&quot;<A HREF="http://www.websocket.org">http://www.websocket.org</A>&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;pragma&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;cache-control&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;sec-websocket-key&quot;&gt;&gt;,
</I>&gt;&gt;<i>                             &lt;&lt;&quot;fEj/SOOcQgSKATOjhbNJBQ==&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;sec-websocket-version&quot;&gt;&gt;,&lt;&lt;&quot;13&quot;&gt;&gt;},
</I>&gt;&gt;<i>                            {&lt;&lt;&quot;sec-websocket-extensions&quot;&gt;&gt;,
</I>&gt;&gt;<i>                             &lt;&lt;&quot;x-webkit-deflate-frame&quot;&gt;&gt;}],
</I>&gt;&gt;<i>                           [{&lt;&lt;&quot;connection&quot;&gt;&gt;,[&lt;&lt;&quot;upgrade&quot;&gt;&gt;]}],
</I>&gt;&gt;<i>                 
</I>&gt;&gt;<i>undefined,[],waiting,undefined,&lt;&lt;&gt;&gt;,false,waiting,[],
</I>&gt;&gt;<i>                           &lt;&lt;&gt;&gt;,undefined},
</I>&gt;&gt;<i>                       [{handler,connection_handler}]],
</I>&gt;&gt;<i>                      []},
</I>&gt;&gt;<i>                  {cowboy_handler,handler_init,4,
</I>&gt;&gt;<i>                      [{file,&quot;src/cowboy_handler.erl&quot;},{line,69}]},
</I>&gt;&gt;<i>                  {cowboy_protocol,execute,4,
</I>&gt;&gt;<i>                      [{file,&quot;src/cowboy_protocol.erl&quot;},{line,514}]}]
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Can anyone see what might be throwing this off?  I'd like to get a
</I>&gt;&gt;<i>minimal handler running before I attempt to add some logic.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks,
</I>&gt;&gt;<i> Lee
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> Extend mailing list
</I>&gt;&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>&gt;&gt;<i> <A HREF="http://lists.ninenines.eu:81/listinfo/extend">http://lists.ninenines.eu:81/listinfo/extend</A>
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>-- 
</I>&gt;<i>Lo&#239;c Hoguin
</I>&gt;<i>Erlang Cowboy
</I>&gt;<i>Nine Nines
</I>&gt;<i><A HREF="http://ninenines.eu">http://ninenines.eu</A>
</I>&gt;<i>_______________________________________________
</I>&gt;<i>Extend mailing list
</I>&gt;<i><A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>&gt;<i><A HREF="http://lists.ninenines.eu:81/listinfo/extend">http://lists.ninenines.eu:81/listinfo/extend</A>
</I>&gt;<i>
</I>


</PRE>

<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000082.html">[99s-extend] Problems with Bullet
</A></li>
	<LI>Next message: <A HREF="000085.html">[99s-extend] Problems with Bullet
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#84">[ date ]</a>
              <a href="thread.html#84">[ thread ]</a>
              <a href="subject.html#84">[ subject ]</a>
              <a href="author.html#84">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>