summaryrefslogblamecommitdiffstats
path: root/archives/extend/2013-April/000085.html
blob: 7d46c8449c7cfb4c45a4a6e24b4f9625250d190a (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=%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, &quot;Phillips, Christopher&quot; &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">Christopher.Phillips at turner.com</A>&gt; wrote:

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

</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>