Open mvromer opened 6 months ago
I am having this issue too, this is my inlineScript:
inlineScript: |
echo "* Starting proxy"
az connectedk8s proxy --name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --port 8001
PID=$!
echo "* Proxy started with PID $PID"
# some deploy code
echo "* Stopping proxy with PID $PID"
kill $PID
I have also tried kill -9 $PID, no luck.
Hi Team,
Even I am Facing Similar Issue https://github.com/microsoft/azure-pipelines-tasks/issues/19844,
The STDIO streams did not close within 10 seconds of the exit event from process '/usr/bin/bash'. This may indicate a child process inherited the STDIO streams and has not yet exited.
In my Use Case I am Running a python Script from my azure pipeline which Internally Calls A python Script to Return Some Value which takes some 5 mins but during this Call, I am Facing this
I Have Already Tried adding this timeoutInMinutes: 30 as well
So Do we Have Any Resolution on this or any Workaround also is fine.
Please Drop A suggestion
Thank you.
I am also facing the same exact issue
New issue checklist
Task name
AzureCLI
Task version
2.238.5
Issue Description
For context, I have a pipeline where I want to run my web server locally in a background process and subsequently run a set of integration tests against my server so that I can gather coverage data. My server needs to authenticate with Azure so it can access different Azure resources, so I originally had an AzureCLI@2 task in my pipeline that authenticated with Azure and launched via Bash my server as a background process.
The problem is my pipeline always hung on the AzureCLI task. After a lot of trial and error, I learned that something in the AzureCLI task's implementation was causing the hang to occur when the task executed a script that launched a background process. If I run the same script via a Bash@3 task, the pipeline can successfully launch the background process and proceed to the next step in the pipeline, although my server at that point is no longer authenticated to Azure.
As a workaround I can use the AzureCLI task to authenticate with Azure and then write the service principal credentials as secret pipeline variables. A subsequent step can run the Bash task to read in those secret values and forward them to my server, which is then launched in the background successfully. That said, I would have expected the same Bash script to whether it was executed by the Bash task or the AzureCLI task.
I've built a public repo on Azure DevOps that contains a pipeline demonstrating this behavior. The pipeline's YAML is here. It contains three jobs, each containing steps that attempt to launch a simple background process (in this case, a local HTTP server). The first job launches via the Bash task, the second via the AzureCLI task, and the third demonstrates the workaround described above. An example of the pipeline's output can be found here.
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
windows-latest, ubuntu-latest
Relevant log output
Full task logs with system.debug enabled
Repro steps