Karate :On teamcity facing issue of http connection refused error for localhost - karate

I have karate test suite to execute on teamcity.It is supposed to connect to https://localhost:8086/ but it fails intermittently with error : connecting refused after xxx miliseconds to http://localhost:8086/

Related

Unable to establish SSL connection when using wget to download GEDI data from LP DAAC data pool

I was using wget to download GEDI data from LP DAAC data pool. It always returns an error of "unable to establish SSL connection". I attempted wget in promote or Pycharm and added the "--no-check-certificate" configuration.
The wget is the newest release (1.21.3,64bit).
OS: windows11.
from the following massages, I guess the connection to EarthData is successful because it returns the data downloading link that I can open manually in the browser and then can start downloading. This error could happen in the last step that wget starts accessing the returned link and then downloading.
returned messages:
--2022-08-14 09:51:09-- https://e4ftl01.cr.usgs.gov//GEDI_L1_L2/GEDI/GEDI01_B.002/2019.04.20/GEDI01_B_2019110092939_O01996_01_T03334_02_005_01_V002.h5
Resolving e4ftl01.cr.usgs.gov (e4ftl01.cr.usgs.gov)... 2001:49c8:4000:127d::133:130, 152.61.133.130
Connecting to e4ftl01.cr.usgs.gov (e4ftl01.cr.usgs.gov)|2001:49c8:4000:127d::133:130|:443... failed: Bad file descriptor.
Connecting to e4ftl01.cr.usgs.gov (e4ftl01.cr.usgs.gov)|152.61.133.130|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://urs.earthdata.nasa.gov/oauth/authorize?scope=uid&app_type=401&client_id=ijpRZvb9qeKCK5ctsn75Tg&response_type=code&redirect_uri=https%3A%2F%2Fe4ftl01.cr.usgs.gov%2Foauth&state=aHR0cHM6Ly9lNGZ0bDAxLmNyLnVzZ3MuZ292Ly9HRURJX0wxX0wyL0dFREkvR0VESTAxX0IuMDAyLzIwMTkuMDQuMjAvR0VESTAxX0JfMjAxOTExMDA5MjkzOV9PMDE5OTZfMDFfVDAzMzM0XzAyXzAwNV8wMV9WMDAyLmg1 [following]
--2022-08-14 09:51:55-- https://urs.earthdata.nasa.gov/oauth/authorize?scope=uid&app_type=401&client_id=ijpRZvb9qeKCK5ctsn75Tg&response_type=code&redirect_uri=https%3A%2F%2Fe4ftl01.cr.usgs.gov%2Foauth&state=aHR0cHM6Ly9lNGZ0bDAxLmNyLnVzZ3MuZ292Ly9HRURJX0wxX0wyL0dFREkvR0VESTAxX0IuMDAyLzIwMTkuMDQuMjAvR0VESTAxX0JfMjAxOTExMDA5MjkzOV9PMDE5OTZfMDFfVDAzMzM0XzAyXzAwNV8wMV9WMDAyLmg1
Resolving urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)... 2001:4d0:241a:4081::89, 198.118.243.33
Connecting to urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)|2001:4d0:241a:4081::89|:443... failed: Bad file descriptor.
Connecting to urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)|198.118.243.33|:443... connected.
Unable to establish SSL connection.

Getting "HttpHostConnectException" connection refused while running Karate UI Testcases through jenkins

I am getting below error while executing testcases through jenkins. jenkin is running on linux slave.
[ERROR] 2020-09-10 03:07:19.692 [ForkJoinPool-1-worker-1] c.i.karate - org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1] failed: Connection refused (Connection refused), http call failed after 1 milliseconds for URL: http://localhost:9222
[ERROR] 2020-09-10 03:07:19.692 [ForkJoinPool-1-worker-1] c.i.karate - http request failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
I have written below code for karate UI Automation to launch the chrome browser
Feature: Driver initialization
Background:
* def loginloc = read('classpath:pageobjects/LoginPage.json')
Scenario: Driver initialization
* configure driver = {type: 'chrome', showDriverLog: false}
* driver environment.ScriptEditor.baseurl
* driver.maximize()
* retry().waitFor(loginloc.headingtext)
* driver.waitUntil("document.readyState == 'complete'")
Chrome may not be on the Jenkins worker node or it typically will not support a UI test. This is what the Docker container is for. Read the docs: https://github.com/intuit/karate/tree/master/karate-core#dockertarget

Karate UI : data driven testing not working properly when used driver.quit()

We are exploring Karate UI(already using Karate for API testing). For exploring purpose we are using https://www.delta.com/ and its working fine. However have observed following behavior while implementing data driven test
Following is the simple feature file for search destination
Feature: Karate UI POC
Background: To set the browser driver
* configure driver = { type: 'chromedriver', executable: "path to exe"}
* def data=
"""
{
fromDes: '#(from)'
}
"""
Scenario: Launch the application search for the valid flights
Given driver 'https://www.delta.com/'
* driver.maximize()
* waitUntil("document.readyState == 'complete'")
* waitForEnabled('#fromAirportName').click()
* waitForEnabled('#search_input')
* clear('#search_input')
* input('#search_input',data.fromDes)
* driver.quit()
From data.feature file I am making a call to above feature file as follows
* table destinations
| from |
| 'NEW YORK' |
| 'BOSTON' |
* call read('delta.feature') destinations
On executing the test I am getting following error
17:26:55.443 [main] ERROR com.intuit.karate - org.apache.http.conn.HttpHostConnectException: Connect to localhost:9515 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect, http call failed after 2054 milliseconds for URL: http://localhost:9515/session/6fa82b59df1c1c845974c2f52d481d11/url
17:26:55.445 [main] ERROR com.intuit.karate - http request failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9515 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
17:26:55.445 [main] WARN c.i.k.d.chromedriver_1592481370453 - session delete failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9515 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
17:26:55.445 [main] DEBUG com.intuit.karate.shell.Command - closing command: chromedriver_1592481370453
1) However if I remove statement driver.quit() test is working fine.
2) Is it a right approach for data driven testing in Karat UI, as we are using it quit well in Karate API
You don't need to use quit() at all, Karate will do it automatically.
Can you also try with version 0.9.6.RC3
If you still see an issue, follow this process and we will make sure it is fixed: https://github.com/intuit/karate/tree/develop/examples/ui-test

ivy intelliJ proxy connection error

I am using IvyIDEA to resolve module dependencies through ivy on IntelliJ.
But when I tried IvyIDEA -> resolve for all modules, the process is halting due to proxy setting. In the event log, I could see error like:
ERROR: Server access error at url https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.11/2.3.5/akka-actor_2.11-2.3.5.pom (java.net.ConnectException: Connection timed out: connect)
java.net.ConnectException: Connection timed out: connect*
I have tested the HTTP Proxy Setting for IntelliJ, it shows "Connection successful" for check connection.
It seems the proxy setting in IntelliJ is not properly passed to IvyIDEA, so what's the issue?

OpenDJ Multi-master replication fails(Hangs at Initializing registration information step):: javax.naming.AuthenticationException

I am using OpenDJ-2.4.6 along with Oracle JDK 7.80 and I want to run Multi-master replication on 2 of my servers, the OS for these servers is Amazon Linux.
The OpenDJ setup runs perfectly fine; I can start the server too without any errors.
It is when I run the "dsreplication" script as follows:
./dsreplication enable --host1 server1.example,com --port1 4444 --bindDN1 "cn=Directory Manager" --bindPassword1 "Passw0rd" --replicationPort1 1388 --host2 server2.example,com --port2 4444 --bindDN2 "cn=Directory Manager" --bindPassword2 "Passw0rd" --replicationPort2 1388 --adminUID admin --adminPassword "Passw0rd" --baseDN "dc=example,dc=com"
the script hangs on the following step:
Initializing registration information on server server2.example.com:4444 with the contents of server server1.example.com:4444 .....
And on checking the logs, there is no error reported in there.
But, when I run the following command:
./dsreplication status -h localhost -p 4444 --adminUID admin --adminPassword "Passw0rd" -X
it throws the following error:
The displayed information might not be complete because the following
errors were encountered reading the configuration of the existing
servers: Error on server2.example.com:4444: An error occurred
connecting to the server. Details:
javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
Credentials] Error on server:4444: An error occurred connecting to the
server. Details: javax.naming.AuthenticationException: [LDAP: error
code 49 - Invalid Credentials]
Please help me.
Thanks in advance.
The error could not be more explicit: "Invalid Credentials" on server 2.
Check the bindDN and bindPassword are valid against server 2.
When doing replication with OpenDJ, the hostnames must be resolved and addressable from either machines. Have you checked that this is the case with your Amazon Linux servers ?