developer tip

지속적 통합으로 실행되는 동안 WiX 3.0에서 오류 217이 발생합니다.

optionbox 2020. 11. 24. 07:55
반응형

지속적 통합으로 실행되는 동안 WiX 3.0에서 오류 217이 발생합니다.


이 실행하는 동안, 윈도우 2008에서 우리의 자동화 된 빌드 제품군에 의해 발생되는 오류입니다 ICES을 (에서 마이그레이션 한 후 윅스 2.0 윅스 3.0) :

LGHT0217 : ICE 작업 'ICE01'을 실행하는 동안 오류가 발생했습니다. 이러한 종류의 ICE 오류의 가장 일반적인 원인은 잘못 등록 된 스크립팅 엔진입니다. 이 문제를 해결하는 방법과 자세한 내용은 http://wix.sourceforge.net/faq.html#Error217참조 하십시오 . 외부 UI 메시지 로거에서 다음 문자열 형식을 예상하지 못했습니다. "Windows Installer 서비스에 액세스 할 수 없습니다. Windows Installer가 제대로 설치되지 않은 경우 발생할 수 있습니다. 지원 담당자에게 문의하십시오." light.exe (0, 0)에서

또한 다음은 이벤트 로그에 표시되는 오류입니다.

MSIInstaller : 서버에 연결하지 못했습니다. 오류 : 0x80070005 제품 : [ProductName]-오류 1719. Windows Installer 서비스에 액세스 할 수 없습니다. Windows Installer가 올바르게 설치되지 않은 경우 발생할 수 있습니다. 도움이 필요하면 지원 담당자에게 문의하십시오.

직관적 :

  • VBScriptJScript 는 admin으로 등록되었습니다.
  • 통합 서비스에는 데스크톱 상호 작용 및 모든 파일에 대한 권한이 있습니다.
  • 다른 사용자 또는 통합 계정으로 로그인 한 사용자 ( RDP 를 통해 ) 가 동일한 시스템에서 수동으로 실행하면 빌드가 성공합니다.

나는 지금까지 아이디어가 없습니다.

ICE 유효성 검사를 유지하면서이 문제를 어떻게 해결합니까?


이야기의 끝 :

운없이 통합 계정, DCOM , 서비스 활성화 등 의 권한을 조작 한 후 , 마침내 로컬 빌드에 그대로 유지하면서 연속 통합 빌드에서 ICE 유효성 검사를 비활성화했습니다.

ICE 유효성 검사를 비활성화하려면 .wixproj 파일에서 SuppressValidation을 true로 설정할 수 있습니다.

    <PropertyGroup>
        <SuppressValidation>true</SuppressValidation>
    </PropertyGroup>

또는 -sval명령 줄 옵션을에 전달합니다 light.exe.


TFS 빌드 컨트롤러 계정을 로컬 관리자 그룹에 추가하고 Windows 서비스를 다시 시작하면 작업이 수행되었습니다.


근본 원인을 찾았습니다. Re : [WiX-users] light.exe가 ICE를 실행할 때 무작위로 실패한 것과 유사한 사용자 지정 유효성 검사기 확장을 포함하여 내가 찾은 모든 것을 시도 했습니다. .

다양한 스레드에서 제안 된 동시성 문제가 아닙니다. 너무 큰 PEB (Process Environment Block)로 인해 발생합니다.

Windows Installer는 32kB보다 큰 프로세스 환경 블록을 처리 할 수 ​​없습니다. 내 환경에서 빌드 시스템에 의해 설정된 변수의 수와 크기 (예 : 여러 중복 값을 포함하는 PATH 변수 )로 인해 PEB는 약 34kB였습니다.

흥미롭게도 환경 변수에 따라 Windows XP 및 2003에는 32KB로 설정된 PEB의 하드 제한이 있습니다. 이로 인해 빌드 초기 단계에서 쉽게 잡을 수있는 빌드 중단이 발생할 수 있습니다. 최신 Windows에는 이러한 제한이 없지만 Windows Installer 개발자는 내부 환경 버퍼를 32kB로 제한하고 값을 초과하면 정상적으로 실패한다고 생각합니다.

문제는 쉽게 재현 할 수 있습니다.

  • 크기가 32kB를 초과하는 환경 변수를 설정하는 .bat 파일을 만듭니다. 예를 들어, 32 줄의set Variable<number>=<text longer than 1024 characters>
  • cmd.exe 실행
  • 생성 한 배치 파일을 실행합니다.
  • 동일한 cmd.exe 창에서 :
    • OR에서 ICE 유효성 검사와 함께 WiX를 사용하여 MSI 패키지를 빌드 해보십시오.
    • 실행 smoke.exe하여 패키지 유효성 검사 또는
    • 간단히 실행 msiexec /i Package.msi
  • 위의 모든 명령이보고 Error 1719 - Windows Installer could not be accessed됩니다.

따라서 해결책은 빌드 스크립트를 검토하고 환경 변수의 수와 크기를 줄여 모두 32KB에 맞도록하는 것입니다. 다음을 실행하여 결과를 쉽게 확인할 수 있습니다.

set > environment.txt

목표는 environment.txt~ 30kB보다 작은 파일을 얻는 것입니다.


문제에 대한 올바른 설명 (CruiseControl 계정을 로컬 관리자 그룹에 추가하는 경우 제외) : 문제에 대한 올바른 설명 :

Wix 3.5 및 Cruise Control의 견적에서 오류가 발생합니다 .

ICE 유효성 검사에는 대화 형 계정 또는 관리자 권한이 필요합니다. 예를 들어 WiX 프로젝트 대 TFS 2010 팀 빌드 (2009-11-14) 또는 Re : [WiX-users] 패치 빌드에 대한 도움말 (2009-11-20)을 참조하십시오.


imagi가 완전히 옳습니다! 이것이 진정한 답이라는 것을 믿을 수 없었습니다. 유효성 검사를 중단하고 TFS 사용자를 관리자로 만드는 것은 좋은 해결책이 아닙니다. 또한 관리자 그룹에 추가 할 NT \ Authority를 ​​찾을 수 없었고 완전히 갇혀있었습니다.

Windows Server 2012 Datacenter에서 Build Agent와 동일한 오류가 발생했습니다. 문제를 해결하려면 :

  1. 목록 항목
  2. 빌드 에이전트 시스템의 환경 변수로 이동
  3. 두 개의 시스템 변수 만들기
  4. "PF86" 이는 "C:\Program Files (x86)"
  5. "PF" 이는 "C:\Program Files"
  6. 문자를 저장하고 싶어서 너무 짧고, TEMP, TMP 등이 그렇게 만들어 졌기 때문에 마지막 백 슬래시없이 만들었고이 변수들에 대해 MS 표준을 고수하기로 결정했습니다.
  7. 모든 대체하여 편집 PATH 변수 "C:\Program Files (x86)"%PF86%모든 "C:\Program Files"%PF%
  8. 닫고 구축하고 즐기십시오!
  9. 그것은 나를 위해 일했습니다. :)

에서 http://wix.sourceforge.net/faq.html#Error217 :

In WiX v3, Light automatically runs validation-- Windows Installer Internal Consistency Evaluators (ICEs) --after every successful build. Validation is a great way to catch common authoring errors that can lead to service problems, which is why it’s now run by default. Unfortunately, there’s a common issue that occurs on Windows Vista and Windows Server 2008 that can cause ICEs to fail. For details on the cause and how to fix it, see Heath Stewart's Blog and Aaron Stebner's WebLog.


I was getting same ICE error, but the problem turned to be corrupted Windows Installer Service. This solution worked for me: http://support.microsoft.com/kb/315353

  1. Log on to your computer as an administrator.
  2. Click Start, and then click Run.
  3. In the Open box, type cmd, and then click OK.
  4. At the command prompt, type msiexec.exe /unregister, and then press ENTER.
  5. Type msiexec /regserver, and then press ENTER.
  6. Restart Windows

Also, verify that the SYSTEM account has full control access permissions to the HKEY_CLASSES_ROOT hive in the Windows registry. In some cases, you may also have to add Administrator accounts.


I have some suggestions.

  • Try updating the Microsoft Installer version on the build server
  • Make sure you use the newest release of WiX 3.0, since it's 3.0 release stable now.
  • If all else fails, try running the build service under a specific build user who you can fiddle with permissions for...

I faced the same problem and did not like to suppress ICE validation. My setup: I used my own computer as a build agent on Visual Studio Online (VSO). My solution was to change the account used to run the service on my machine. Instead of using Network Service or Local Service I simply made the service log on with my own account which had all the necessary rights.


Go to your build machine and restart the Windows Installer service


None of the above suggestions worked for me, for me the anti-virus (mcafee) came into the picture and looks like it updated the vbscript.dll registry entry to a wrong DLL location. These are the things to keep in mind:

  1. Some of the WiX ICE validations are implemented using VBSCRIPT.
  2. So while compiling the MSI, the build server would need access to the c:\windows\system32\vbscript.dll.
  3. Chances are that somehow the user that runs your build lost access to this DLL.
  4. As mentioned in the above answers do look for the admin access/registry access and make sure your user has it.

Here are the steps that I took to fix the issue:

  1. Open cmd (run as admin) on the build agent machine.
  2. Run RegEdit
  3. Select the root, then click ctrl + f and Search for the following registry entry : {B54F3741-5B07-11cf-A4B0-00AA004A55E8}
  4. Look for the InprocServer32\Default Key

enter image description here

  1. On my build agent, the path was replaced with a mcafee DLL location. I updated the path back to c:\windows\system32\vbscript.dll
  2. Editing the registry entry was not easy, as it was a protected registry entry. I used the below link to get access permissions changed before I could edit the property: Edit protected registry entry

Once I updated the path, everything started working as usual.

참고URL : https://stackoverflow.com/questions/1064580/wix-3-0-throws-error-217-while-being-executed-by-continuous-integration

반응형