Bug 1118966

Summary: FTBFS, fails TestConnectTimeout
Product: Red Hat Enterprise Linux 7 Reporter: Zenon Panoussis <redhatbugs>
Component: apache-commons-netAssignee: Java maintainers <java-maint>
Status: NEW --- QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.0CC: jorton, mizdebsk, sochotni
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Zenon Panoussis 2014-07-12 13:15:30 UTC
The connect timeout is hardcoded to connect to ftp.microsoft.com on port 1234. That host:port rejects connections, the test module doesn't catch the rejection and the test fails every time. 

Workaround:

iptables -A PREROUTING -t nat -p tcp -s 192.168.122.121 --dport 1234 -j DNAT --to 194.109.21.27:666

This causes a timeout and the test succeeds. 

In any case, hardcoding a competitor's systems in code that has nothing to do with them is not polite. The problem is upstream.

Comment 2 Zenon Panoussis 2014-07-12 13:59:36 UTC
BTW, http://grepcode.com/file/repo1.maven.org/maven2/commons-net/commons-net/3.2/org/apache/commons/net/ftp/TestConnectTimeout.java says that it should return true on UnknownHostException. The target host sends a reset; perhaps that's not an unknown exception:

    192.168.122.121.54242 > 134.170.188.232.1234: Flags [S], cksum 0x7ee3 (incorrect -> 0x5cf2), seq 3087907219, win 14600, options [mss 1460,sackOK,TS val 242866817 ecr 0,nop,wscale 7], length 0
15:51:33.935228 IP (tos 0x0, ttl 243, id 43016, offset 0, flags [DF], proto TCP (6), length 40)
    134.170.188.232.1234 > 192.168.122.121.54242: Flags [R.], cksum 0xc6b0 (correct), seq 0, ack 3087907220, win 8212, length 0

Best thing might be to just disable this test.