Skip to main content

Hi,

I am trying to to explorer automating our Commcell environment. Unfortunately I encountered and error connecting to commcell. I would like to inquiry the error when connecting to commserve using cvpysdk python library. Below is the error. 

 

 

Error when connecting to commserv using hostname. but i can ping the hostname from the server.

 

 

If something is blocking, is there a required port to open to be able to connect successfully?

@ras 

>>Use the Python SDK to run Commvault operations in your CommCell environment. The Python SDK requires an installation of the Web Console.​

Step 1: Install the Python SDK​

​Step 2: Install the Python Software​

​Windows and UNIX​

​If you installed the Python SDK on a Windows computer or a UNIX computer, no action is required. Python 3.6 is automatically installed along with the Python SDK.​

On a Windows computer, the installation location is C:\Program Files\Python36. On a UNIX computer, the software is packaged inside the Commvault installation directory: %INSTALL_PATH%/python/bin/python3 (for example: /opt/commvault/python/bin/python3).​

Step:3 Establish a Connection​

>>Applies to: Windows and UNIX clients​

​Import the Commcell class and log on to the CommCell environment. The following is the Python commandlet for establishing a connection:​


>>> from cvpysdk.commcell import Commcell​

>>> commcell = Commcell(webconsole_hostname, commcell_username, commcell_password) ​

​where:​

webconsole_hostname is the host name and port number for the Web Console.​

commcell_username is the user name used to log on to the CommCell environment.​

commcell_password is the user password in plain text. If you do not provide the password in the command, you are prompted to enter the password at run time.​

​Step 4: Where to Go From Here​

​Run Commvault operations through the Python SDK or incorporate the Commvault Python commands into scripts or other code.

For sample you can follow the below DOC:

https://documentation.commvault.com/11.24/expert/45532_samples_for_developer_sdk_for_python.html

DOCs:

https://github.com/Commvault/cvpysdk​

​https://commvault.github.io/cvpysdk/cvpysdk/index.html​

​https://documentation.commvault.com/11.24/expert/1961_preinstallation_checklist_for_developer_sdk_python_on_windows.html​

https://documentation.commvault.com/11.24/expert/45526_getting_started_with_developer_sdk_for_python.html​
 


Hi Navneet,

 

Thanks for your time. What i did is the same from what you have provided below and that error I encountered is not able to connect to Commcell when running the python lines the same with you provided.

 

 

Hoping you if you could check further my concern.


@ras 

We need to review the configuration and logs. You can raise a support case to check this.


Reply