summaryrefslogblamecommitdiffstats
path: root/archives/extend/2013-April/000082.html
blob: 6c776c4470e4747f946e1a5964eb2b631981a4df (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=%3C5162CF5F.2060200%40ninenines.eu%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="000081.html">
   <LINK REL="Next"  HREF="000084.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[99s-extend] Problems with Bullet</H1>
    <B>Lo&#239;c Hoguin</B> 
    <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Problems%20with%20Bullet&In-Reply-To=%3C5162CF5F.2060200%40ninenines.eu%3E"
       TITLE="[99s-extend] Problems with Bullet">essen at ninenines.eu
       </A><BR>
    <I>Mon Apr  8 16:08:31 CEST 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="000081.html">[99s-extend] Problems with Bullet
</A></li>
        <LI>Next message: <A HREF="000084.html">[99s-extend] Problems with Bullet
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#82">[ date ]</a>
              <a href="thread.html#82">[ thread ]</a>
              <a href="subject.html#82">[ subject ]</a>
              <a href="author.html#82">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Sounds like Bullet isn't in your path. Forgot -pa deps/*/ebin?

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

-- 
Lo&#239;c Hoguin
Erlang Cowboy
Nine Nines
<A HREF="http://ninenines.eu">http://ninenines.eu</A>

</PRE>

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

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