JWt auth login error

i have added key using " vault write auth/jwt/config jwt_validation_pubkeys=@filename"
i am able to use the key pair and encrypt decrypt jwt toke with a java code. but
Login api to vault with jwt token is throwing error
{“errors”:[“no known key successfully validated the token signature”]}
Can any one help me with this