Error when attempting to start node: Connection refused [errno:111]

Error when attempting to start node: Connection refused [errno:111]

book

Article ID: KB0073555

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.x

Description

When attempting to start a locally-installed node using the command..
epadmin servicename=MyNodeName start node
..the attempt fails with the following error:
Error: [SWSocket::initClient: Call to 'connect' failed: Connection refused [errno:111]]
The node install command did not report any errors, and appeared to be successful.  Why can't the node then be started?

Issue/Introduction

How to troubleshooting 'connection refused' errors seen on node startup, even after a successful node installation.

Resolution

This error indicates that the epadmin client is not able to correctly resolve the service name for this node. This suggests that the hosts file for this machine has not been properly configured.

First, confirm the ip address of the machine. This may be obtained by running the ping command from another machine on the network, for example..
$ ping myhost
  PING myhost (10.10.10.100) 56(84) bytes of data.
In the above example, the ip address for myhost is 10.10.10.100. If you don't have a second machine on the network available, you can instead obtain the ip address from the command line on the machine where the Streaming node is installed.
  • Windows command: ipconfig
  • Linux command: ifconfig
The output from these commands will also clarify the correct ip address for this machine.  for more details on these commands, refer to the Help:
man ifconfig
ipconfig /?
Next, confirm the hostname of the machine by running the hostname command from a terminal window.  This command works on both Windows and Linux. Staying with the above example, the value returned by the hostname command should be myhost.

Once the IP address and hostname are confirmed, open the machine's hosts file in a text editor. On Linux, the hosts file is located at /etc/hosts.  On Windows, it is located at C:\Windows\System32\drivers\etc\hosts.  For any entries in the hosts file that correspond to the hostname for this machine (myhost or myhost.mydomain.com), make sure the IP address shown for this hosts entry matches the value you confirmed earlier. For example..
127.0.0.1       localhost
::1             localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.100    myhost myhost.mydomain
Rebooting the machine may be required after making changes to the hosts file.