To go on a wild-goose chase; to persistently engage in a futile activity.
To attack imaginary enemies.
To attempt something that is futile; to say something that is not heeded.