Any new Azure AppService failed deployment source LocalGit with error /opt/Kudu/KuduConsole/node_modules/.bin/kuduscript: No such file or directory
thohng opened this issue · comments
I create few new Azure App Services today, all of them are failed deployment (deploy published binary, not deploy source code) when switch source to LocalGit. It just happened today, it is different with the result yesterday. And it make us cancel all the deployments in today, because I dont want to switch to FTP source this time.
Got error:
/opt/Kudu/KuduConsole/Scripts/starter.sh: line 2:
/opt/Kudu/KuduConsole/node_modules/.bin/kuduscript:
No such file or directory
Repro steps.
1- Create any new App Service (Create new Web App) (new or same App Service Plan)
Any zone: East US 2 or Southest Asia
Publish: Code
Stack NET5
OS: Linux
2- Set Deployment slot settings
SCM_DO_BUILD_DURING_DEPLOYMENT=FALSE
3- Deployment Center:
Create new user scope (username, password)
Switch source to: LocalGit
4- Clone git, prepare repository structure (.gitignore, .gitattributes, README.md) and place the published binary.
(We assume that we know how to check git push success or not, dont need to ask try again like this: https://github.com/projectkudu/kudu/wiki/Make-sure-all-your-files-are-committed)
5- Commit git, and push commit to remote (Azure LocalGit e.g. https://user@reposweb.scm.azurewebsites.net/reposweb.git )
Project structures.
No, published binary .NET5
The log/error given by the failure.
Output during push commit:
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 16 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 2.49 KiB | 2.49 MiB/s, done.
Total 10 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Deploy Async
remote: Updating branch 'master'.
remote: Updating submodules.
remote: Preparing deployment for commit id '06d6ec2aee'.
remote: Generating deployment script.
remote: /opt/Kudu/KuduConsole/Scripts/starter.sh: line 2: /opt/Kudu/KuduConsole/node_modules/.bin/kuduscript: No such file or directory
remote: Deployment Logs : 'https://<reposweb>.scm.azurewebsites.net/jsonviewer?view_url=/api/deployments/06d6ec2aeef6a9e3447903f7a0d87f90cb4d47cd/log'
To https://<reposweb>.scm.azurewebsites.net/<reposweb>.git
* [new branch] master -> master
Debug your Azure website remotely.
On SSH session, only 1 file: hostingstart.html
Mention any other details that might be useful.
Try add Deployment Slot on existing App Service still got same issue.
Thank you very much!
Finally, found out the workaround
Status when Deploy with LocalGit failed:
- only file
hostingstart.html
on the~/site/wwwroot
- Push commit still got error:
/opt/Kudu/KuduConsole/node_modules/.bin/kuduscript: No such file or directory
- KuduLite console status failed
Workaround by redeploy commit again
- Make sure
Configuration / General settings / Startup Command
is still empty
- Navigate to
Deployment Center / Logs
click on the latest commit
- Click Redeploy
- If you success summit redeploy (no hang, no failed result), then it will be success redeploy, you can see the content is update on
~/site/wwwroot
- Then it is ready now for you to push commit to LocalGit and deploy.