You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error in Get-RabbitMQMessage.ps1 line 131 (the REST call):
"You must write ContentLength bytes to the request stream before calling [Begin]GetResponse."
The weird thing is that I'm getting this error always when I run this as a scheduled task (we use JAMS Scheduler in the shop). When I run it from ISE, mostly it runs fine but from time to time I get the same error. I cannot find a factor that causes it persistantly (e.g. when the queue is empty, or not empty etc etc).
My code is pretty vanilla:
# I need this when running as a scheduled task otherwise I get a different error
# Unable to find type [System.Web.HttpUtility]
Add-Type -AssemblyName System.Web
[string]$url = 'https://localhost:8443/'
[string]$vhost = 'myvhost'
[string]$queue = 'myqueue'
[int]$maxMessageBatch = 10
$queueContent = Get-RabbitMQMessage -Name $queue -VirtualHost $vhost -BaseUri $url -Count $maxMessageBatch
Any ideas?
The text was updated successfully, but these errors were encountered:
Hi
I'm getting this error in Get-RabbitMQMessage.ps1 line 131 (the REST call):
"You must write ContentLength bytes to the request stream before calling [Begin]GetResponse."
The weird thing is that I'm getting this error always when I run this as a scheduled task (we use JAMS Scheduler in the shop). When I run it from ISE, mostly it runs fine but from time to time I get the same error. I cannot find a factor that causes it persistantly (e.g. when the queue is empty, or not empty etc etc).
My code is pretty vanilla:
Any ideas?
The text was updated successfully, but these errors were encountered: