Archived Forum Post

Index of archived forum posts


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 = and, which are pretty standard.

Any ideas?

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


: DllDate: Jul 16 2013

: ChilkatVersion:

: UnlockPrefix: Anything for 30 day trial

: Architecture: Little Endian; 32-bit

: Language: Android Java

: VerboseLogging: 0

: objectId: 1

: hostname:

: 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:

: port: 8010

: --asyncConnect

: --ChilkatLog

: Connect fail reason is 2


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

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