TIC TCP Conn Failed

I am trying to connect to our webservice server vai MDM (Mobile Iron) tunnel. I am getting this error.


2019-05-31 09:44:47.346402-0500 xxxxx[3938:1731358] TIC TCP Conn Failed [3:0x2805215c0]: 12:8 Err(-65554)

2019-05-31 09:44:47.348358-0500 xxxxx[3938:1731358] Task <F00B000D-3B15-48CF-B053-6F6880F8A583>.<3> HTTP load failed (error code: -1003 [12:8])

2019-05-31 09:44:47.348682-0500 xxxxx[3938:1731358] Task <F00B000D-3B15-48CF-B053-6F6880F8A583>.<3> finished with error - code: -1003

2019-05-31 09:44:47.351787-0500 xxxxx[3938:1731366] Custom Error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x283e5b900 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://internalWebServiceURL.com:8448/index.php/auth, NSErrorFailingURLKey=https://internalWebServiceURL.com:8448/index.php/auth, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}


This is my code for TCP/IP connection. My iOS version is 11.3


NSURLSessionDataTask *requestTask = [[NSURLSession sharedSession]

dataTaskWithRequest:theRequest completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {

if (!error) {

NSHTTPURLResponse *httpResp = (NSHTTPURLResponse*) response;

if (httpResp.statusCode >= 200 && httpResp.statusCode < 300) {

NSError *jsonError;

id array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&jsonError];

if (!jsonError) {

dispatch_async(dispatch_get_main_queue(), ^{[self datareturn: array];});

}

}

else if(httpResp.statusCode == 500) {

self.title = @"No Data Found";

[self errorReturned:@"Server error occurred, please try again later."];

}

else {

self.title = @"No Data Found";

[self errorReturned:@"Unknown error occurred1, please try again later."];

}

}

else {

NSLog(@"Custom Error: %@", error);

[self errorReturned:@"Unknown error occurred2, please try again later."];

}

}];

[requestTask resume];


Any help would be appreciated.

Answered by DTS Engineer in 361924022

The error you’re seeing, -1003, is

NSURLErrorCannotFindHost
. In the vast majority of cases this error means exactly what it says:
NSURLSession
was unable to resolve the host name in the URL your gave it.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Accepted Answer

The error you’re seeing, -1003, is

NSURLErrorCannotFindHost
. In the vast majority of cases this error means exactly what it says:
NSURLSession
was unable to resolve the host name in the URL your gave it.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Gi

Thanks for your response.


Can you guide me how to trace the error. I know same code works fine when i tested with older version of iphones (like, 6, 7, and 8) but it gives me above error with iphone XR. There are no changes in the webservice URL or firewall settings. NSURLSession is trying to make a secure connection with Mobile Iron (MDM Solution) Tunnel.

You can use a CFNetwork diagnostic log to confirm the source of the error. It’s very likely to be coming from a lower-level subsystem, like

libnetcore
(the underpinnings of the Network framework). You’ll see information from there logged in the same sysdiagnose log. Mostly like this will read you down into
mDNSResponder
, that is, the DNS resolver. You can use an RVI packet trace to view its interactions with the DNS servers.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi,


In my case I'm hit with this error code(-1003) when using SDWebimage, it gets most URL but in some cases it gives this error. Upon opening the same error giving URL in browser with a VPN on, opens it.


Is there a way to redirect DNS or same use a new DNS/VPN config programmatically to get the results from URL?

Before taking remedial action here, you need to understand what’s causing the problem. After all, if this timeout is caused by a failure on the server, there’s no point monkeying with your DNS or VPN configurations.

Given that, I recommend that you follow the advice from my 4 Jun post.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
TIC TCP Conn Failed
 
 
Q