Bug 1118966 - FTBFS, fails TestConnectTimeout
Summary: FTBFS, fails TestConnectTimeout
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: apache-commons-net
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Java maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-12 13:15 UTC by Zenon Panoussis
Modified: 2019-07-01 17:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.