Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] WebSocket network error: The operation couldn't be completed. (OSStatus error -9807.

Hi Jon,

I think I've found what the problem is likely to be. libwebsockets
doesn't configure ECDHE parameters for its server sockets. If you feel
like recompiling libwebsockets you could test out the patched lib in
my ssl-dh branch at
https://github.com/ralight/libwebsockets/tree/ssl-dh - if that works,
I'll submit it as a pull request to libwebsockets.

Cheers,

Roger


On Fri, Oct 2, 2015 at 5:42 PM, Jon Mansey <jon@xxxxxxxxxx> wrote:
> Thanks Roger, this is the log of when the iPhone Safari tries and fails to connect
>
> Oct  2 16:35:41 dev mosquitto[1247]: insert_wsi_socket_into_fds: wsi=0x1441130, sock=17, fds pos=2
> Oct  2 16:35:41 dev mosquitto[1247]: inserted SSL accept into fds, trying SSL_accept
> Oct  2 16:35:41 dev mosquitto[1247]: SSL_accept failed 2 / error:00000002:lib(0):func(0):system lib
> Oct  2 16:35:41 dev mosquitto[1247]: SSL_ERROR_WANT_READ
> Oct  2 16:35:41 dev mosquitto[1247]: SSL_accept failed 5 / error:00000005:lib(0):func(0):DH lib
> Oct  2 16:35:41 dev mosquitto[1247]: SSL_accept failed skt 17: error:00000005:lib(0):func(0):DH lib
> Oct  2 16:35:41 dev mosquitto[1247]: close: just_kill_connection
> Oct  2 16:35:41 dev mosquitto[1247]: remove_wsi_socket_from_fds: wsi=0x1441130, sock=17, fds pos=2
> Oct  2 16:35:41 dev mosquitto[1247]: not calling back closed
> Oct  2 16:35:42 dev mosquitto[1247]: insert_wsi_socket_into_fds: wsi=0x1441130, sock=17, fds pos=2
> Oct  2 16:35:42 dev mosquitto[1247]: inserted SSL accept into fds, trying SSL_accept
> Oct  2 16:35:42 dev mosquitto[1247]: SSL_accept failed 2 / error:00000002:lib(0):func(0):system lib
> Oct  2 16:35:42 dev mosquitto[1247]: SSL_ERROR_WANT_READ
> Oct  2 16:35:42 dev mosquitto[1247]: SSL_accept failed 2 / error:00000002:lib(0):func(0):system lib
> Oct  2 16:35:42 dev mosquitto[1247]: SSL_ERROR_WANT_READ
> Oct  2 16:35:42 dev mosquitto[1247]: SSL_accept failed 5 / error:00000005:lib(0):func(0):DH lib
> Oct  2 16:35:42 dev mosquitto[1247]: SSL_accept failed skt 17: error:00000005:lib(0):func(0):DH lib
> Oct  2 16:35:42 dev mosquitto[1247]: close: just_kill_connection
> Oct  2 16:35:42 dev mosquitto[1247]: remove_wsi_socket_from_fds: wsi=0x1441130, sock=17, fds pos=2
> Oct  2 16:35:42 dev mosquitto[1247]: not calling back closed
>
> comparing this with a successful connection from Chrome on OS X
>
> Oct  2 16:33:30 dev mosquitto[1247]: insert_wsi_socket_into_fds: wsi=0x1430190, sock=16, fds pos=1
> Oct  2 16:33:30 dev mosquitto[1247]: inserted SSL accept into fds, trying SSL_accept
> Oct  2 16:33:30 dev mosquitto[1247]: SSL_accept failed 2 / error:00000002:lib(0):func(0):system lib
> Oct  2 16:33:30 dev mosquitto[1247]: SSL_ERROR_WANT_READ
> Oct  2 16:33:30 dev mosquitto[1247]: accepted new SSL conn
> Oct  2 16:33:30 dev mosquitto[1247]: issuing 547 bytes to parser
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOKEN_NAME_PART 'G'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOKEN_NAME_PART 'E'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOKEN_NAME_PART 'T'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOKEN_NAME_PART ' '
> Oct  2 16:33:30 dev mosquitto[1247]: known hdr 'GET '
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOK_(0) '/'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOK_(0) 'm'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOK_(0) 'q'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOK_(0) 't'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOK_(0) 't'
> Oct  2 16:33:30 dev mosquitto[1247]: WSI_TOK_(0) ‘ '
> etc etc
>
> i see its failing in DH lib. How do we dig deeper into whats causing it to fail please?
>
> Jon
>
>
>> On Oct 2, 2015, at 9:00 AM, mosquitto-dev-request@xxxxxxxxxxx wrote:
>>
>> Send mosquitto-dev mailing list submissions to
>>       mosquitto-dev@xxxxxxxxxxx
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>       https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
>> or, via email, send a message with subject or body 'help' to
>>       mosquitto-dev-request@xxxxxxxxxxx
>>
>> You can reach the person managing the list at
>>       mosquitto-dev-owner@xxxxxxxxxxx
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of mosquitto-dev digest..."
>>
>>
>> Today's Topics:
>>
>>   1. WebSocket network error: The operation couldn't be       completed.
>>      (OSStatus error -9807.) (Jon Mansey)
>>   2. Re: WebSocket network error: The operation couldn't be
>>      completed. (OSStatus error -9807.) (Roger Light)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 1 Oct 2015 17:00:51 -0700
>> From: Jon Mansey <jon@xxxxxxxxxx>
>> To: mosquitto-dev@xxxxxxxxxxx
>> Subject: [mosquitto-dev] WebSocket network error: The operation
>>       couldn't be     completed. (OSStatus error -9807.)
>> Message-ID: <13C6469A-5C5F-4662-AFBA-BF711D4F02EA@xxxxxxxxxx>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi Im using mqttws31.js in an App created with NSBasic Appstudio. The app connects to a mosquito 1.4.3 broker using secure websockets on port 9002 just fine from Safari on OS X, and Chrome, but when I connect from Safari or the web app on iOS9 mobile devices, I get the -9807 error code as in the subject line and mqtt doesn't connect. I have full debug enabled and it doesn?t even show the connection attempt. Any help in expanding logging on the server or client to help figure this out would be appreciated, thanks in advance.
>>
>> Jon
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <https://dev.eclipse.org/mailman/private/mosquitto-dev/attachments/20151001/2241aee9/attachment.html>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Fri, 2 Oct 2015 09:15:44 +0100
>> From: Roger Light <roger@xxxxxxxxxx>
>> To: General development discussions for the mosquitto project
>>       <mosquitto-dev@xxxxxxxxxxx>
>> Subject: Re: [mosquitto-dev] WebSocket network error: The operation
>>       couldn't be completed. (OSStatus error -9807.)
>> Message-ID:
>>       <CAH7zdyeCDddZ3dJMPiwLhyyoiZvOeOt=A8UtLAO-ObFS8TBjAg@xxxxxxxxxxxxxx>
>> Content-Type: text/plain; charset=UTF-8
>>
>> Hi Jon,
>>
>> Websockets logging has its own logging options, you should check the
>> websockets_log_level config file option (e.g. "websockets_log_level
>> 255"), and ensure that you have "log_type all" or "log_type
>> websockets" or start mosquitto with the "-v" option.
>>
>> websockets_log_level is actually a bit mask, see the enum at
>> https://github.com/warmcat/libwebsockets/blob/master/lib/libwebsockets.h#L104
>> for what you are enabling.
>>
>> Best of luck,
>>
>> Roger
>>
>>
>> On Fri, Oct 2, 2015 at 1:00 AM, Jon Mansey <jon@xxxxxxxxxx> wrote:
>>> Hi Im using mqttws31.js in an App created with NSBasic Appstudio. The app
>>> connects to a mosquito 1.4.3 broker using secure websockets on port 9002
>>> just fine from Safari on OS X, and Chrome, but when I connect from Safari or
>>> the web app on iOS9 mobile devices, I get the -9807 error code as in the
>>> subject line and mqtt doesn't connect. I have full debug enabled and it
>>> doesn?t even show the connection attempt. Any help in expanding logging on
>>> the server or client to help figure this out would be appreciated, thanks in
>>> advance.
>>>
>>> Jon
>>>
>>> _______________________________________________
>>> mosquitto-dev mailing list
>>> mosquitto-dev@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or unsubscribe from
>>> this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> mosquitto-dev mailing list
>> mosquitto-dev@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
>>
>> End of mosquitto-dev Digest, Vol 22, Issue 1
>> ********************************************
>
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top