What BGP is telling you here is that it tried to insert the network 10.2.0.0/16 into the RIB (the main routing table) but it could not do it because the network was already present there with a lower Administrative Distance than what the BGP uses. Therefore, the BGP-learned 10.2.0.0/16 was considered to be less trustworthy and was not installed into the RIB.
I believe you have indicated yourself that the network is advertised both by OSPF and BGP. In that case, if you are running iBGP, the OSPF-learned 10.2.0.0/16 has the AD of 110 while the iBGP-learned 10.2.0.0/16 has the AD of 200. Thus, OSPF wins and BGP is denied installing the network 10.2.0.0/16 into the routing table. This is what is called the RIB-Failure.
if you check your routing table then you already have IGP route for destination,so that why it create RIB-failure. if you check BGP FAQ docs in cisco.com. you will get your answer
What does r RIB-Failure mean in the show ip bgp command output?
R1> show ip bgp
BGP table version is 5, local router ID is 126.96.36.199
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
r> 188.8.131.52/24 10.10.13.3 0 130 0 30 i
*> 184.108.40.206/24 10.10.13.3 0 125 0 30 i
A. When BGP tries to install the bestpath prefix into Routing Information Base (RIB) (for example, the IP Routing table), RIB might reject the BGP route due to any of these reasons:
Route with better administrative distance already present in IGP. For example, if a static route already exists in IP Routing table.
The number of routes in VPN routing/forwarding (VRF) exceeds the route-limit configured under the VRF instance.
In such cases, the prefixes that are rejected for these reasons are identified by r RIB Failure in the show ip bgp command output and are not advertised to the peers. This feature was first made available in Cisco IOS Software Release 12.2(08.05)T.
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...