1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
<!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ï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:
><i> reading the sources i have found that this crash i am trying to report
</I>><i> is intended behavior,
</I>><i> but
</I>><i> it happens in the middle of the SHUTDOWN procedure!
</I>><i>
</I>><i>
</I>><i> I tried to investigate how a relx's release shuts down
</I>><i> and i have found it is merely one call to: init:stop/0
</I>><i> nothing else.
</I>><i>
</I>><i> the manual says:
</I>><i>
</I>><i> stop() -> ok
</I>><i>
</I>><i> All applications are taken down smoothly, all code is unloaded, and all
</I>><i> ports are closed before the system terminates. If the -heart command
</I>><i> line flag was given, the heart program is terminated before the Erlang
</I>><i> node terminates.
</I>><i>
</I>><i> I end up totally clueless -- everything is rock solid yet it crashes.
</I>><i> maybe there is some clue in the sequence of shutting down applications?
</I>><i>
</I>><i> does anything controls/defines that sequence?
</I>><i>
</I>><i>
</I>><i>
</I>><i> On 01/19/2015 08:32 PM, <A HREF="https://lists.ninenines.eu/listinfo/extend">e at bestmx.net</A> wrote:
</I>>><i> Hello.
</I>>><i>
</I>>><i> i still have a problem with SSL.
</I>>><i> as soon as i change cowboy:start_http call to cowboy:start_https
</I>>><i> my release refuses to stop (when requested)
</I>>><i> and when i revert to "http" it starts and stops normally.
</I>>><i>
</I>>><i> i am sure it is the only difference: start_http vs. start_https
</I>>><i>
</I>>><i> i am using relx with default settings as it was provided by cowboy
</I>>><i> (Erlang R17, System: Debian "testing")
</I>>><i>
</I>>><i> here is my_app.erl:
</I>>><i>
</I>>><i> start(_Type, _Args) ->
</I>>><i> Dispatch =
</I>>><i> cowboy_router:compile([{'_', [{"/start", ws_handler, []}]}]),
</I>>><i>
</I>>><i> cowboy:start_https( https, 100, [ {port, 8765}
</I>>><i> , {cacertfile, ?Dir ++ "/ssl/cowboy-ca.crt"}
</I>>><i> , {certfile, ?Dir ++ "/ssl/server.crt"}
</I>>><i> , {keyfile, ?Dir ++ "/ssl/server.key"} ]
</I>>><i> , [{env, [{dispatch, Dispatch}]}]),
</I>>><i>
</I>>><i> online37_sup:start_link().
</I>>><i>
</I>>><i> stop(_State) -> ok.
</I>>><i>
</I>>><i>
</I>>><i> once i call:
</I>>><i> release/bin/my_release stop
</I>>><i>
</I>>><i> the erlang.log repeats hundreds of:
</I>>><i>
</I>>><i> =ERROR REPORT==== 19-Jan-2015::20:06:02 ===
</I>>><i> Error in process <0.234.0> on node '<A HREF="https://lists.ninenines.eu/listinfo/extend">online37 at 127.0.0.1</A>' with exit value:
</I>>><i> {{case_clause,{error,closed}},[{ranch_acceptor,loop,3,[{file,"src/ranch_acceptor.erl"},{line,28}]}]}
</I>>><i>
</I>>><i>
</I>>><i>
</I>>><i>
</I>>><i> what could it be?
</I>>><i> any misconfiguration of my system (regarding ssl support)?
</I>>><i> what exactly does ranch expect from me?
</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="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</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="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
</I>
--
Loï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>
|