Open mickeygousset opened 4 years ago
@mickeygousset was this a timing issue? I remember when taking this course it'd take a little time for the app to be deployed. Assuming everything's still up and running, does it work now?
If it does turn out to be a timing issue, we can fix this issue by adding a note about waiting.
@hectorsector No its not a timing issue. You can see that it is still not working, even after sitting for 24 hours.: https://mickeygousset-ttt-app.azurewebsites.net/
I had the same thing happen to me three times when testing the lab yesterday, so I don't think it was user error. But I haven't tried to dive into what the problem might be yet. I can do that today, to see if I can troubleshoot (with my limited container knowledge). 👍
Looks like some sort of auth issue, based off some logs I could find quickly in Azure. I'm not authenticating to GitHub Package services or something like that. I'll look into it after lunch (when I'm free) and see what I can determine.
2020_07_31_RD0003FF9A53BC_docker.log: 2020-07-31T13:56:01.202Z INFO - Pulling image: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:56:01.890Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."}
2020-07-31T13:56:01.890Z ERROR - Pulling docker image docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 failed: 2020-07-31T13:56:01.890Z INFO - Pulling image from Docker hub: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:56:02.018Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://docker.pkg.github.com/v2/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt/manifests/a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3: no basic auth credentials"}
2020-07-31T13:56:02.026Z ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository) 2020-07-31T13:56:02.068Z INFO - Stopping site mickeygousset-ttt-app because it failed during startup. 2020-07-31T13:56:04.949Z INFO - Pulling image: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:56:05.232Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."}
2020-07-31T13:56:05.232Z ERROR - Pulling docker image docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 failed: 2020-07-31T13:56:05.232Z INFO - Pulling image from Docker hub: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:56:05.369Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://docker.pkg.github.com/v2/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt/manifests/a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3: no basic auth credentials"}
2020-07-31T13:56:05.377Z ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository) 2020-07-31T13:56:05.399Z INFO - Stopping site mickeygousset-ttt-app because it failed during startup. 2020-07-31T13:58:39.351Z INFO - Pulling image: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:58:39.730Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."}
2020-07-31T13:58:39.731Z ERROR - Pulling docker image docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 failed: 2020-07-31T13:58:39.731Z INFO - Pulling image from Docker hub: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:58:39.858Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://docker.pkg.github.com/v2/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt/manifests/a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3: no basic auth credentials"}
2020-07-31T13:58:39.860Z ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository) 2020-07-31T13:58:39.862Z INFO - Stopping site mickeygousset-ttt-app because it failed during startup. 2020-07-31T13:58:41.125Z INFO - Pulling image: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:58:41.404Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."}
2020-07-31T13:58:41.405Z ERROR - Pulling docker image docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 failed: 2020-07-31T13:58:41.405Z INFO - Pulling image from Docker hub: docker.pkg.github.com/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt:a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3 2020-07-31T13:58:41.524Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://docker.pkg.github.com/v2/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt/manifests/a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3: no basic auth credentials"}
2020-07-31T13:58:41.525Z ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository) 2020-07-31T13:58:41.529Z INFO - Stopping site mickeygousset-ttt-app because it failed during startup.
@lmkeston since you've been taking this course a lot lately, are you seeing the same thing?
@hectorsector I think this is because the deployment to prod step isn't actually functioning properly. on Step 9 in the final PR, the copy/paste code sample still has the label "stage" specified: This is confusing. We should probably have a "prod" label ready and update this code accordingly. Either way, because we don't have a follow-on step in which we apply the label, the action runs but skips all the steps as shown below: Therefore, I don't think the app is ever deployed.
I opened https://github.com/githubtraining/continuous-delivery-azure/pull/33 to address the issue ☝️, but I don't think that's @mickeygousset's issue.
My app also isn't running and I get the same error, although I do not have the Package token errors anywhere.
Looks like some sort of auth issue, based off some logs I could find quickly in Azure. I'm not authenticating to GitHub Package services or something like that. I'll look into it after lunch (when I'm free) and see what I can determine.
@mickeygousset could you share where you're seeing these logs? Going to try and replicate.
I opened #33 to address the issue ☝️, but I don't think that's @mickeygousset's issue.
Yeah, that was a red herring... I'm getting the same issue when running the latest deployment from #33. @mattdavis0351 can you assist? it looks like it might be a docker issue.
Image pull failed: Verify docker image configuration and credentials (if using private repository)
@lmkeston @hectorsector @mickeygousset This is the problem.
Azure is unable to authenticate back to GitHub to properly pull the container.
DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://docker.pkg.github.com/v2/mickeygousset/github-actions-continuous-delivery-azure/mickeygousset-azure-ttt/manifests/a1636b691f5b7f72bf23e2ccdbd14fb1798b63f3: no basic auth credentials"}
We can also see that here in this error. So either the GITHUB_TOKEN
is no longer able to be used with Azure, or the step that configures GitHub Packages did not succeed properly
if: success()
run: |
az webapp config container set --docker-custom-image-name nginx --docker-registry-server-password
${{secrets.GITHUB_TOKEN}} --docker-registry-server-url https://docker.pkg.github.com --docker-registry-server-user
${{github.actor}} --name ${{ env.AZURE_WEBAPP_NAME }} --resource-group ${{ env.AZURE_RESOURCE_GROUP }} --
subscription ${{secrets.AZURE_SUBSCRIPTION_ID}}
Azure will reflect a successful deployment even if they didn't pull the container properly. I fought this same bug for days and that's why this workflow step was created. I'm wondering if something with the token or the communication between Azure and GH has changed
@mickeygousset Just to close the loop on this. It has everything to do with the GITHUB_TOKEN
being ephemeral. If you scope a new Personal Access Token on GitHub and add set it as the password on the Azure container settings for your project everything will work just fine.
We are making those changes to the course now. This was a great catch!
WooT! Let me know once the course is updated and I'll run the whole thing again.
Took care of it in #34. @mickeygousset or @lmkeston if one of you can test out the new version of the course I can merge with one 👍
@hectorsector I'll run it again in the morning and report back.
@hectorsector @mickeygousset Any updates? Error still occur, I got the same error today. I wrote little suggestion in #34
@bpelikan Looks like the PR to fix this hasn't been approved yet. Your suggestion on #34 is also a valid solution, and probably a good direction to consider going, but my thoughts are to get what we have working and then update it.
I'll follow up with @lmkeston @hectorsector this week and see what we can do to move this forward, after we get past GitHub Universe. Please feel free to continue to ping me. :)
Describe the bug When I navigate to.azurewebsites.net after doing either a staging or a production deployment, the website throws an error.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expected the Tic Tac Toe game to run
Screenshots
Desktop (please complete the following information):