When you generate your cert request with the
Java keytool it asks you a series of questions.
One of them is your first and last name (which is misleading).
What it really wants there is the domain name. If that doesn't match the domain of your server you will get this message.
For instance, if you were generating a key for
www.acme.com your keytool session would look like: