SSL error when trying to post execution results from DAI to Jira-Xray

Hi,

I’m trying to integrate DAI with Jira-Xray so when a test case in my model is run the execution results are posted to Jira-Xray.

I’ve initiated the t-csm-service.exe and the service starts up and starts monitoring fine.

2024-06-06 16:40:02.482 | INFO     | MainThread - Server http://daiserver:8000/ version 6.2.1-2 use Client Authentication
2024-06-06 16:40:02.498 | INFO     | MainThread - t-csm-service v1.7.3
2024-06-06 16:40:02.498 | INFO     | MainThread - Service started, waiting for test execution from Eggplant DAI server http://daiserver:8000/
2024-06-06 16:40:02.498 | INFO     | MainThread - Monitoring Model(s) ['TestModel'] for executions
2024-06-06 16:40:02.771 | INFO     | MainThread - Starting DAI Client connection 6.2.1-2

I then kick off a test in DAI and the t-csm-service.exe detects this, but when it tries to post the results to Jira-Xray it fails with the below SSL error. Any idea what could be causing the error, and how to fix please?

2024-06-06 16:41:28.859 | INFO     | MainThread - Starting new process RUNID3665
2024-06-06 16:41:28.870 | INFO     | RUNID3665  - Process started with process id : 27628
2024-06-06 16:41:28.914 | INFO     | RUNID3665  - Testcase JIRA-228 Model based of Model TestModel, Status INCOMPLETE
2024-06-06 16:41:35.565 | INFO     | RUNID3665  - Results for Testcase JIRA-228 Model based of Model TestModel, Status PASSED
2024-06-06 16:41:35.581 | INFO     | RUNID3665  - Processing for XRay Server integration [xray_server]
2024-06-06 16:41:35.581 | INFO     | RUNID3665  - posting to Xray server implementation in Alpha 2
2024-06-06 16:41:35.645 | INFO     | RUNID3665  - posting to Xray: {"info": {"summary": "Execution of Eggplant DAI automated test", "description": "Execution created by Eggplant. \n\n Link to model runs in DAI: http://daiserver:8000/controller/results?model_id=2008480c-d7c2-4d16-8f06-5e11e766bc76\n\n Link to test run in DAI: None\n\n", "startDate": "2024-06-06T15:41:26.099286+00:00", "finishDate": "2024-06-06T15:41:33.024286+00:00", "testPlanKey": "JIRA-220", "project": "TEST"}, "tests": [{"testKey": "JIRA-228", "start": "2024-06-06T15:41:26.099286+00:00", "finish": "2024-06-06T15:41:33.024286+00:00", "comment": "Execution created by Eggplant DAI.", "status": "PASSED"}]}
2024-06-06 16:41:35.764 | ERROR    | RUNID3665  - An XRAY Server exception occurred: Failed to Unable to create test execution: HTTPSConnectionPool(host='jira', port=443): Max retries exceeded with url: /rest/raven/2.0/api/import/execution (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))
2024-06-06 16:41:38.015 | INFO     | MainThread - Finished execution closing <Thread(RUNID3665, stopped 27812)>
2024-06-06 16:41:43.253 | INFO     | MainThread - Restarting DAI Client connection 6.2.1-2

If you want to isolate the problem, you could install the openssl package for your platform and examine the output of the command " openssl s_client -connect hostname:port" as per this article: https://docs.pingidentity.com/r/en-us/solution-guides/htg_use_openssl_to_test_ssl_connectivity - for example, in this case you may need to create a root certificate authority (root CA) and use its key to generate the certificate that you want to use. In this case the digital certificate of the root CA would need to be installed into the trust store of the Jira-Xray host for it to be able to verify the certificate that you are sending.