summaryrefslogblamecommitdiffstats
path: root/_build/static/archives/extend/2015-January/000499.html
blob: 36cc0ebc157e20b693543c8239c40907dfa6d055 (plain) (tree)
























































































































































                                                                                                                                                                      
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [99s-extend] Cowboy + SSL
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Cowboy%20%2B%20SSL&In-Reply-To=%3C54C6170E.6030709%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="000495.html">
   <LINK REL="Next"  HREF="000500.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[99s-extend] Cowboy + SSL</H1>
    <B>Lo&#239;c Hoguin</B> 
    <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Cowboy%20%2B%20SSL&In-Reply-To=%3C54C6170E.6030709%40ninenines.eu%3E"
       TITLE="[99s-extend] Cowboy + SSL">essen at ninenines.eu
       </A><BR>
    <I>Mon Jan 26 11:29:34 CET 2015</I>
    <P><UL>
        <LI>Previous message: <A HREF="000495.html">[99s-extend] Cowboy + SSL
</A></li>
        <LI>Next message: <A HREF="000500.html">[99s-extend] Cowboy + SSL
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#499">[ date ]</a>
              <a href="thread.html#499">[ thread ]</a>
              <a href="subject.html#499">[ subject ]</a>
              <a href="author.html#499">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hey, this is a known issue with recent Erlang versions: 
<A HREF="https://github.com/ninenines/ranch/issues/90">https://github.com/ninenines/ranch/issues/90</A>

I don't have a good fix for it other than requiring ssl for using 
Cowboy/Ranch. I probably will.

On 01/21/2015 07:28 PM, <A HREF="https://lists.ninenines.eu/listinfo/extend">e at bestmx.net</A> wrote:
&gt;<i> reading the sources i have found that this crash i am trying to report
</I>&gt;<i> is intended behavior,
</I>&gt;<i> but
</I>&gt;<i> it happens in the middle of the SHUTDOWN procedure!
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> I tried to investigate how a relx's release shuts down
</I>&gt;<i> and i have found it is merely one call to: init:stop/0
</I>&gt;<i> nothing else.
</I>&gt;<i>
</I>&gt;<i> the manual says:
</I>&gt;<i>
</I>&gt;<i> stop() -&gt; ok
</I>&gt;<i>
</I>&gt;<i> All applications are taken down smoothly, all code is unloaded, and all
</I>&gt;<i> ports are closed before the system terminates. If the -heart command
</I>&gt;<i> line flag was given, the heart program is terminated before the Erlang
</I>&gt;<i> node terminates.
</I>&gt;<i>
</I>&gt;<i> I end up totally clueless -- everything is rock solid yet it crashes.
</I>&gt;<i> maybe there is some clue in the sequence of shutting down applications?
</I>&gt;<i>
</I>&gt;<i> does anything controls/defines that sequence?
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On 01/19/2015 08:32 PM, <A HREF="https://lists.ninenines.eu/listinfo/extend">e at bestmx.net</A> wrote:
</I>&gt;&gt;<i> Hello.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> i still have a problem with SSL.
</I>&gt;&gt;<i> as soon as i change cowboy:start_http call to cowboy:start_https
</I>&gt;&gt;<i> my release refuses to stop (when requested)
</I>&gt;&gt;<i> and when i revert to &quot;http&quot; it starts and stops normally.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> i am sure it is the only difference: start_http vs. start_https
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> i am using relx with default settings as it was provided by cowboy
</I>&gt;&gt;<i> (Erlang R17, System: Debian &quot;testing&quot;)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> here is my_app.erl:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> start(_Type, _Args) -&gt;
</I>&gt;&gt;<i>    Dispatch =
</I>&gt;&gt;<i>    cowboy_router:compile([{'_', [{&quot;/start&quot;, ws_handler, []}]}]),
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>    cowboy:start_https( https, 100, [ {port, 8765}
</I>&gt;&gt;<i>    , {cacertfile, ?Dir ++ &quot;/ssl/cowboy-ca.crt&quot;}
</I>&gt;&gt;<i>    , {certfile, ?Dir ++ &quot;/ssl/server.crt&quot;}
</I>&gt;&gt;<i>    , {keyfile, ?Dir ++ &quot;/ssl/server.key&quot;} ]
</I>&gt;&gt;<i>    , [{env, [{dispatch, Dispatch}]}]),
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>    online37_sup:start_link().
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> stop(_State) -&gt; ok.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> once i call:
</I>&gt;&gt;<i> release/bin/my_release stop
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> the erlang.log repeats hundreds of:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> =ERROR REPORT==== 19-Jan-2015::20:06:02 ===
</I>&gt;&gt;<i> Error in process &lt;0.234.0&gt; on node '<A HREF="https://lists.ninenines.eu/listinfo/extend">online37 at 127.0.0.1</A>' with exit value:
</I>&gt;&gt;<i> {{case_clause,{error,closed}},[{ranch_acceptor,loop,3,[{file,&quot;src/ranch_acceptor.erl&quot;},{line,28}]}]}
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> what could it be?
</I>&gt;&gt;<i> any misconfiguration of my system (regarding ssl support)?
</I>&gt;&gt;<i> what exactly does ranch expect from me?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</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="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</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="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
</I>
-- 
Lo&#239;c Hoguin
<A HREF="http://ninenines.eu">http://ninenines.eu</A>
</PRE>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000495.html">[99s-extend] Cowboy + SSL
</A></li>
	<LI>Next message: <A HREF="000500.html">[99s-extend] Cowboy + SSL
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#499">[ date ]</a>
              <a href="thread.html#499">[ thread ]</a>
              <a href="subject.html#499">[ subject ]</a>
              <a href="author.html#499">[ author ]</a>
         </LI>
       </UL>

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