Native Client connection timeout failure at startup
search cancel

Native Client connection timeout failure at startup

book

Article ID: 294389

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

When a GemFire Native Client C++ application tries to connect with a GemFire cluster, the first operation may fail with a connection timeout when the client is starting.

In the cacheserver log: 
[warn 2021/03/27 18:01:30.785 SGT <ServerConnection on port 40404 Thread 2> tid=0x42] Server connection from [identity(0.0.0.0(default_GeodeDS:30545:loner):2:Native_gaaeebfadc30545:default_GeodeDS,connection=1; port=58192]: connection disconnect detected by EOF.

[warn 2021/03/27 18:01:30.813 SGT <ServerConnection on port 40404 Thread 2> tid=0x42] ClientHealthMonitor: Unregistering client with member id identity(0.0.0.0(default_GeodeDS:30545:loner):2:Native_gaaeebfadc30545:default_GeodeDS,connection=1 due to: The connection has been reset while reading the header

In the Native Client log:
[config 2021/03/27 18:01:18.744214 SGT localhost.localdomain:30545 140547190179776] Running on: SystemName=Linux Machine=x86_64 Host=localhost.localdomain Release=3.10.0-1127.18.2.el7.x86_64 Version=#1 SMP Sun Jul 26 15:27:06 UTC 2020


Environment

Product Version: 10.1

Resolution

Investigating the client log, we can see that the client's hostname was identified as the default - localhost.localdomain. From the cacheserver log, this client IP was identified as 0.0.0.0 because the cache server was unable to resolve the client's fully qualified domain name (FQDN) or hostname correctly from the client's join request. This is caused by a failure on the client side to resolve its own hostname by either DNS or local hosts file lookup.

The quick solution is to add the FQDN-to-IP-Addresses mapping entry into the client's local hosts file. 
 
  • The location of the hosts file:
Linux
/etc/hosts

Windows
SystemDrive:\Windows\System32\Drivers\etc\hosts
 
  • The hosts file should include the following information:
    • The IP address, fully qualified domain name, and the hostname of the host.
    • The Loopback IP address 127.0.0.1, the fully qualified domain name localhost.localdomain, and the host name localhost.
For example:
#IP address        Fully Qualified Domain Name   Short Name
192.168.0.6        hostname1.example.com         hostname1
127.0.0.1          localhost.localdomain         localhost