AngryCat_52750
Nov 27, 2013Nimbostratus
Powershell Error
We have a automated job to enable and disable a nodes in a pool.. i am using the ps1 from here - LINK
Passing the following params -
powershell.exe -noexit C:\Temp\icontrol\test.ps1 10.10.10.11 admin password pool_server 10.10.10.13:80 disable
powershell.exe -noexit C:\Temp\icontrol\test.ps1 10.10.10.11 admin password pool_server 10.10.10.13:80 enable
when running through the disabled, i get the following weird error,
Disabling Session Enabled State...
Waiting for current connections to drop to zero...
Current Connections: 0
Disabling Monitor State...
Exception calling "set_monitor_state" with "2" argument(s): "Client found respo
nse content type of 'text/html; charset=iso-8859-1', but expected 'text/xml'.
The request failed with the error message:
--
500 Internal Server Error
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
support@f5.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.
--."
At E:\icontrol\test.ps1:212 char:56
+ (Get-F5.iControl).LocalLBPoolMember.set_monitor_state <<<< ( (, $pool_name)
, $MemberMonitorStateAofA);
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
Write-Host : The OS handle's position is not what FileStream expected. Do not u
se a handle simultaneously in one FileStream and in Win32 code or another FileS
tream. This may cause data loss.
At E:\icontrol\test.ps1:100 char:17
+ Write-Host <<<< "Pool $pool_name, Member ${member_addr}:${member_port}
status:"
+ CategoryInfo : NotSpecified: (:) [Write-Host], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Comma
nds.WriteHostCommand
Write-Host : The OS handle's position is not what FileStream expected. Do not u
se a handle simultaneously in one FileStream and in Win32 code or another FileS
tream. This may cause data loss.
At E:\icontrol\test.ps1:101 char:17
+ Write-Host <<<< " Availability : $Availability"
+ CategoryInfo : NotSpecified: (:) [Write-Host], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Comma
nds.WriteHostCommand
Write-Host : The OS handle's position is not what FileStream expected. Do not u
se a handle simultaneously in one FileStream and in Win32 code or another FileS
tream. This may cause data loss.
At E:\icontrol\test.ps1:102 char:17
+ Write-Host <<<< " Enabled : $Enabled"
+ CategoryInfo : NotSpecified: (:) [Write-Host], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Comma
nds.WriteHostCommand
Write-Host : The OS handle's position is not what FileStream expected. Do not u
se a handle simultaneously in one FileStream and in Win32 code or another FileS
tream. This may cause data loss.
At E:\icontrol\test.ps1:103 char:17
+ Write-Host <<<< " Description : $Description"
+ CategoryInfo : NotSpecified: (:) [Write-Host], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Comma
nds.WriteHostCommand
the enable portion works just fine -
Setting Montior State to Enabled
Setting Session Enabled State to Enabled
Pool pool_server, Member 10.10.10.13:80 status:
Availability : AVAILABILITY_STATUS_BLUE
Enabled : ENABLED_STATUS_ENABLED
Description : Pool member does not have service checking enabled
Any ideas or clues anyone???