I've recently setup a new build configuration in Teamcity to create an Cloud Services package for Azure. After building the project with msbuild, i'm calling cspack.exe (Azure SDK 2.2) to create the package.
This is the command i'm using:
cspack.exe "ServiceDefinition.csdef"
"/out:%Package.RelativePath%package.cspkg"
"/role:MyWebRole;%teamcity.build.checkoutDir%\t\%build.number%;bin\MyProject.Web.dll"
"/sites:MyWebRole;MyWebSite;%teamcity.build.checkoutDir%\t\%build.number%"
This creates a cspkg which seems correct. I've uploaded this package to the Azure storage and executed an update of the webrole. But after a while it shows an error while executing that startup tasks. After that comes an loop of restarting the webrole.
While searching for a possible cause, i've noticed that one of the directories in my approot contains a space in my original project, but in the package encoded to %20. After changing the directory name to the original name and updating the webrole again the issues disappeared.
Is anyone familiar with this issue and can point me in the right direction of solving this?
The %20 only goes into the package, but not when deployed. Did you RDP to the Cloud Service Role to check whether the folder name is with the %20 or not? Because it seems, the %20 is only added to the package, but removed when unzipped. So your issue with restarting might be something else.
And by the way, the same applies for all non-URI characters, including Unicode characters that should go into the package. Which is imposed by the Open Packaging Conventions.
Related
I was trying to deploy my web app to a web app service I created in Azure services portal. I was doing it through Visual Studio Code with the help of Azure extensions (idk if that's important to mention or no). I got this error:
"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters"
Unfortunately, I can not change file names or move the project to a different folder. What can I do to fix this issue? Thanks in advance :)
Please check if the below steps help to fix the issue:
If it is Node JS Web App, delete the folder called node_modules within the project folder. Reload the solution > Rebuild and publish to the Azure. In the Azure Portal > Web App > Console - run the command npm install which adds the dependencies within that project with the folder called node_modules.
If possible, try to move your projects/solutions to the root directory or to the short directory path.
According to this similar issue reported in the GitHub Repo-Azure Web App, you can include a setting in publish profile file like:
<PublishTempFolderName>i2</PublishTempFolderName>
Check that reference when using the above setting, some global settings need to be applied given on the GitHub Repo
(OR) Enable the policy state of Enable NTFS long paths in the Local Group Policy Editor and check once.
High level overivew of the steps involved:
Use MSDeploy to create a deployment package
Edit the contents of the zip package and then repackage it
Deploy to a remote server fails as the values in the systeminfo.xml are different to what it expects i.e. the list of <installedComponentInfo> must be different from the source to the destination server. If I manually edit the xml and remove all the <installedComponentInfo> re-zip the package and try again it works fine.
So can I tell MSDeploy to ignore the systeminfo.xml file when it does the deploy step above or any other suggestions around the <installedComponentInfo>?
The error is:
Warning: Skipping source dirPath (c:\blah\blah\Package) because of rule SkipInvalidSource.
The Zip package 'c:\blah\blah\Package\MyPackage.zip' could not be loaded.
And nothing gets deployed to the remote IIS server.
I have done several searches on this so any answers on why the systeminfo.xml is causing an issue or more importantly a workaround to ignore it please?
Thanks in advance.
Try disabling the SkipInvalidSource rule.
msdeploy -verb:sync -source:webServer -dest:webServer,computerName=Server2 -disableRule:SkipInvalidSource
I am curious why you are manually editing the package. You can use MSBuild to customize the package or create a custom package yourself using MSDeploy.exe directly.
http://www.dotnetcatch.com/2016/05/19/extending-the-webdeploy-manifest/
https://technet.microsoft.com/en-us/library/dd569019(v=ws.10).aspx
I am trying to install a package (oForms) with a new Orchard 1.8 installation, but receiving the following error:
"Package installation failed: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders."
This seemed rather straightforward, however my host has confirmed permissions are fine (and even added Everyone/Full Control to the folder), so I'm lost and appears to be happening with all modules from the Gallery, not just oForms. I changed the Config/log4net.config file to log everything, and I don't see anything specific in there except where it logs the same message above. Nothing outside of that stands out at all.
Is there a way to see why this is failing? Or, if not, is there a way to get the module and install it manually? I tried to download from the gallery, but it's just a NuGet package so I'm not sure how to take that and grab the raw module files.
You can use a program like 7zip to unzip the nuget package, then copy in the module manually yourself.
As for the permissions, when adding a new permission to the folder use:
IIS AppPool\name of your application pool
I also had this exact error message when installing modules from the gallery, and it took me a while to figure out what was happening. I made new installations, copying over files one-by-one, and eventually found the culprit. For my case anyways...
For me, it was all due to a bad formatting in my custom Theme. Specifically the Theme.txt file. The line where is says Version:, I had it formatted without any "."
Good:
Version: 1.0
BAD:
Version: 1
Yes, doing this simple mistake prevented me from installing Modules.
In my code (which has worker role) I need to specify a path to a directory (third party library requires it). Locally I've included folder into project and just give full path to it. However after deployment of course I need a new path. How do I confirm that whole folder has been deployed and how do I determine a new path to it?
Edit:
I added folder to the role node in visual studio and accessed it like this: Path.Combine(Environment.GetEnvironmentVariable("RoleRoot"), "my_folder");
Will this directory be used for reading and writing? If yes, you should use a LocalStorage resource. https://azure.microsoft.com/en-us/documentation/articles/cloud-services-configure-local-storage-resources/ shows how to use this.
If the directory is only for reading (ie. you have binaries or config files there), then you can use the %RoleRoot% environment variable to identify the path where your package was deployed to, then just append whatever folder you refernced in your project (ie. %RoleRoot%\Myfiles).
I'd take a slightly different approach. Place the 3rd party package into Windows Azure blob storage, then during role startup, you can download/extract it and place the files into the available Local storage (giving it whatever permissions the app needs). Then leverage that location from your application via the same local storage configuration entry.
This should help you reduce the size of your deployment package as well as give you the ability to update the 3rd party components without completely redeploying your solution. And by leveraging it on startup, you can guarantee that the files will be there in case the role instance gets torn down and rebuilt.
I installed Joomla on a website on Windows Azure. After trying to update the Joomla version or uploading a new template I get the following error
JFolder::create: Could not create directory
Warning: Failed to move file!
For me it's clear that the problem is regarding permissions, so the question is, how can it be solved?
Since the Azure architecture (basically the replication) makes you difficult to just change the permissions of the folders, and it is not possible to modify the folder permissions on a Windows server using FTP, I feel like I'm on a dead end.
It should definitely be possible. When installing a component JFolder::create is called several times.
I think that you are passing a wrong path or something to the actual call. Have you tried a simple test using the native mkdir()?