Archived Forum Post

Index of archived forum posts

Question:

DNS Lookup failure for SSL client on Android

Aug 15 '13 at 08:39

I'm using Chilkat socket library on Android and I'm trying to connect to an SSL server on one of our servers. I know the server is up and running because I use other programs to access it. When I tried using Chilkat, I received a DNS error as you can see below. The strange thing is that I passed in the String URL and it did indeed find the IP address as indicated in the Connect Log. But even though it knows both the hostname and the IP address, it still gave me a DNS error (error = 2). How is this possible?

By the way I am using DNS servers = 8.8.8.8 and 4.2.2.2, which are pretty standard.

Any ideas?

Connect failed: Async Connect Log is ChilkatLog: 08-15 05:42:36.127:

asyncConnect:

: DllDate: Jul 16 2013

: ChilkatVersion: 9.4.1.28

: UnlockPrefix: Anything for 30 day trial

: Architecture: Little Endian; 32-bit

: Language: Android Java

: VerboseLogging: 0

: objectId: 1

: hostname: proxy.pakedge.com/216.171.163.95

: port: 8010

: ssl: 1

: ConnectTimeoutMs_1: 60000

: Single-threaded hostname to IP address resolution

: Failed to get host address info. (4)

: errno: 0

: osErrorMessage: Success

: hostOrIpAddr: proxy.pakedge.com/216.171.163.95

: port: 8010

: --asyncConnect

: --ChilkatLog

: Connect fail reason is 2


Answer

The "hostname" passed to the AsyncConnectStart method should be a domain name or an IP address. In other words it should be "proxy.pakedge.com" or "216.171.163.95".

The string "proxy.pakedge.com/216.171.163.95" is neither. The software looks at this string, determines that it cannot possibly be an IPv4 address (because of the "proxy.pakedge.com/" and therefore it assumes the entire string to be a domain name. Obviously, there is no domain named "proxy.pakedge.com/216.171.163.95", and therefore the DNS lookup fails.