Phrase commonly used by a carnival barker in the 1800s and early 1900s when a contestant would throw a ball at a stack of bottles or a dart at some balloons but miss.
Close but no cigar