Solved

httpsClient Activity in Workflow Port Usage

  • 25 November 2021
  • 4 replies
  • 213 views

Badge +5
  • Commvault Certified Expert
  • 5 replies

We are using a Workflow to monitor Mailboxbackups but it stopped working after Securing the Webserver and using different Ports (HTTPS for example 445, not 443 is used). 

The issue seems like that a wrong Port is used by a Activity.

AbstractHttpClientActivity: [client jobs (HttpClient_ClientJobs)] failed to read response from url [http://COMMSERVENAME.domain.xyz:81/SearchSvc/CVWebService.svc/Job?clientId=1202&completedJobLookupTime=86400]
org.apache.http.conn.HttpHostConnectException: Connect to COMMSERVENAME.domain.xyz:81 [COMMSERVENAME.domain.xyz/XXX.XXX.XXX.XXX, COMMSERVENAME.domain.xyz/0:0:0:0:0:0:0:1] failed: Connection refused: connect
Caused by: java.net.ConnectException: Connection refused: connect

 

As documentated this HttpClient Activtiy is part of the Workflow

84566.pngHttpClient

Sends HTTP requests to access REST APIs or other web services. The response retrieved from these web services are later used within the Workflow.

The following inputs are required:

  • Method

    The HTTP method to be used in the request. The valid methods are GET, POST, PUT, and DELETE.

  • URL

    Specifies the complete URL to access the web service API. For example, to access the GET Client REST API, type the following:

    /SearchSvc/CVWebService.svc/client/{clientId}
  • URL Parameters

    Specifies any additional parameters to be sent with the URL. Click Add to insert new parameters.

    The URL parameters can be entered directly in the URL test field or added as individual parameters in the table provided. When parameters are added to the table, the values are automatically encoded in the URL.

  • Headers

    Specify any additional header information for the HTTP request. For example, to access REST APIs, you need to specify the authentication details to access the web service.

  • Data

    Used with POST and PUT methods. Any HTTP forms or raw XML scripts added here are posted to the API.

    Click Add to insert new HTTP forms.

    After the inputs are added, click Preview to view the HTTP request.

 

https://documentation.commvault.com/11.24/expert/49663_built_in_activities_for_workflows.html

In the Workflow editor it looks like that this Activtiy can only Use HTTP Port 81 by default:

 

Does anybody know a way to switch this to HTTPS? I am not so familar with Scripting and Workflows but i will try my best to fix this issue.

Thanks a lot.

icon

Best answer by Chris Sunderland 26 January 2022, 18:28

View original

4 replies

Userlevel 7
Badge +15

Hi @Christo 

Thanks for the question, securing the web server is quite a task, so I appreciate the effort you have gone through to get to this point.

Please would you confirm that all the steps in this documentation page have been followed:
Configuring Secured Access on a Web Service

The Web Service URL is maintained in the Commserve database and in some cases in registry values on clients, so I suspect there is a value somewhere with the default port 81 assignment.

Double-checking the steps in documentation may reveal the culprit, if not, let me know.

Thanks,

Stuart

Badge +5

Hi @Stuart Painter ,

 

yes, that was done. I verified all the steps again, except the nDM2WEBSITEPORT and proxyServiceUrl registry setting and the ProxySettings.config modification all steps where done. I changed this settings to but it did not change the behaviour. 

I checked the registry for all:81 entries and verified that https + Port is correct, updatet it on some location but it did not solve the issue.


It looks like the httpClient Activtiy has this built in or use an settings from the Commserve DB.

I think as documentated it is possible to write an own REST GET Querry but i am not so familary with this:

 

https://documentation.commvault.com/11.24/essential/98597_rest_api_get_web_server.html
https://documentation.commvault.com/11.24/essential/45592_available_web_services_for_rest_api.html
The workflow provides an Overview of Jobs with failed Mailboxes and Failure Reasons, which is not possible to monitor in the GUI and from default available Reports, which is a important missing Feature.

 

Userlevel 7
Badge +23

Tagging in @Chris Sunderland who might be able to advise.

Userlevel 3
Badge +6

You can try setting the following registry key on the machine running the workflow engine:

(String) WFEngine\WF_defaultWebservice = https://host:port

You may need to create the WFEngine sub-key if it doesn’t already exist.

After setting the key, you will need to restart the workflow engine service.

Reply