Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

353
Views
karate.org.apache.http.conn.HttpHostConnectException: Connection timed out: Http call failed after 21407 milliseconds

I see the below error when I run my script to retrieve token data using Karate framework -

karate.org.apache.http.conn.HttpHostConnectException: Connection timed out: connect, http call failed after 21407 milliseconds.

Below is the Gherkin syntax written to extract token data -

* configure charset = null
* configure cookies = null
* header Content-Type = 'application/json'
* header Cookie = 'SMSESSION=' + SMSESSION
* header Connection = 'keep-alive'
Given path 'main-controller/v1/tokens'
When request ''
And method POST
And karate.waitForHttp(url)
Then status 200
And def token = response
And print 'NEW GENERATED TOKEN = ' + token

- Please be informed that url and SMSESSSION have been defined already in Background.

I have already tried the below configuration settings -

* configure proxy = 'http://my.proxy.host:8080'
* configure ssl = true

But none of these configurations resolved my issue.

I have even used karate.waitForHttp(url) in my feature file to try and wait for the Token API to respond back. Karate reports show that it waits for 72987 ms but still ends up with the same error again.

Can somebody help me resolve this issue? Thanks in advance!

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!