has anyone encountered NSPOSIXErrorDomain code=61? #57
This just means that the connection failed, because the host could not be found / resolved. Make sure your websocket server is running and accessible for incoming connections. (I used to get this error when I let my server listen on localhost instead of my LAN ip).
That's not neccessarily the case. It happened to me once, yet the server was runninng alright, i could connect to the server thru the browser on my windows system. after googling for hours, not finding anything useful, i upgraded my OS to Lion, and voila - everything worked fine again.
I'm on Lion and its still not working , is there anything that can be done - my prototype is now stuck because of this. I tried localhost , the computer name , the ip address and none of them worked. I'm using nodejs socket.io. The html test client is also working fine so i dont know what the error actually is now. Can anyone help heres the socket server side code:
https://gist.github.com/rkrishnasanka/6129480
Thanks in advance !
Do you still have this issue? I am getting the same error.
Please let me know if you have resolved this.
Change ur websocket address to the ip address of your computer. Its pointing to localhost but the server is running on your computer. The computer itself can resolve it but the client doesn't know about the localhost because the server is not running on it. You can find your IP Address in wifi settings.
@nofelmahmood it worked fine, the problem was something similar to what you said.
Did you use something different than 127.0.0.1? You need to have external and visible interface. Check your firewall config.
Hi, i have integrated websocket without cocoa pods into my app. It is running on os version 10.11.4
whenever i tried establishing connection it throws up this error :"error:Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 404" UserInfo={NSLocalizedDescription=received bad response code from server 404, HTTPResponseStatusCode=404}
". Would be of great help if somebody let me know how can this error be fixed. Thank you in advance
@NishithaJain that's a question best asked on stack overflow. A 404 is going to be unrelated to SocketRocket – it means you are trying to connect to a resource that your server doesn't think exists.
Thank you @dfed . The error anyway disappeared, throwing a new error.
error:Error Domain=SRWebSocketErrorDomain Code=2133 "Invalid Sec-WebSocket-Accept response" UserInfo={NSLocalizedDescription=Invalid Sec-WebSocket-Accept response}.
Can you please help me out to fix this? Thank you in advance.
Again, this is a better question for StackOverflow. Sounds like your server isn't doing the right thing.
I hate to ask the same question like @NishithaJain ask, but i have same issue.
I create WebSocket Server on my local system using Primus and SockJS, then i test it using SockJS Client and it's working.
When i test using SocketRocket it thrown an error
Error Domain=SRWebSocketErrorDomain Code=2133 "Invalid Sec-WebSocket-Accept response" UserInfo={NSLocalizedDescription=Invalid Sec-WebSocket-Accept response}
Thank you in advance
I was using SocketRocket for a while and it did work. But now (suddenly) i keep getting this error.
I didn't change anything in the way i was connecting earlier.
Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn’t be completed. Connection refused" UserInfo=0x6b9cfb0 {}
I googled around but no luck. does anybody have an idea of why this error should happen?