Context : After many attempts over more than a decade , high-resolution spectroscopy has recently delivered its first detections of molecular absorption in exoplanet atmospheres , both in transmission and thermal emission spectra . Targeting the combined signal from individual lines in molecular bands , these measurements use variations in the planet radial velocity to disentangle the planet signal from telluric and stellar contaminants . Aims : In this paper we apply high resolution spectroscopy to probe molecular absorption in the day-side spectrum of the bright transiting hot Jupiter HD 189733b . Methods : We observed HD 189733b with the CRIRES high-resolution near-infrared spectograph on the Very Large Telescope during three nights , targeting possible absorption from carbon monoxide , water vapour , methane and carbon dioxide , at 2.0 and 2.3 \mu m . Results : We detect a 5- \sigma absorption signal from CO at a contrast level of \sim 4.5 \times 10 ^ { -4 } with respect to the stellar continuum , revealing the planet orbital radial velocity at 154 ^ { +4 } _ { -3 } km s ^ { -1 } . This allows us to solve for the planet and stellar mass in a similar way as for stellar eclipsing binaries , resulting in M _ { s } = 0.846 ^ { +0.068 } _ { -0.049 } M _ { \sun } and M _ { p } = 1.162 ^ { +0.058 } _ { -0.039 } M _ { \mathrm { Jup } } . No significant absorption is detected from H _ { 2 } O , CO _ { 2 } or CH _ { 4 } and we determined upper limits on their line contrasts here . Conclusions : The detection of CO in the day-side spectrum of HD 189733b can be made consistent with the haze layer proposed to explain the optical to near-infrared transmission spectrum if the layer is optically thin at the normal incidence angles probed by our observations , or if the CO abundance is high enough for the CO absorption to originate from above the haze . Our non-detection of CO _ { 2 } at 2.0 \mu m is not inconsistent with the deep CO _ { 2 } absorption from low resolution NICMOS secondary eclipse data in the same wavelength range . If genuine , the absorption would be so strong that it blanks out any planet light completely in this wavelength range , leaving no high-resolution signal to be measured .