6 Replies Latest reply on Feb 8, 2019 5:11 AM by Sudhakar Rao

    Max retries exceeded with url: /api/jwt/login

    Sudhakar Rao
      Share This:

      Hi Team,

       

      Need your help and ideas for Integrating BMC Remedy ARS with External Tool.

       

      Requirement:-

      External tool should invoke BMC Remedy ARS REST API's and do below stuff:-

       

      1. Login to BMC using /api/jwt/login

      2. Create Incidents

      3. Update Incident

      4. Logout /api/jwt/logout

       

      Our customer who is using BMC Remedy ARS product, provided us login details

      From my laptop tried to execute below Java code but getting SSL error and the same with Python code also:-

       

          CloseableHttpClient httpClient = HttpClients.createDefault();
          HttpPost httpPost = new HttpPost("https://domain.com/api/jwt/login");

       

          // send the username and password
          java.util.List<NameValuePair> nvps = new ArrayList<>();
          nvps.add(new BasicNameValuePair("username", "testuser"));
          nvps.add(new BasicNameValuePair("password", "testpassword"));
         
          httpPost.setEntity(new UrlEncodedFormEntity(nvps));

       

          // make the call and print the token
          try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
              HttpEntity entity = response.getEntity();
              String token = EntityUtils.toString(entity, StandardCharsets.UTF_8);
              System.out.println(token);
          }

       

      ERROR from Java:-

      Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

       

       

      ERROR from Python:-

       

      urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='itsm-qa.allcovered.com', port=443): Max retries exceeded with url: /api/jwt/login (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

       

      Please provide your suggestions for the resolution:-

       

      1. Do any specific permission needed for the login user?

      2. Any specific settings needed to enable for the REST API access from the Customer BMC Remedy ARS Product?

      3. or something else.

       

      Looking for the feedback.