This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257084 - Failed to start terminal: HOST_UNREACHABLE
Summary: Failed to start terminal: HOST_UNREACHABLE
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Terminalemulator (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-09 16:19 UTC by dhauck
Modified: 2016-07-28 09:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dhauck 2015-12-09 16:19:14 UTC
I've recently started seeing the above error (dialog) when I attempt to open a remote terminal/SSH session via the Terminal Window and the SSH Connection dialog within NB v8.0.2. I've been trying to track this down for a couple days but am not seeing anything in the logs and there's no other output to indicate what's happening. In addition, I've also Wiresharked this and confirmed that no attempt is made to contact the host (absolutely no packets being sent to the destination); almost as if this is getting queued/suspended within NB for some reason(??).

What makes this odd is that the failure is intermittent (but once it starts happening it continues forever). Moreover, I can start SSH sessions manually from the 'localhost' terminal session (via 'ssh <user>@<host>') within NB and from a normal shell.

I've searched for the error in several places (including Bugzilla) and nothings turns up. Does anyone have any ideas for how to track this down?

I run 64-bit Fedora 22 with NB v8.0.2.

PS: This was also posted to the NB Users Forum as: http://forums.netbeans.org/topic64950.html.
Comment 1 dhauck 2015-12-09 19:10:50 UTC
BTW, I just tried installing NB 8.1 and I see the same failure dialog (HOST_UNREACHABLE). I've tried with two v8.1 installations: one where I import my older v8.0.2 settings and one where I don't (so this doesn't seem to be some lingering heritage setting/state).

What could this be?
Comment 2 dhauck 2015-12-10 21:04:58 UTC
OK, I finally figured this out. Profiling the IDE while the remote terminal request was underway was the only way I could think of to trace what was actually happening in NB. Indeed, this pointed me to the exact problem. 

Take a look at the included image, which expands the "NATIVEEXECUTOR: Host <x> availability test" thread's call stack. The problem is definitely *not* that the remote host is "unreachable"; instead the problem is that the local host's *name* is not DNS resolvable(!). Once I added an explicit mapping in "/etc/hosts" all of the various remote terminal capabilities started working.

So, this is not a fundamental bug/problem with NBs *other than the fact that the resulting error message is completely meaningless/unhelpful*. The failure should really identify the local host's unresolvable local hostname fault instead. 

I'll let others decide whether this should changed to "not a bug" or more specifically described as a usability bug associated with the unhelpful (incorrect) error message (or alternatively re-filed as such).
Comment 3 dhauck 2015-12-10 21:09:22 UTC
OK, looks like the file upload size limitation is preventing the 150KB PNG image showing the profiler's call stack. Here's a quick summary:
NATIVEEXECUTOR: Host <x> availability test
  ...
     ...SocksSocketImpl.connect()
        ...NbProxySelector.select()
           ...ProxySettings.getSystemNonProxyHosts()
              ...ProxySettings.getModifiedNonProxyHosts()
                 ...InetAddress.getLocalHost()
                    ...InetAddress.getAddressesFromNameService()
                       ...InetAddress.lookupAllHostAddr()
                          ...InetAddress.lookupAllHostAddr()