Kemp Support, how can we help?

The latest application delivery knowledge and expertise at your fingertips.

Powershell Command Issue with .58 (Read-LicenseEULA)

 

Information

 

Summary:

Powershell Command Issue with .58 (Read-LicenseEULA)

Environment:

Product: LoadMaster

Version: 7.2.58

Platform: Any

Application: Any

Question/Problem Description:
  • The Read-LicenseEULA command is returning a ReturnCode of 401 but it appears the command is successfully running.

58_fw1.png

58_fw__1_.png

 

  • If you downgrade to firmware version 7.2..57, the Real-LicenseEULA command can be executed successfully.

57_fw_2.png

 

  • Running other LoadMaster related commands on version .58 work as well, so this issue is limited with this particular version.

 

Steps to Reproduce:
  • Install new VLM, Set IP address via console and then issue following command

$ip = '192.168.x.x'; $port = '443'
$cred0 = New-Object pscredential('bal', (ConvertTo-SecureString -String '1fourall' -AsPlainText -Force))

PS C:\Users\>Read-LicenseEULA -LoadBalancer $ip -LBPort $port -Credential $cred0



ReturnCode Response                                                                                     
---------- --------                                                                                     
      401 <?xml version="1.0" encoding="ISO-8859-1"?>...

PS C:\Users> Read-LicenseEULA -LoadBalancer $ip -LBPort $port -Credential $cred0  -verbose -debug
VERBOSE: Input params are OK, moving on . . .
VERBOSE: [SetMultipleParamUrl] command url:https://192.168.x.x:443/access/readeula
VERBOSE: setting ServerCertificateValidationCallback to TRUE.
VERBOSE: Running the API command using the specified login/password (user: "bal") as login credential.
VERBOSE: Response received.
VERBOSE: HTTP STATUS: OK
VERBOSE: setting ServerCertificateValidationCallback to NULL.
VERBOSE: closing connection.

 

 

 

Error Message: ReturnCode Response                                                                                     
---------- --------                                                                                     
      401 <?xml version="1.0" encoding="ISO-8859-1"?>...     
Defect Number: LM-1851
Enhancement Number:  
Cause:
  • The EULA content itself appears to be breaking the PowerShell XML parser. There is code that massages the eula.html before shipping out to API, but this code needs to be updated to work with the new EULA.
Resolution:
  • This is currently considered to be a bug. A workaround can be found for this below.
Workaround:

 

The following workaround can be ran in the meantime while our developers work on a fix:

 

----------------- PowerShell 5.1 Commands using Kemp PS Module -----------

 

$ip = '192.168.x.x'

$port = '443'

$cred0 = New-Object pscredential('bal', (ConvertTo-SecureString -String '1fourall' -AsPlainText -Force))

$rc = (Initialize-LmConnectionParameters -Address $ip -LBPort $port -Credential $cred0).returncode

 

# Read Eula and collect first magic string

$r = (Read-licenseEULA).response.tostring()

if ($r -match "Command successfully executed") {

$Magic1 = (Read-LicenseEULA).data.eula.MagicString

$msg = (date -format u) + " INFO - Read EULA. Magic1 = $Magic1"; $msg

}

 

# Work around for 7.2.58.0

Elseif ($r -match "<Magic>") {

$r = ($r | convertfrom-string -Delimiter "/Magic>").P1

$magic1 = $r.Substring(($r.length - 37), 36)

$msg = (date -format u) + " INFO - Read EULA. Magic1 = $Magic1"; $msg

}

Else {

$msg = (date -format u) + " ERR - CANNOT COLLECT MAGIC1 FROM EULA. Skipping $ip"; $msg

}

------------------------------------------

 

Notes:  

Was this article helpful?
0 out of 0 found this helpful

Comments