Re: Websocket tunnel broken with existing SSL session

2014-01-17 Thread Eiríkur Nilsson
On Fri, Jan 17, 2014 at 5:01 PM, Maxim Dounin wrote: > > > The problem is that read event was removed after ssl handshake, > and never added back - so new data on client connection were not > reported by the kernel. The ngx_handle_read_event() call ensures > that an appropriate event is added aga

Re: Websocket tunnel broken with existing SSL session

2014-01-17 Thread Maxim Dounin
Hello! On Fri, Jan 17, 2014 at 12:15:25PM +, Eiríkur Nilsson wrote: > Hey Maxim > > On Thu, Jan 16, 2014 at 10:01 PM, Maxim Dounin wrote: > > > > > > Please try the following patch: > > > Wow, everything seems to work correctly with this patch, session reuse and > everything. I thought th

Re: Websocket tunnel broken with existing SSL session

2014-01-17 Thread Eiríkur Nilsson
Hey Maxim On Thu, Jan 16, 2014 at 10:01 PM, Maxim Dounin wrote: > > > Please try the following patch: Wow, everything seems to work correctly with this patch, session reuse and everything. I thought this patch would close the new connection, causing a fresh reconnect, but I don't see that happe

Re: Websocket tunnel broken with existing SSL session

2014-01-16 Thread Maxim Dounin
Hello! On Wed, Jan 15, 2014 at 07:30:20PM +, Eiríkur Nilsson wrote: > Hey! > > On Wed, Jan 15, 2014 at 4:15 PM, Maxim Dounin wrote: > > > > > > It might be helpfull to see debug log and a tcpdump. See also > > http://wiki.nginx.org/Debugging for hints. > > > Debug log: http://cl.ly/142F2

Re: Websocket tunnel broken with existing SSL session

2014-01-15 Thread Eiríkur Nilsson
Hey! On Wed, Jan 15, 2014 at 4:15 PM, Maxim Dounin wrote: > > > It might be helpfull to see debug log and a tcpdump. See also > http://wiki.nginx.org/Debugging for hints. Debug log: http://cl.ly/142F2s2M0b2S tcpdump: http://cl.ly/2K3D2F1X0t0n (only contains traffic between iOS and nginx) This

Re: Websocket tunnel broken with existing SSL session

2014-01-15 Thread Maxim Dounin
Hello! On Wed, Jan 15, 2014 at 12:16:18PM +, Eiríkur Nilsson wrote: > Thanks for the suggestion. > > We're not specifying a event method currently, though I can't see if > eventport was the default. If I explicitly use /dev/poll, and turn > ssl_session_cache back on, the issue comes back. >

Re: Websocket tunnel broken with existing SSL session

2014-01-15 Thread Eiríkur Nilsson
Thanks for the suggestion. We're not specifying a event method currently, though I can't see if eventport was the default. If I explicitly use /dev/poll, and turn ssl_session_cache back on, the issue comes back. I have verified that both the HTTP request and response are proxied properly. It seem

Re: Websocket tunnel broken with existing SSL session

2014-01-14 Thread Maxim Dounin
Hello! On Tue, Jan 14, 2014 at 04:22:44PM +, Eiríkur Nilsson wrote: > We've been debugging this issue for 3 days now and even though we have a > temporary fix, we're still puzzled about it. > > There is an iOS app, which opens a websocket connection to our server over > SSL. Our server runs

Websocket tunnel broken with existing SSL session

2014-01-14 Thread Eiríkur Nilsson
We've been debugging this issue for 3 days now and even though we have a temporary fix, we're still puzzled about it. There is an iOS app, which opens a websocket connection to our server over SSL. Our server runs SmartOS and has nginx 1.5.0 (also happens on 1.4.1) proxying to a backend server run