From 5e1366b487ae96468b24d9255aa32d69f50acfe4 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 19 Mar 2026 10:58:55 +1100 Subject: [PATCH 1/6] LDEV-6164 register BonCode event source to prevent midnight crash --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++---- .gitignore | 1 + lucee/lucee.xml | 12 ++++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de42255a..79777f82 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -533,6 +533,10 @@ jobs: test-windows: runs-on: windows-latest needs: build-installers + strategy: + max-parallel: 1 + matrix: + installiis: [ false, true ] steps: - name: Set defaults for Push workflows if: github.event_name == 'push' @@ -559,12 +563,20 @@ jobs: java-version: '21' distribution: 'temurin' - - name: Run Windows Installer + - name: Install IIS + if: ${{ matrix.installiis }} + shell: powershell + run: | + Install-WindowsFeature -Name Web-Server -IncludeAllSubFeature -IncludeManagementTools + Start-Service W3SVC + Write-Host "IIS installed and running" + + - name: Run Windows Installer [installiis=${{ matrix.installiis }}] shell: cmd run: | cd - echo "Lucee Windows installer ${{ env.LUCEE_INSTALLER_VERSION }}" >> %GITHUB_STEP_SUMMARY% - lucee-${{ env.LUCEE_INSTALLER_VERSION }}-windows-x64-installer.exe --mode unattended --installconn false --installmodcfml false --installiis false --startatboot true --luceepass ibtest --installjre ${{ env.INSTALL_JRE }} + echo "Lucee Windows installer ${{ env.LUCEE_INSTALLER_VERSION }} (installiis=${{ matrix.installiis }})" >> %GITHUB_STEP_SUMMARY% + lucee-${{ env.LUCEE_INSTALLER_VERSION }}-windows-x64-installer.exe --mode unattended --installconn false --installmodcfml false --installiis ${{ matrix.installiis }} --startatboot true --luceepass ibtest --installjre ${{ env.INSTALL_JRE }} pwd c: cd c:\lucee\tomcat\bin @@ -575,10 +587,30 @@ jobs: cd ..\.. pwd - echo "if (server.lucee.version neq url.version) header statusCode=500;#chr(10)##### Lucee Linux #server.lucee.version#, using Java #server.java.version##chr(10)# #### Running on #server.servlet.name#, OS #server.os.version# #server.os.arch#" > c:\lucee\tomcat\webapps\ROOT\check.cfm + echo "if (server.lucee.version neq url.version) header statusCode=500;#chr(10)##### Lucee Windows #server.lucee.version#, using Java #server.java.version##chr(10)# #### Running on #server.servlet.name#, OS #server.os.version# #server.os.arch#" > c:\lucee\tomcat\webapps\ROOT\check.cfm dir c:\lucee\tomcat\webapps\ROOT curl http://127.0.0.1:8888/check.cfm?version=${{ env.LUCEE_INSTALLER_VERSION }} --fail-with-body -o %GITHUB_STEP_SUMMARY% + + - name: Verify BonCode event source registered (LDEV-6164) + if: ${{ matrix.installiis }} + shell: powershell + run: | + $source = "BonCodeConnector" + if ([System.Diagnostics.EventLog]::SourceExists($source)) { + Write-Host "PASS: Event source '$source' is registered" + } else { + Write-Error "FAIL: Event source '$source' is NOT registered" + exit 1 + } + + - name: Verify IIS serves Lucee via Boncode + if: ${{ matrix.installiis }} + shell: cmd + run: | + echo "Check IIS port 80 via Boncode" >> %GITHUB_STEP_SUMMARY% + curl http://127.0.0.1/check.cfm?version=${{ env.LUCEE_INSTALLER_VERSION }} --fail-with-body >> %GITHUB_STEP_SUMMARY% + - name: debug failure if: ${{ failure() }} shell: cmd diff --git a/.gitignore b/.gitignore index 41578ad2..1de3a461 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ jre/x64-linux/jre/ jre/aarch64-linux/jre/ src-tomcat/ express.bat +/.claude diff --git a/lucee/lucee.xml b/lucee/lucee.xml index 77728040..002eaf35 100644 --- a/lucee/lucee.xml +++ b/lucee/lucee.xml @@ -618,6 +618,18 @@ Please review ${installer_installation_log}. + + + 0 + powershell + -Command "New-EventLog -LogName Application -Source 'BonCodeConnector' -ErrorAction SilentlyContinue" + + + ${installiis} + + + ${env(SYSTEMDRIVE)}\inetpub\wwwroot\index.cfm ${installdir}\tomcat\webapps\ROOT\index.cfm From 8ced5d913563b2c8718b6f18149410261d3ba1ab Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 19 Mar 2026 11:05:46 +1100 Subject: [PATCH 2/6] LDEV-6164 trim IIS install to bare minimum --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 79777f82..b95d87d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -567,7 +567,7 @@ jobs: if: ${{ matrix.installiis }} shell: powershell run: | - Install-WindowsFeature -Name Web-Server -IncludeAllSubFeature -IncludeManagementTools + Install-WindowsFeature -Name Web-Server Start-Service W3SVC Write-Host "IIS installed and running" From a628f277cb27a0e61f5aba8513ef2f07598c83b2 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 19 Mar 2026 11:16:02 +1100 Subject: [PATCH 3/6] LDEV-6164 run New-EventLog as Administrator --- lucee/lucee.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/lucee/lucee.xml b/lucee/lucee.xml index 002eaf35..8b161f8b 100644 --- a/lucee/lucee.xml +++ b/lucee/lucee.xml @@ -624,6 +624,7 @@ Please review ${installer_installation_log}. 0 powershell -Command "New-EventLog -LogName Application -Source 'BonCodeConnector' -ErrorAction SilentlyContinue" + Administrator ${installiis} From ba2439b937a25d0cf93548e5c972ba23057f949a Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 19 Mar 2026 12:02:45 +1100 Subject: [PATCH 4/6] LDEV-6164 drop SilentlyContinue so errors are visible --- lucee/lucee.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lucee/lucee.xml b/lucee/lucee.xml index 8b161f8b..b4f417ea 100644 --- a/lucee/lucee.xml +++ b/lucee/lucee.xml @@ -623,8 +623,7 @@ Please review ${installer_installation_log}. 0 powershell - -Command "New-EventLog -LogName Application -Source 'BonCodeConnector' -ErrorAction SilentlyContinue" - Administrator + -Command "New-EventLog -LogName Application -Source 'BonCodeConnector'" ${installiis} From 1ab6f56f1eb47674410500e0ded41bfe2722c209 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 19 Mar 2026 12:24:50 +1100 Subject: [PATCH 5/6] LDEV-6164 fix XML quote escaping, verify via registry --- .github/workflows/main.yml | 8 ++++---- lucee/lucee.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b95d87d8..11855b0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -596,11 +596,11 @@ jobs: if: ${{ matrix.installiis }} shell: powershell run: | - $source = "BonCodeConnector" - if ([System.Diagnostics.EventLog]::SourceExists($source)) { - Write-Host "PASS: Event source '$source' is registered" + $regPath = "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\Application\BonCodeConnector" + if (Test-Path $regPath) { + Write-Host "PASS: Event source registry key exists at $regPath" } else { - Write-Error "FAIL: Event source '$source' is NOT registered" + Write-Error "FAIL: Event source registry key NOT found at $regPath" exit 1 } diff --git a/lucee/lucee.xml b/lucee/lucee.xml index b4f417ea..17a7873d 100644 --- a/lucee/lucee.xml +++ b/lucee/lucee.xml @@ -623,7 +623,7 @@ Please review ${installer_installation_log}. 0 powershell - -Command "New-EventLog -LogName Application -Source 'BonCodeConnector'" + -Command "New-EventLog -LogName Application -Source 'BonCodeConnector'" ${installiis} From 54a5002499a12f6eb70b7a8c424c2f9aed95db7c Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 19 Mar 2026 13:01:49 +1100 Subject: [PATCH 6/6] LDEV-6164 use reg add instead of powershell, avoid quoting hell --- lucee/lucee.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lucee/lucee.xml b/lucee/lucee.xml index 17a7873d..0a5b3a23 100644 --- a/lucee/lucee.xml +++ b/lucee/lucee.xml @@ -622,8 +622,8 @@ Please review ${installer_installation_log}. See https://github.com/Bilal-S/iis2tomcat/issues/113 --> 0 - powershell - -Command "New-EventLog -LogName Application -Source 'BonCodeConnector'" + reg + add HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\BonCodeConnector /f ${installiis}