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 220970

Summary: com.jcraft.jsch.JSchException: Session.connect: java.net.SocketTimeoutException: Read timed out
Product: cnd Reporter: Exceptions Reporter <exceptions_reporter>
Component: executionAssignee: Andrew Krasny <akrasny>
Status: RESOLVED FIXED    
Severity: normal CC: vv159170
Priority: P4    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 194005
Attachments: stacktrace

Description Exceptions Reporter 2012-10-28 11:49:06 UTC
This issue was reported manually by vv159170.
It already has 1 duplicates 


Build: NetBeans IDE 7.3 Beta (Build 201210011125)
VM: Java HotSpot(TM) Client VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b11
OS: Windows 7

Stacktrace: 
com.jcraft.jsch.JSchException: Session.connect: java.net.SocketTimeoutException: Read timed out
   at com.jcraft.jsch.Session.connect(Session.java:507)
   at org.netbeans.modules.nativeexecution.jsch.JSchChannelsSupport.startNewSession(JSchChannelsSupport.java:244)
   at org.netbeans.modules.nativeexecution.jsch.JSchChannelsSupport.connect(JSchChannelsSupport.java:206)
   at org.netbeans.modules.nativeexecution.jsch.JSchConnectionTask.connect(JSchConnectionTask.java:126)
   at org.netbeans.modules.nativeexecution.jsch.JSchConnectionTask.access$000(JSchConnectionTask.java:62)
   at org.netbeans.modules.nativeexecution.jsch.JSchConnectionTask$1.call(JSchConnectionTask.java:88)
Comment 1 Exceptions Reporter 2012-10-28 11:49:08 UTC
Created attachment 126677 [details]
stacktrace
Comment 2 Andrew Krasny 2012-10-30 17:26:15 UTC
http://hg.netbeans.org/cnd-main/rev/37c9dd25207c
Comment 3 Quality Engineering 2012-10-31 02:55:59 UTC
Integrated into 'main-golden', will be available in build *201210310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/37c9dd25207c
User: Andrew Krasny <akrasny@netbeans.org>
Log: #220970 - com.jcraft.jsch.JSchException: Session.connect: java.net.SocketTimeoutException: Read timed out

The fix is not to use Exceptions.printStackTrace(e) in case IOException while connection.
To make things easier a method connect() that throws no exceptions is introduced.
Fixed several places where this pattern suits.