NSURLRequest Timing out without making connection to server - swift

I have an application written in swift that communicated with my server using PHP. Throughout my testing the app has worked perfectly until I began testing on multiple devices simultaneously. When i try to load both devices at the same time it will sporadically (not 100%) create this timeout:
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=
{NSUnderlyingError=0x127ea9fb0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://myhttpsdomain/my_page.php, NSErrorFailingURLKey=https://myhttpsdomain/my_page.php, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}
Error with domain:https://myhttpsdomain/my_page.php
It creates this timer without ever making the connection to the server. Once the issue has been triggered all web requests from that device will create the error for a few minutes.
I am using a basic let task = session.dataTaskWithRequest to send post requests to my server.
To decide whether the server connection was made or not the first line in my php file is error_log("Page has been called"); And this line isn't even printing.

This is probably one of the following:
a DNS problem
a routing problem/network problem
a server configuration issue
First, check the server logs and see if the request suddenly appears in the logs whenever the client gives up on the connection. If so, you'll need a packet trace to know for sure, but chances are, your PHP script is wedging forever before it sends headers or the server is otherwise misconfigured in some way.
If not, then sniff the network and see if it is even sending out a request. And make sure that both devices can ping each other.

Related

Getting ServiceFault response from server

In OPCUA, Initially server responding properly to all
CreateMonitoredItemRequest with CreateMonitoredItemResponse. After
sometime, server sending Service Fault response to
CreateMonitoredItemRequest.
Using One tool I am sending CreateMonitoredItemRequest to server
after that server respond with server fault.
Can anyone tell what is the meaning of service Fault? I am quite new to OPCUA protocol.
A ServiceFault response contains a StatusCode that should indicate the reason for failure.

500 Error: Failed to establish a backside connection

I am using Secure Gateway of ibm blue-mix.
However, I do not know how to do "500 Error: Failed to establish a backside connection" error.
The situation is as follows:
When accessing, the following message will be displayed on the Secure Gateway client.
[INFO] (Client ID keqdVTJMrJt_prF) Connection #1 is being estabrished to xxx.xxx.xxx.xxx:nnn
The display of the log is
"[INFO ] SRVE0242I: [ChisInq003] [/ChisInq003] [Servlet.ChisServlet003]: Initialization successful.".
However, if it takes about two minutes, "500 Error" will be displayed.
Does anyone know what to do?
If the connection fails after ~2 minutes, it sounds like the connection between the Secure Gateway Client and the host:port it is trying to connect to is timing out which implies a network issue.
Are there any additional Secure Gateway Client logs that can be shared that might contain an error? What is it that you're trying to connect to via Secure Gateway?

Disconnects in FIX connections in local network

I have a FIX server and FIX client implementing FIX4.4 running on the same network. I use QuickFIX C++ engine. Altough they are on the same network, sometimes they disconnect. In the FIX server's event logs:
20140612-01:21:30.000 : Sent test request TEST
20140612-04:11:56.000 : Sent test request TEST
20140612-07:05:26.029 : Sent test request TEST
20140612-07:05:26.029 : Socket Error: An established connection was aborted by the software in your host machine.
Means HEARTBIT messages are failed to send/recv.
What can be wrong? I have a regular setup and nothing special..
Thanks
while the client connection was accepted by the server, it doesn't look like you then achieved "logon". First you connect, then you logon. You need to make a logon request after you connect. Look at the initial FIX messages sent between client and server.

"connection refused" when my play app makes http call to itself

I am implementing a heartbeat endpoint/route using play 2.2.1 built with Scala 2.10.2 (running Java 1.7.0_45). When
the heartbeat endpoint is called, I want the controller to make http calls to localhost. If all of those
calls are ok, then the heartbeat endpoint will return an OK http response.
When I execute the following url from curl, I get the expected 200 response:
http://localhost:9000/oauth2/token. I am also able to telnet to localhost 9000.
I am also able to use WS successfully with an external URL:
WS.url("http://www.example.com").withHeaders("Content-Type" -> "application/json").get()
However, when I execute it from within my play app, I get a 500 tcp_error response.
WS.url("http://localhost:9000/oauth2/token").withHeaders("Content-Type" -> "application/json").get()
WS.url("http://127.0.0.1:9000/oauth2/token").withHeaders("Content-Type" -> "application/json").get()
WS.url("http://HostName:9000/oauth2/token").withHeaders("Content-Type" -> "application/json").get()
Here is the exact error message I receive:
Network Error (tcp_error)
A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
For assistance, contact your network support team.
Do I need to configure something to allow a play application to make calls to itself? Is this a network problem on
my box? If so, why do curl and telnet work? If a network issue, then it must be a jvm specific networking issue?
Could it be a security problem with play calling to itself? Not sure where to go next.

Called failed in Linphone iPhone

I have successfully compiled (according to readme file provided by Linphone) and installed Linphone client on simulator and it is successfully registered to local sip server. But it shows "Call failed, Cannot call xxxxxxxxx, Reason was: no response" if I dial any number. I checked captured packet using WireShark, it only shows register sip request, but no invite request.
Any idea whats wrong? Kindly share your valuable knowledge on that.
Because may be you are dialling wrong number OR the number you are dialling is not yet registered on your SIP server.
You should also log in with other number to make call. Means on different PC run linphone on simulator or device. Then try to make call.