The installer has encountered an unexpected error installing this package - .Error code 2896

我的未来我决定 提交于 2019-12-20 07:29:14

问题


I am currently trying to install ravendb on a prod server. The licens file I am using, is the same being used for another test/prod server.

The installation seem to chrash all the time when i pass the license file to the installation.

Something i found interesting in the log file was this.

Action start 08:14:02: OpenLicenseFileChooser.
MSI (c) (AC:A8) [08:14:02:763]: Invoking remote custom action. DLL: C:\Users\prod\AppData\Local\Temp\MSI7901.tmp, Entrypoint: OpenLicenseFileChooser
MSI (c) (AC!30) [08:14:04:934]: PROPERTY CHANGE: Adding RAVEN_LICENSE_FILE_PATH property. Its value is 'C:\license.xml'.
Action ended 08:14:04: OpenLicenseFileChooser. Return value 1.
MSI (c) (AC:F0) [08:14:04:950]: Doing action: LicenseFileExists
Action 08:14:04: LicenseFileExists. 
Action start 08:14:04: LicenseFileExists.
MSI (c) (AC:20) [08:14:04:997]: Invoking remote custom action. DLL: C:\Users\prod\AppData\Local\Temp\MSI81BD.tmp, Entrypoint: LicenseFileExists
MSI (c) (AC!FC) [08:14:05:231]: PROPERTY CHANGE: Deleting RAVEN_LICENSE_VALID property. Its current value is 'False'.
MSI (c) (AC!FC) [08:14:05:231]: PROPERTY CHANGE: Adding RAVEN_INSTALLER_INFO property. Its value is 'Checking existing license file'.
Action ended 08:14:07: LicenseFileExists. Return value 3.
DEBUG: Error 2896:  Executing action LicenseFileExists failed.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: LicenseFileExists, , 
Action ended 08:14:07: WelcomeDlg. Return value 3.
MSI (c) (AC:1C) [08:14:07:281]: Doing action: CustomFatalError
Action 08:14:07: CustomFatalError. 
Action start 08:14:07: CustomFatalError.

The path to the license file is correct, so why does it fail?

Is there some limitation on the number of test/prod server that can use the license file, and if so, how do i check the number of servers that may use this license file?

And if that is not the case, are there any dependencies i am missing? - Does it need acess to the internet? - does it need something else installed?

besides this I also noticed this line

The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: LicenseFileExists, ,

what could this indicate?


回答1:


Licensing: I bet this is something very simple - a licensing issue like you propose. I would agree with Vadim that you should put the license.xml somewhere else - with write access. Maybe just create a new folder called RavenDBLicense - somewhere - and make sure it is writeable for system and administrators - at the very least. For example c:\RavenDBLicense - just for testing.

Is there anything machine-specific or user-specific in that license.xml file?


UPDATE: I see you have gotten an answer on their forum, indicating this solution: https://ravendb.net/docs/article-page/3.5/csharp/server/configuration/license-registration.

There is also a section on how to run the installer - that I assume you are familar with.


Debugging: Maybe the best thing to try first is to maximize the available logging information - if possible. I would try both approaches to see if I could find any better clues as to what is going on.

Event Viewer: I suppose you might want to check if there are any error messages logged in the Windows Event Viewer? Hold down Windows Key, tap R, type in eventvwr.msc and press enter. Go to Windows Logs => Applications. Look for MsiInstaller events. I don't think you will find anything, but it is worth a look. Also look for other events related to ravendb. Check the other logs too (Security, System, Configuration).

Advanced Logging: You can also turn on advanced logging and capture more debugging information for the MSI installation like this:

msiexec.exe /i MySetup.msi /L*vx C:\Test.log

This should capture a little bit more information than your current log. You can also add ! to the log switch, making it /L*vx!, this will write the log continuously instead of in batches ensuring that no log buffer is lost from crashes. This makes the install a lot slower, but could capture crucial debugging information in case the custom action in question is crashing.


Some links:

  • http://www.installsite.org/pages/en/msifaq/a/1022.htm.
  • msiexec parameters via setup.exe to create log not working
  • msiexec.exe command line



回答2:


The basic issue seems to be that the custom action LicenseFileExists has failed. This doesn't mean that the path is wrong, but it does mean that the code has failed. Error 2896 means "the action has failed".

So without knowing something about what the code does it's not really possible to diagnose why it fails. Assuming that the code is actually completely correct, there might be a security issue because custom actions that run in the UI sequence do not run with elevation, and access to the file might be disallowed.



来源:https://stackoverflow.com/questions/49914522/the-installer-has-encountered-an-unexpected-error-installing-this-package-err

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!