Hostname/IP does not match certificate's altnames: POSTMAN

28,875

Solution 1

You need to turn off SSL Certificate verification in Postman's settings.

enter image description here

Solution 2

It looks like you have created a dns name pointing to the AWS generated public dns name for ec2 instance. It's not the correct way. You need to setup an A record and point it to the public ip address of the ec2 instance.

When you have a CNAME created against the EC2 generated public dns name (chat.my-app.app) and access the URL over SSL (https://chat.my-app.app), the process (possibly nginx in your case) that listens to the HTTPS port (usually 443) will check whether the domain name that you used (chat.my-app.app) is listed as one of alternate domains listed in the SSL certificate that the amazon generated dns name uses.

Solution 3

I encountered the same issue and tried to add the Host in the header and it works. Host:EC2 generated public DNS name (chat.my-app.app)

Share:
28,875

Related videos on Youtube

Karan Singh
Author by

Karan Singh

Updated on July 09, 2022

Comments

  • Karan Singh
    Karan Singh almost 2 years

    I am trying to hit a server running on port 8080 of an AWS EC2 instance with a POST request.

    This is the response that POSTMAN gives me when I send the request:

    Error: Hostname/IP does not match certificate's altnames: Host: some-address.compute.amazonaws.com. is not in the cert's altnames: DNS:chat.my-app.app

    I tried looking for it but this seems to be a NodeJS and certificates issue.

    I am not using Node and I don't know what to do with certificates? (I don't know much about how or why I would need them), but I have .pem file which helped me SSH into the EC2 instance.

    How can I resolve this error in Postman?

    Also, if it matters, it is a Graphql request.

  • Expurple
    Expurple over 2 years
    Thanks for the hint. I had the same problem with wscat and solved it by adding --no-checkswitch after reading your answer
  • akshay parkar
    akshay parkar about 2 years
    This helps, thanks! I was facing the same issue and changing the /etc/hosts entries to get rid of those pointing solved my issue

Related