My Socket.io on IOS fails to handshake with the websocket server - ios

I have a Node.js server running Websocket. (using Pomelo). I am able to run a web application and connect to it (localhost #port 3104).
however, when I try to use socket.io (SocketRocket) for IOS and connect to the same localhost and port, I get this error:
> http://127.0.0.1:3014/socket.io/1/?t=16807
> "ERROR: handshake failed ... The request timed out"
detail of the error:
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x6c723c0
{NSErrorFailingURLStringKey=http://127.0.0.1:3014/socket.io/1/?t=16807, NSErrorFailingURLKey=http://127.0.0.1:3014/socket.io/1/?t=16807, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x6c72400 "The request timed out."}
i tried. 127.0.01, localhost... even explicit IP address.. all fail
any idea what I should check?
and should it be "http" protocol ? or wss?

Got it working.. I just cannot run a websocket server. I have to run a socket.io server... then it works.

Related

Test connection failed because of an error in initializing provider . Prelogin failure Error

Trying to connect to an external datahub from a SSMS on a server. From desktop computer works.
Port 1433 allowed on server. Has anyone seen this or have a solution? Thank you.
Error:
Test connection failed because of an error in initializing provider. Client unable to establish connection due to prelogin failure
TCP Provider: The specified network name is no longer available.
Client unable to establish connection
Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server.

Error "Timed out waiting for the socket to be ready for a write" while connecting to server in Xcode

I am trying to connect to server for web socket connection. but I am getting the error:
"Websocket is disconnected: Optional(Starscream.WSError(type:
Starscream.ErrorType.writeTimeoutError, message: \"Timed out waiting
for the socket to be ready for a write\", code: 0))"
Starscream.WSError(type: Starscream.ErrorType.writeTimeoutError
How can I solve it? also
Here is my source code link:
https://www.dropbox.com/s/v348vxxjf74dsds/websocket.zip?dl=0
I tried to connect after some time again too, Once its failed but still it's giving me same error.
I tried your code, it's working fine. the only change I have made is your socket server URL
before it was ws://192.168.1.2:8080
and I have updated with "http://192.168.1.41:8080" //41 is my IP. you can use yours
just changed ws with http.

Unable to connect from IPv6 to IPv4 Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found

I got the below error, while calling API from my iOS app (device) to server.
My device is connected to IPv6 network & API which i am calling is with IPv4 network. I created the app using swift and i am using Alamofire for calling API and Reachability for checking Internet connection. What should i do for this. Please suggest on the below error.
Request failed with error: Error Domain=NSURLErrorDomain Code=-1003
"A server with the specified hostname could not be found." UserInfo=
{NSErrorFailingURLStringKey=, _kCFStreamErrorCodeKey=8, NSErrorFailingURLKey=,
NSLocalizedDescription=A server with the specified hostname could not
be found., _kCFStreamErrorDomainKey=12, NSUnderlyingError=0x7a08c530
{Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo=
{_kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8}}}
Your application needs to check for both A and AAAA records in DNS. Even if the server only has an A record. If you are on an IPv6-only network the local DNS resolver will simulate the AAAA record and it will seem like you are convection to an IPv6 server from the app. The network will handle the IPv6-to-IPv4 conversion behind the scenes.

The system returned: (110) Connection timed out

when i open my website it's shows
Connection to 173.0.139.119 failed.
The system returned: (110) Connection timed out
what is Problem? from my Web Application or Server ?
note:
when i use proxy to open my site it's work fine

soap wsdl connection refused error (111)

I got this error upon trying to connect nusoap api for sugarcrm 6.4.3
wsdl error: Getting http://url:8080/soap.php?wsdl - HTTP ERROR:
Couldn't open socket, connection to server http://url:8080/soap.php?wsdl, Error (111): Connection refused
so is there settings I need to do to open the socket for successful connection ?
Thanks in advance.

Resources