I have a strand of dark fiber between two buildings, with the run being roughly 1.5 miles/2.4km, and it is currently operating with 1Gb BX 10km optics, but when I try to put in 10Gb BX 10km optics, I don't get link. I have tried two separate pairs of the 10Gb optics that were fresh out of the box. I know both switches are capable of 10Gb, and both are in auto negotiate. Is there anything in the fiber run itself that may stop it from doing 10Gb but allow 1Gb? The 10Gb optics I'm using are FiberStore Generic SFP-10G-BX 10KM 1270/1330 (fs.com/products/74681.html and fs.com/products/74682.html).
EDIT: One switch is a Cisco 9396PX with port config as below:
interface Ethernet1/9
switchport mode trunk
switchport trunk
allowed vlan 98,899
The other switch is a Ubiquiti Edgeswitch 16XG with port config below:
interface 0/1
vlan participation exclude 1
vlan participation include 98,899
vlan tagging 98,899
exit
show int transceiver detail ...
orshow int diag optics ...
. This information will help figure out what's going on.