--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/4234717f-e7d1-47dc-8ab0-0bd280e17d37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/8C72996D-76DE-472B-AF43-80BC4C6C747B%40gmail.com.
Here's the location stanzas I'm using with nginx in front of sync gateway. Hope it's helpful to someone.https://gist.github.com/nod/0e12567203e94e3646c1-j
CFNetwork SSLHandshake failed (-9847)
I'll post here as soon as I have a solution.
Andy
But right now I am facing a similar issue to you, SSL works great, Websockets work great, but Websockets over SSL results in the following errors in my Couchbase Lite client:CFNetwork SSLHandshake failed (-9847)
I'll post here as soon as I have a solution.
On Oct 27, 2014, at 12:32 AM, Marcus Roberts <marcus....@gmail.com> wrote:If I don't pass the Server header back, the app doesn't use web sockets and everything works fine.
I also should mention I've been considering doing ssl termination with
HAProxy in front of couchbase, nginx, etc.
Does anyone have any experience putting the sync gateway behind HAProxy?
FYI (in case I haven't mentioned it on this thread yet) you can explicitly disable WebSockets in Couchbase Lite/iOS by setting the CBLReplicator's customProperties to @{@"websocket": @NO}. This is a better workaround than not passing through the Server header, because it will let CBL use its other server-specific replication optimizations.
On Oct 27, 2014, at 7:00 AM, ajres <an...@couchbase.com> wrote:
But right now I am facing a similar issue to you, SSL works great, Websockets work great, but Websockets over SSL results in the following errors in my Couchbase Lite client:
CFNetwork SSLHandshake failed (-9847)
I'll post here as soon as I have a solution.
On Oct 27, 2014, at 9:13 AM, Marcus Roberts <marcus....@gmail.com> wrote:From my reading around there is a wss:// setting which I think means web-socket secure,
and I wonder if we need to be setting web sockets into a secure mode at a lower level (i.e. inside the lite lib) rather than just sending it over an SSL connection.
WebSocket-over-SSL should work just like regular HTTP, since it opens the connection in HTTP mode and then uses the Upgrade: header to negotiate a switch to the WebSocket protocol. This is supposed to be invisible to a proxy, if the proxy is just passing through the undecrypted SSL traffic to the server — the proxy doesn't even know there's WebSockets going on.So perhaps the issue here is that (I think) you're instead using nginx to do the SSL encryption itself? In that case nginx will need to manage the WebSocket protocol, open a WebSocket connection to SG, and relay messages back and forth. Maybe it needs special configuration to do that?
WebSocket-over-SSL should work just like regular HTTP, since it opens the connection in HTTP mode and then uses the Upgrade: header to negotiate a switch to the WebSocket protocol. This is supposed to be invisible to a proxy, if the proxy is just passing through the undecrypted SSL traffic to the server — the proxy doesn't even know there's WebSockets going on.
Scott,Do you have it running over https or http?I can get http to work fine, but not https. If you have a working https config you could share that would be really useful.
onPort: (UInt16)(url.port ?url.port.intValue : 80)
if (_tlsSettings || [url.scheme caseInsensitiveCompare: @"https"] == 0) {
On Oct 30, 2014, at 1:54 AM, Marcus Roberts <marcus....@gmail.com> wrote:In WebSocketClient, in _connect the code saysonPort: (UInt16)(url.port ?url.port.intValue : 80)
which I think is defaulting it to port 80 if a port isn't specified.