I've been working with the Azure Powershell scripts from Microsoft over the last new days and am becoming frustrated with how often they seem to fail silently or give very misleading error messages. I have tried using the -verbose option, but this isn't very verbose.
Does any have any tips of things I can try to beef up the feedback when something goes wrong?
For example: Save-AzureServiceProjectPackage is reporting that the cloud_package.cspkg is created but no file is created on disk. If I delete my node_modules folder it works correctly and reports the same thing!
I've raised this direct with the team, but it appears the problem is with cspack.exe which the powershell calls: https://github.com/Azure/azure-sdk-tools/issues/2689
I had similar problems.
What didn't work: to install the latest SDK for Azure (Libraries for .NET and Azure Powershell)
What did work: to shorten the longest directory path.
For instance, in your deepest subdirectories, you delete everything not needed. Or move your $DEV_ROOT directory to the drive's top level. It's not a nice solution though.
Related
Right now I again faced the issue that old code is used on an Azure Function App even after the zip deployment through KUDU returns success.
Of course, that is after some 30 mins that I expect the new code to get loaded, not immediately.
The issue is marked as closed.
What is considered to be the best practice in this case:
Programmatically force the Function App to restart, say, through Azure CLI or Powershell Az modules?
Or there is another way to mitigate the issue?
While restarting should fix it, my suggestion would be to enable "Run from package": https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package. That removes the chance of having old files running as the deployment is atomic.
You'd set an app setting of WEBSITE_RUN_FROM_PACKAGE to 1 and continue deploying the same way you are today. The site will be run directly from that package (wwwroot will appear as read-only in kudu) so there's no unzipping and copying, which may be causing the issue you're having.
Note: it looks like we're still tracking the issue here: https://github.com/Azure/azure-functions-host/issues/2636.
In my case the issue lay in the CI-CD pipelines, where an out-of-date artifact was being deployed - thus the successful deploy, but the old code.
I have a fully functional cloud service Worker Role that I have been using and debugging for a couple weeks now. I recently moved the solution into source control. I can build the solution still, but when I try to run it locally on the emulator to debug I get the error
Access to the path 'diagnostics.wadcfgx' is denied.
I have everything checked out to edit so I know it isn't a read only issue on the file. I can't figure out why this is happening or how to fix it.
My old version still runs locally on the emulator just fine. I have modified the projects in the solution and updated naming conventions of the roles and projects. My guess is that something was missed or a connection between the role project and the service project was lost... however I cannot figure out what it is.
Any ideas would be greatly appreciated.
My problem ended up being that one of the diagnostics.wadcfgx files was still marked as read only in the file system. The best solution was to remove the entire ECF folder from source control. When the project ran it recreated the directory and files needed.
I am publishing my node js site to azure using this tutorial - http://blogs.technet.com/b/sams_blog/archive/2014/11/14/azure-websites-deploy-node-js-website-using-visual-studio.aspx
I get the following error, as mentioned in one of the comments on the blog, any idea what this error is about and how do I fix this ? I am able to run my app locally no issues with that.
Error: InvalidParameter
Parameter name: index
P.s : the site is like a very basic "Hello world" kind of site, this is the first time I am using and deploying to azure too.
I created a new project as a "Blank Azure Node.js web application", and replaced the resulting package.json and .js files with what I had before, and it publishes fine now
All was working fine for and suddenly got the error! I pretty sure it something in the project as it's now happening on vs2013 and vs2015 on different computers.
Its something to do with Templates after a lot of searching. For me Azure TFS CI got things working again if possible for you?
I had this issue with some projects but not with others, all created in a similar way. So I went thought every change and every setting I could until eventually i worked it out. I didn't want to give up and just remake them.
Basically its file paths, the first thing you notice is that it errors very quickly compared to a usual publish, the first thing that is triggered is a build but unlike heavy framework languages there not really much to actually build.
Like all builds for VS it pops out a bin folder take not of where this appears. This is the key, you want this to appear in the root of your deployment usually at the same level as the publish profile.
Before I moved my projects to VS, TFS and Azure, I used to use git and used the azure push and deployment as part of git, so I instinctively structured my folders in the similar fashion with src folder and all the extra VS baggage in the a directory higher.
This is where I noticed bin folder, so re-structured my solution and made changes to .njsproj (notepad) and moved to be inline with source code and re-added it yo my solution.
Technically speaking this a bug within VS as it allows to create the project and specify different locations which is all fine unless you want to build and publish locally.
Once you get your head around what is going on you should be able to solve this problem easily and not make the same mistake in the future. If anyone is still confused comment and ill grab some screen shots.
I have recently upgraded to the new Azure SDK (September 2011 v 1.5).
Ever since I have not been able to start the compute emulator. Consequently I can't debug the services on my local machine.
I have seen a suggestion that the problem lies with the fact that my user account has a space in it, so I renamed my account but that didn't make any difference. It may be that the problem is that my user profile path has a space in it. Changing the account name has no effect no the profile path.
On the msdn forums it was suggested that I remove *:808 binding in IIS Manager for Default Website. See MSDN Forums
Anyone have any other ideas?
Another option:
So, given the "rename your user account/regedit doesn't work for you, you may want to look at this MSDN article, which suggests you can just set an environment variable and run the emulator without mucking with the registry... not sure if setting the environment variable globally would let you run automatically within VS.NET without manually starting up the emulator the first time, but it is certainly easier.
Yes, the space(s) in your profile path are the issue, and this appears to be a regression for a bug that was found in a previous version of the emulator (the only reason I even thought to try logging in with a different account in the first place). I was literally just putting together a quick blog post here describing the same issue. You'll need to do some registry editing to fix all the references to your old profile path if you want to fix it, or just create a new user if you can deal with re-installing software (I love the Web Platform Installer, but I found out during this exercise that it doesn't do a good job installing for "all users").
I'm having a problem creating a package for a web role that totals up to 380 megabytes on disk. I can get CSPack to run fine when specifying the /copyOnly flag, but as soon as I try to create the actual package file I get an OutOfMemoryException. The problem started after I added around 350 megabytes of static content to the web role project.
I've already found a similar question here on Stack Overflow, but even with all the content set to "Do Not Copy," I still get the same issue with CSPack crashing. Just to verify that the static content is what is causing an issue, I excluded it from my project in Visual Studio and CSPack ran fine from the command line.
Here's the command I'm executing from cmd.exe:
"C:\Program Files\Windows Azure SDK\v1.4\bin\cspack"
BizBlimp.Azure\ServiceDefinition.csdef /role:BizBlimp;Build\BizBlimp
/role:BizBlimp.QueueWorker;Build\BizBlimp.QueueWorker;Biz
Blimp.QueueWorker.dll /sites:BizBlimp;Web;Build\BizBlimp /rolePropertiesFile:Biz
Blimp;properties.txt /rolePropertiesFile:BizBlimp.QueueWorker;properties.txt /ou
t:Build\BizBlimp.Azure.cpkg
And here's my project file for my web role: https://gist.github.com/88e776bb611cf6a8521e
I've been banging my head up against this problem for the last couple work days, so any help would be greatly appreciated.
Edit: Link to the same issue on the Microsoft Azure Forums. Looks like this is gaining some attention from an MSFT employee.
That is quite a lot of static content. Every time you update your application you'll have to upload that 350mb of stuff. Have you considered storing the static content in blob storage? It looks like most of it is images and would sit quite nicely there. I'm sorry this doesn't solve your crash issue, but it will probably make your life easier in the long run.