[MB-7417] IP address detection incorrectly chooses link local addresses ( Created: 14/Dec/12  Updated: 23/Apr/14  Resolved: 21/Dec/12

Status: Closed
Project: Couchbase Server
Component/s: ns_server
Affects Version/s: 2.0
Fix Version/s: 2.0.1
Security Level: Public

Type: Bug Priority: Major
Reporter: Sriram Melkote Assignee: Sriram Melkote
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Windows 7 (but probably not OS specific)

Attachments: Text File debug.log    
Issue Links:

IP address is detection picks up "169.254.x.x" addresses when there are interfaces with actual addresses configured down the list. The detection code incorrectly stops scanning when it encounters a link local address. It should instead of continuing to scan other interfaces for a "better" address.

It's quite normal to assign link local 169.254.x.x addresses to links that do not otherwise have a network address. Our code should skip addresses in this ( - range and move on to other interfaces. I ran into this on Windows but it probably can happen on any other platforms just as well.

Couchbase server ultimately fails to startup with the detected 169.254.x.x address.

1> inet:getifaddrs().

2> addr_util:get_my_address().

Comment by Sriram Melkote [ 14/Dec/12 ]
Log showing Couchbase startup failing due to bad autodetected address attached
Comment by Sriram Melkote [ 19/Dec/12 ]

Also see:
Comment by Bin Cui [ 21/Dec/12 ]
Comment by Bin Cui [ 21/Dec/12 ]
Sri has a fix for it already.

Comment by Sriram Melkote [ 21/Dec/12 ]
Generated at Thu Nov 27 08:43:08 CST 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.