Mating surfaces with nanocoatings work under lubrication. At the same time the effects of surface deviations from the ideal one have not been sufficiently studied . The paper examines the contact of endface friction pairs considering their surface roughness. The problem is solved by using Reynolds equation for liquids assuming the liquid film thickness to be a random variable. In the general case the liquid film thickness is described as a random field of two variables x,y.