Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't generate certificates using dev-certs in devops ubuntu-22.04 and 24.04 agents #10815

Closed
3 of 15 tasks
kicr1 opened this issue Oct 18, 2024 · 5 comments
Closed
3 of 15 tasks

Comments

@kicr1
Copy link

kicr1 commented Oct 18, 2024

Description

My pipeline has a step that generates a certificate which is used by a later task. This has been working fine for months with no failures but since yesterday I have started seeing intermittent failures and as of this evening (18th October) this task fails every time the pipeline runs.

The script I am running is:
dotnet dev-certs https -ep $(Build.SourcesDirectory)/.aspnet/https/aspnetapp.pfx -p xxxxxxx

I have tried this on all ms-hosted ubuntu agent images available and I have found that it works fine on Image: ubuntu-20.04.
But does not work on Image: ubuntu-24.04 or Image: ubuntu-22.04

I have now had to revert to using ubuntu-20.04 to unblock the pipeline.

We have been using ubuntu-latest with no issues until now.

Please can you investigate on what has changed to cause this issue to start happening?

Many thanks

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Current agent version: '3.246.0'
Operating System
Ubuntu
22.04.5
LTS
Runner Image
Image: ubuntu-22.04
Version: 20241015.1.0

Is it regression?

Current agent version: '3.246.0' Operating System Ubuntu 22.04.5 LTS Runner Image Image: ubuntu-22.04 Version: 20241006.1.0

Expected behavior

Task to generate certificate using dev-certs should run as expected and not error.

Actual behavior

The certificate creation fails with the following error message (debug content included):

##[debug]script=dotnet dev-certs https -ep /home/vsts/work/1/s/.aspnet/https/aspnetapp.pfx -p xxxxxxxxx
##[debug]workingDirectory=/home/vsts/work/1/s
##[debug]check path : /home/vsts/work/1/s
Generating script.
##[debug]Agent.Version=3.246.0
##[debug]agent.tempDirectory=/home/vsts/work/_temp
##[debug]check path : /home/vsts/work/_temp
Script contents:
dotnet dev-certs https -ep /home/vsts/work/1/s/.aspnet/https/aspnetapp.pfx -p password
========================== Starting Command Output ===========================
##[debug]which ‘bash’
##[debug]found: ‘/usr/bin/bash’
##[debug]which ‘/usr/bin/bash’
##[debug]found: ‘/usr/bin/bash’
##[debug]/usr/bin/bash arg: --noprofile
##[debug]/usr/bin/bash arg: --norc
##[debug]/usr/bin/bash arg: /home/vsts/work/_temp/f63661a1-9976-43ca-85c2-071f253bac65.sh
##[debug]exec tool: /usr/bin/bash
##[debug]arguments:
##[debug] --noprofile
##[debug] --norc
##[debug] /home/vsts/work/_temp/f63661a1-9976-43ca-85c2-071f253bac65.sh
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/f63661a1-9976-43ca-85c2-071f253bac65.sh

There was an error exporting the HTTPS developer certificate to a file.

##[debug]Exit code 3 received from tool ‘/usr/bin/bash’
##[debug]STDIO streams have closed for tool ‘/usr/bin/bash’
##[error]Bash exited with code ‘3’.
##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=ebb46927-2edb-4725-8910-d9c7c92d24fa;]Bash exited with code ‘3’.
##[debug]task result: Failed
##[debug]Processed: ##vso[task.complete result=Failed;done=true;]
Finishing: Create aspnet developer certificate

Repro steps

Step 1: Set up a pipeline using ubuntu-latest or ubuntu-24.04 agent
Step 2: Create a script task.

- script: |
     dotnet dev-certs https -ep $(Build.SourcesDirectory)/.aspnet/https/aspnetapp.pfx -p xxxxxxx

Step 3: Run pipeline

@kishorekumar-anchala
Copy link
Contributor

Hi @kicr1 ,

Thanks for raising the issue with us , we will update on this once investigation completes.

@thommaa
Copy link

thommaa commented Oct 22, 2024

This is most likely related to the dotnet sdk version 8.0.403 having these two issues
dotnet/aspnetcore#58330
dotnet/aspnetcore#58337

@kishorekumar-anchala
Copy link
Contributor

Hi @thommaa thanks for your comments.

@kicr1 - i agree with @thommaa , this issue not related to runner images . I request kindly raise an issue with aspnetcore team. Thank you !

@kicr1
Copy link
Author

kicr1 commented Oct 22, 2024

Thanks for alerting me to this. I looked at both issues and the top one was the one causing my problem. I have since updated the pipeline to create the folder beforehand and it works again using the ubuntu-latest image. Thanks again

@kishorekumar-anchala
Copy link
Contributor

Thank you @kicr1 for your update , hence we're closing this issue as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants