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

PackageDepoyer throwing and recording error but not behaving as expected. #14

Open
jrbirdmanFA opened this issue Jun 27, 2017 · 3 comments

Comments

@jrbirdmanFA
Copy link

Here's one for you. Until about a week ago, the PackageDeployer was executing fine (and a great tool it is when it works). Then it started reacting to errors badly. Instead of renaming the update to .error_, it was renaming it to .json (as if it was successful) but with a status of "Fail" not "Success".

The (obfuscated) details are in the related files...

The resulting json file looks like....
The json file, XXXXXXX.Feature.Accounts.Master_20170626_1544.files.json, contains:
{"Status":"Fail","ServerName":"STAGESITECORECM","DeployHistoryPath":"C:\inetpub\sites\SitecoreB\Website\temp\__Upgrade\Upgrade_20170626T202219293"}

The related Install.log ends with:
Post step execution failed
System.Exception: Error while opening file 'C:\inetpub\sites\SitecoreB\Data\SitecorePackageDeployer\XXXXXXX.Feature.Accounts.Master_20170626_1544.files.update' ---> System.IO.FileNotFoundException: Could not find file 'C:\inetpub\sites\SitecoreB\Data\SitecorePackageDeployer\XXXXXXX.Feature.Accounts.Master_20170626_1544.files.update'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Sitecore.Zip.ZipReader..ctor(String filename, Encoding encoding)
--- End of inner exception stack trace ---
at Sitecore.Zip.ZipReader..ctor(String filename, Encoding encoding)
at Sitecore.Install.Zip.PackageReader.Populate(ISink`1 sink)
at Sitecore.Update.UpdateHelper.LoadMetadata(String packagePath)
at Hhogdev.SitecorePackageDeployer.Tasks.InstallPackage.ExecutePostSteps(InstallLogger installLogger, PostStepDetails postStepDetails) in C:\Git\SitecorePackageDeployer\SitecorePackageDeployer\Tasks\InstallPackage.cs:line 373

The related InstallationHistory.txt file is:
INFO:Installing package: C:\inetpub\sites\SitecoreB\Data\SitecorePackageDeployer\XXXXXXX.Feature.Accounts.Master_20170626_1544.files.update
INFO:Installation Mode: Install
INFO:Installation of package 'C:\inetpub\sites\SitecoreB\Data\SitecorePackageDeployer\XXXXXXX.Feature.Accounts.Master_20170626_1544.files.update' has been finished.

There's nothing in the messages.xml file and the rollbackPackage.rlb file is 0 length.

The changes we've made since this started failing are based on preparing for the site launch -- tightening up security and performance based on Sitecore's published recommendations, cleaning up code and the few remaining bugs, etc.

Any ideas?

@cturano
Copy link
Contributor

cturano commented Jun 27, 2017

Hi,
Creating the .json file with the failure code in it is the correct behavior. Looking at your stack traces, I suspect the error is with permissions. It seems the job can see the file, but it can't open it. I think it is odd that the .json file can be created and the update package can be removed, but it can't seem to read it. There may be a configuration error in another folder.
There are a few things I would look into.

  1. Use the update installation wizard to install the package manually. This will tell you if there is something preventing the API form working correctly.
  2. Try to reproduce the problem in a lower (non-production) environment. You may want to apply the security steps a little at a time to see which one causes the issue. I suspect there is an issue with file permissions somewhere, but this is a guess.

The ZipReader API may create a temp file/folder somewhere to process the update package, since the update packages usually contain a single zipped package.

Charlie

@jrbirdmanFA
Copy link
Author

jrbirdmanFA commented Jun 27, 2017

Thanks Charlie,

What's the difference between renaming the update file .error_ vs creating the json file with "Status: Fail"?

I forgot to mention that if I redrop the update back in the SitecorePackageDeployer folder, it works fine. Go figure.

@cturano
Copy link
Contributor

cturano commented Jun 27, 2017

The .error_ file is typically for broken packages. The .json file is created if it gets to the post step installation process, which is what the stack trace shows.
One thing you may want to check. See if there are more than one instance of Sitecore or w3wp.exe using the same data folder. This problem could be caused by two or more instances of Sitecore trying to install the package at the same time and one is renaming or moving the package while the other is looking for it.

Charlie

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

No branches or pull requests

2 participants