Commvault / CVPowershellSDK

Developer SDK - Powershell
12 stars 12 forks source link

error with every command when powershell 7 used #35

Closed lxegs closed 2 years ago

lxegs commented 2 years ago

Hello

When trying to use commvault powershell module on a 2016 server with powershell 7, i have the following errror :

"Write-Error: Status: Message: Only one usage of each socket address (protocol/network address/port) is normally permitted. (commcell.domaine.fr:81) ErrorMessage: Only one usage of each socket address (protocol/network address/port) is normally permitted. RecommendedAction:"

On each command, even with the basic command "Get-CVJobDetail -JobID $jobid"

with powershell 5.1 (powershell 7 is installed side by side) i have no problem at all

have you got an idea ?

thanks

clement

JnaneshD05 commented 2 years ago

HI,

This issue is maybe due to the ports getting exhausted. Can you please check the output of 'netsh int ipv4 show dynamicport tcp' to see the port range and 'netstat -a' to see the connections? Refer https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/default-dynamic-port-range-tcpip-chang

lxegs commented 2 years ago

hi

Thanks for answer

seems that ports are not exhausted

server has been rebooted in the meaning and it works with powershell 5.1 on the same server

when running get-cvjobdetail command in a "for-each" loop with 6000 jobid imported from a CSV, 50 % loop iterations responds the error, 50 % work

trying to add a start-sleep somewhere

Protocol tcp Dynamic Port Range

Start Port : 49152 Number of Ports : 16384

lxegs commented 2 years ago

i confirm that adding a start-sleep of 3 or 5 seconds makes the job