How to Troubleshoot SSL Certificate & Server Connection Issues

Avatar

2020 Update: If you want to dig deeper into SSL certificates, check out this post about Postman product updates.


 

Looking for help with the error, “self-signed SSL certificates are being blocked,” or a related error? Well, you’ve come to the right place.

Perhaps you’re using Postman and have encountered the “Could not get any response” error pictured below:  

Response error in Postman

Let’s get you back on track with a few ways that you can troubleshoot this unexpected behavior in Postman.

Benefits of the Postman Console

The Postman Console works the same way as a web browser’s developer console. If your APIs or API tests are not behaving as you would expect, this is the place to go to deep dive while debugging the same. Since Postman Console logs all of your API activities, you are able to get more detailed information about what’s going on under the hood.  This should be your first step in identifying the SSL certificate issue you’re seeing while you’re trying to debug. 

Here’s all of the information that the Postman Console logs:

  • The actual request that was sent, including all underlying request headers and variable values, etc.
  • The exact response sent by the server before it is processed by Postman 
  • The proxy configuration and certificates used for the request
  • Error logs from tests or pre-request scripts
  • The console.log() from inside scripts

Common Server Connection Issues and How to Resolve Them 

If Postman is unable to connect to your server, you will probably get the message “could not get a response.” To check if you’re having connectivity issues, try opening your server address in a web browser. If you’re able to open it in your browser then potential issues could include:

Firewall Issues

Some firewalls are configured to block non-browser connections. If this happens, you will need to contact your network administrators for Postman to work. 

Proxy Configuration

If you’re using a proxy server to make requests, ensure that it’s configured correctly. Postman will use the system proxy by default – custom proxy info can also be added if it’s needed for specific requests or domains. You can see more information about the proxy server using the Postman Console.

SSL Certificate Issues

If you’re using HTTPS connections, you can turn off SSL verification under Postman settings. If that doesn’t resolve the issue, your server may be using a client-side SSL connection which you can configure under Postman Settings. Check the Postman Console to ensure that the correct SSL certificate is being sent to the server.

Client Certificate Issues

The purpose of a client certificate is to allow users to assert their identity to a server thus serving as a layer of security. Since passwords can easily be compromised, client certificates authenticate users based on the system they use. As such, the server might require client certificates. If users attempt to access a server without permissions, they would be denied access. You can resolve this by adding a client certificate under Postman Settings.

Incorrect Request URLs

You can send requests in Postman to connect to APIs you are working with. Using variables allows you to store and reuse values in your requests and scripts, increasing your ability to work efficiently and minimize the likelihood of error. Environment variables are frequently used across multiple server environments such as development, staging, and production. In contrast to global variables which are commonly used to capture brief states. However, If your request includes variables or path parameters then make sure that they’re defined in your environment or globals. Unresolved request variables can result in invalid server addresses.

Incorrect Protocol

The first part of the URL requires a protocol which can be http or its secured version, https. A protocol is important because it determines how data is transferred between the host and the web browser. Since URL requires one of the two protocol options, make sure that you’re not accidentally using https:// instead of http:// (or vice versa) in your URL.

Invalid Postman Behavior

It’s possible that Postman could be making invalid requests to your server. Check your server logs (if available) to confirm if this is the case.

Very Short Timeouts 

If you configure a very short timeout in Postman, the request may timeout before completion. To resolve this, you will need to go into your Postman settings and set how long the app should wait for a response before saying that the server isn’t responding. A value of 0 indicates infinity which, means Postman will wait for a response forever.

Invalid Responses

If your server sends incorrect response encoding errors or invalid headers, Postman won’t be able to interpret the response. 

Getting Help

If you are still running into issues and unable to resolve them, you can either file or search for an existing issue on our GitHub issue tracker. If you need to include confidential data then you can file a ticket with Postman support and help you troubleshoot.

What do you think about this topic? Tell us in a comment below.

Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

17 thoughts on “How to Troubleshoot SSL Certificate & Server Connection Issues

  • Avatar

    When I run my tests in Postman with “SSL certificate verification” set to off, everything runs well. However, when I try to add the -k option to my Newman run, I start getting 401 errors. Have you encountered something like this?

  • Avatar

    ssl tab not showing in postman linux

    • Avatar

      If the tab isn’t showing make sure you have the latest version of the app. You can get it from our downloads page: https://www.postman.com/downloads/

  • Avatar

    Our configuration requires me to add a client certificate via Settings. However my issue is that Postman doesn’t seem to save the certificate from day to day; I need to add the same certificate first try each day.

  • Avatar

    The connection requires a PFX cert file and the post works in Postman. However, the code generator feature does not generate the necessary code to handle the cert and the generated code does not work. Can Postman generate code that handles the given PFX file?

    • Avatar

      Hi Khanh, Thanks for reading and commenting! There currently isn’t support for certificates to appear in the code generated by the code generators. However, there is a GitHub issue here if you’d like to follow the issue for updates or add a request/comment to the thread.

  • Avatar

    I have a question when can we get the “502 bad gateway” error while we try to send or search the request? and how can we solve that?

  • Avatar

    Is Postman using the available resources/configurations of a machine or it’s routing the request somewhere else before actually executing the request? I’m running it in a machine that doesn’t support the website’s cipher suites but Postman can still successfully perform the request with the expected result.

  • Avatar

    Is there any reason why Postman would determine a server certificate to be self-signed, while a browser (such as Chrome) would trust the server’s certificate? (I am using a VPN.)

  • Avatar

    Thewindscribe isn’t working it shows me Invalid API end point I have tried logging out and in again it just keeps on showing me the same thing I have reboot my system countless times its still showing the same thing pls how can I make it work

  • Avatar

    Why if i run monitor, i get
    3 19:13:14
    GET https://*.*.com/WebAPI/Eligibility/RetrieveEligibilityExternal/C4050284301/1407461700/371829269/03-16-1973
    4 19:13:14
    Error: write EPROTO 784BB216C87F0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:../deps/openssl/openssl/ssl/statem/extensions.c:907:
    5 19:13:14
    6 19:13:14
    Failed: Status code is 200
    7 19:13:14
    expected PostmanResponse{ …(5) } to have property ‘code’

    But if i run request – evetything ok.

  • Avatar

    login in some problem