[JIRA] (JENKINS-55596) PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)

2019-09-02 Thread hans.r...@seidenader.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Hans Redl commented on  JENKINS-55596  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)   
 

  
 
 
 
 

 
 Hi Denys Digtiar, thank you for your comment. Due the time I managed to catch the test results in a different way, to avoid this Start-Job command. However, I'll test your suggestions and come back to you, if the 64-bit Java was the solution.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.196762.1547549356000.5265.1567489560121%40Atlassian.JIRA.


[JIRA] (JENKINS-55596) PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)

2019-09-02 Thread ddigt...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Denys Digtiar commented on  JENKINS-55596  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)   
 

  
 
 
 
 

 
 It sounds like the agent might be running on the 32-bit Java, therefore when it launches the PowerShell process it uses the 32-bit PowerShell. However, based on the error, the PowerShell-Workflow requires a 64-bit PowerShell. Hence, the solution is probably to install the 64-bit Java and make sure that the agent uses it.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.196762.1547549356000.5239.1567484460118%40Atlassian.JIRA.


[JIRA] (JENKINS-55596) PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)

2019-01-15 Thread hans.r...@seidenader.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Hans Redl updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55596  
 
 
  PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)   
 

  
 
 
 
 

 
Change By: 
 Hans Redl  
 

  
 
 
 
 

 
 I want to execute a Job in Background and grab the test results after each test.If I execute the script from the powershell console, everything works as it should, but if I execute the same script from Jenkins, I don't receive anything. The only output I see is:(TRANSLATION){code:java}PS>TerminatingError(Import-Module): "The Windows PowerShell-Workflow won't be supported in an x86-based Windows PowerShell-Console. Open a x64-based Windows PowerShell-Console and try again."{code}(ORIGINAL-german){code:java}PS>TerminatingError(Import-Module): "Der Windows PowerShell-Workflow wird in einer x86-basierten Windows PowerShell-Konsole nicht unterstützt. Öffnen Sie eine x64-basierte Windows PowerShell-Konsole, und versuchen Sie es erneut."{code}The Jenkins function is as follows and will be executed for each unit test: The problematic code section is :  $testJob = Start-Job  \  {param($url, $timeout) Invoke-WebRequest $url -TimeoutSec 30 -Method Get} -Arg $urlTest, $script:testTimeout       {code:java}function InvokeTest ($hostName, $test) {    try {    $urlTest = "http://$hostName/WsTest/$test"    $testJob = Start-Job {param($url, $timeout) Invoke-WebRequest $url -TimeoutSec 30 -Method Get} -Arg $urlTest, $script:testTimeout    while (1) {    Start-Sleep -Seconds 2    if ($testJob.State -eq "Failed") {    $testExeStatus = "Test run aborted"    $ErrorMessage = $testJob.ChildJobs[0].JobStateInfo.Reason.Message    break    }    elseif ($testJob.State -eq "Completed") {    $testExeStatus = "Test run completed"    $testStatus = Receive-Job -Job $testJob    $testResult += $testStatus.Content    break    }    }    }    catch {    $testExeStatus = "Test run aborted"    $ErrorMessage = $_.Exception.Message    break    }    finally {    $testExeStatus    $testResult    }}  {code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

 

[JIRA] (JENKINS-55596) PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)

2019-01-15 Thread hans.r...@seidenader.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Hans Redl updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55596  
 
 
  PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)   
 

  
 
 
 
 

 
Change By: 
 Hans Redl  
 

  
 
 
 
 

 
 I want to execute a Job in Background and grab the test results after each test.If I execute the script from the powershell console, everything works as it should, but if I execute the same script from Jenkins, I don't receive anything. The only output I see is:(TRANSLATION){code:java}PS>TerminatingError(Import-Module): "The Windows PowerShell-Workflow won't be supported in an x86-based Windows PowerShell-Console. Open a x64-based Windows PowerShell-Console and try again."{code}(ORIGINAL-german){code:java}PS>TerminatingError(Import-Module): "Der Windows PowerShell-Workflow wird in einer x86-basierten Windows PowerShell-Konsole nicht unterstützt. Öffnen Sie eine x64-basierte Windows PowerShell-Konsole, und versuchen Sie es erneut."{code}The Jenkins function is as follows and will be executed for each unit test:  I marked the  The  problematic code section  in red (starting with  is :  $testJob  = Start-Job {param($url, $timeout ) .  Invoke-WebRequest $url -TimeoutSec 30 -Method Get} -Arg $urlTest, $script:testTimeout    {code:java}function InvokeTest ($hostName, $test) {    try {    $urlTest = "http://$hostName/WsTest/$test"    $testJob = Start-Job {param($url, $timeout) Invoke-WebRequest $url -TimeoutSec 30 -Method Get} -Arg $urlTest, $script:testTimeout    while (1) {    Start-Sleep -Seconds 2    if ($testJob.State -eq "Failed") {    $testExeStatus = "Test run aborted"    $ErrorMessage = $testJob.ChildJobs[0].JobStateInfo.Reason.Message    break    }    elseif ($testJob.State -eq "Completed") {    $testExeStatus = "Test run completed"    $testStatus = Receive-Job -Job $testJob    $testResult += $testStatus.Content    break    }    }    }    catch {    $testExeStatus = "Test run aborted"    $ErrorMessage = $_.Exception.Message    break    }    finally {    $testExeStatus    $testResult    }}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 
  

[JIRA] (JENKINS-55596) PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)

2019-01-15 Thread hans.r...@seidenader.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Hans Redl created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55596  
 
 
  PowerShell Plugin | Start-Job command creates TerminatingError(Import-Module)   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 powershell-plugin  
 
 
Created: 
 2019-01-15 10:49  
 
 
Environment: 
 Windows Server 2016 Standard, Jenkins 2.150.1, powershell plugin,  
 
 
Labels: 
 TerminatingError powershell  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Hans Redl  
 

  
 
 
 
 

 
 I want to execute a Job in Background and grab the test results after each test. If I execute the script from the powershell console, everything works as it should, but if I execute the same script from Jenkins, I don't receive anything. The only output I see is: (TRANSLATION) 

 

PS>TerminatingError(Import-Module): "The Windows PowerShell-Workflow won't be supported in an x86-based Windows PowerShell-Console. Open a x64-based Windows PowerShell-Console and try again."
 

 (ORIGINAL-german) 

 

PS>TerminatingError(Import-Module): "Der Windows PowerShell-Workflow wird in einer x86-basierten Windows PowerShell-Konsole nicht unterstützt. Öffnen Sie eine x64-basierte Windows PowerShell-Konsole, und versuchen