Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8139415

Silent install fails when SYSTEM credentials used to run installer

XMLWordPrintable

    • x86
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.8.0_51"
      Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
      Java HotSpot(TM) Client VM (build 25.51-b03, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 Enterprise SP1 32-bit
      Windows 7 Enterprise SP1 64-bit

      A DESCRIPTION OF THE PROBLEM :
      This is entirely relevant and should not have been closed: https://bugs.openjdk.java.net/browse/JDK-8130520

      The poster in the link above was doing a deployment using SCCM and using the SYSTEM credentials to run the installer.

      I'm doing a Windows deployment and leveraging SetupComplete.cmd to execute the installation of JRE. Windows Setup fires off SetupComplete.cmd using the SYSTEM credentials as well.

      The installation fails. According to the jusched.log it is not finding %ProgramData%\Oracle\Java\java.settings.cfg and fails. The installer is supposed to create this file if its not found, but for whatever reason is not doing so unless you use Administrator credentials.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Download PSExec from Microsoft Sysinternals

      2. Run the following command to open Command Prompt as SYSTEM:

      PSEXEC -i -s -d CMD

      3. Verify you are running as SYSTEM (SID should be S-1-5-18) with the following command:

      WHOAMI /USER

      4. Execute the Java installer. My SetupComplete.cmd is using the following switches:

      "jre-8u51-windows-i586.exe" /s INSTALL_SILENT=Enable AUTO_UPDATE=Disable REBOOT=Disable NOSTARTMENU=Enable SPONSORS=Disable

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JRE will not install.
      ACTUAL -
      JRE does not install and jusched.log complains that it can't find java.settings.cfg.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Wrapper begin...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), wrapper.cpp:61 (WinMain)]
      INFO: Running offline JRE wrapper with command line=</s INSTALL_SILENT=Enable AUTO_UPDATE=Disable REBOOT=Disable NOSTARTMENU=Enable SPONSORS=Disable>
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: No Old AU Version found

      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Wrapper Load ConfigSettings...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:158 (InstallConfigData::InstallConfigData)]
      TRACE: Entering InstallConfigData::InstallConfigData
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:215 (InstallConfigData::InitConfig)]
      INFO: Default config settings are:
      INSTALL_SILENT=Disable
      STATIC=Disable
      AUTO_UPDATE=Enable
      WEB_ANALYTICS=Enable
      EULA=Disable
      SPONSORS=Enable
      OEMUPDATE=Disable

      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:0 (InstallConfigData::InstallConfigData)]
      TRACE: Exiting InstallConfigData::InstallConfigData (entered at InstallConfigData.cpp:158)
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: -->Loading Important args...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:491 (InstallConfigData::ImportArgsConfigSettings)]
      TRACE: Entering InstallConfigData::ImportArgsConfigSettings
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Importing command line arguments
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:544 (InstallConfigData::ImportArgsConfigSettings)]
      INFO: ...adding MSICMDLINE to settingsConfig
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:0 (InstallConfigData::ImportArgsConfigSettings)]
      TRACE: Exiting InstallConfigData::ImportArgsConfigSettings (entered at InstallConfigData.cpp:491)
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: |------Important args config (TMP)--------|

      INSTALL_SILENT = Enable
      STATIC = Disable
      AUTO_UPDATE = Disable
      SPONSORS = Disable
      WEB_ANALYTICS = Enable
      EULA = Disable
      OEMUPDATE = Disable
      NOSTARTMENU = Enable
      REBOOT = Disable
      MSI_CMDLINE = REBOOT=Disable
      /s = 1
      |-------------------------------------|

      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: -->Loading Config...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Importing runtime configuration file...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:181 (logit)]
      INFO: Runtime config file path is C:\ProgramData\Oracle\Java\java.settings.cfg
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Runtime configuration file doesn't exist. It will be created later by settings_api.
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:491 (InstallConfigData::ImportArgsConfigSettings)]
      TRACE: Entering InstallConfigData::ImportArgsConfigSettings
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Importing command line arguments
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:544 (InstallConfigData::ImportArgsConfigSettings)]
      INFO: ...adding MSICMDLINE to settingsConfig
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:0 (InstallConfigData::ImportArgsConfigSettings)]
      TRACE: Exiting InstallConfigData::ImportArgsConfigSettings (entered at InstallConfigData.cpp:491)
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:601 (InstallConfigData::CheckParams)]
      TRACE: Entering InstallConfigData::CheckParams
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:0 (InstallConfigData::CheckParams)]
      TRACE: Exiting InstallConfigData::CheckParams (entered at InstallConfigData.cpp:601)
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: -->Saving backup...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Importing runtime configuration file...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:181 (logit)]
      INFO: Runtime config file path is C:\ProgramData\Oracle\Java\java.settings.cfg
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Runtime configuration file doesn't exist. It will be created later by settings_api.
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: |------Config to backup--------|

      |-------------------------------------|

      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: -->Loading export config...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Importing runtime configuration file...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:181 (logit)]
      INFO: Runtime config file path is C:\ProgramData\Oracle\Java\java.settings.cfg
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Runtime configuration file doesn't exist. It will be created later by settings_api.
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:491 (InstallConfigData::ImportArgsConfigSettings)]
      TRACE: Entering InstallConfigData::ImportArgsConfigSettings
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Importing command line arguments
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:544 (InstallConfigData::ImportArgsConfigSettings)]
      INFO: ...adding MSICMDLINE to settingsConfig
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:0 (InstallConfigData::ImportArgsConfigSettings)]
      TRACE: Exiting InstallConfigData::ImportArgsConfigSettings (entered at InstallConfigData.cpp:491)
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:601 (InstallConfigData::CheckParams)]
      TRACE: Entering InstallConfigData::CheckParams
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:0 (InstallConfigData::CheckParams)]
      TRACE: Exiting InstallConfigData::CheckParams (entered at InstallConfigData.cpp:601)
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: -->Adding CMDLINE to config...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: -->Normalizing Export...
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: |------Config to export--------|

      INSTALL_SILENT = Enable
      AUTO_UPDATE = Disable
      SPONSORS = Disable
      |-------------------------------------|

      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: |------!!!!Working config!!!!--------|

      INSTALL_SILENT = Enable
      STATIC = Disable
      AUTO_UPDATE = Disable
      SPONSORS = Disable
      WEB_ANALYTICS = Enable
      EULA = Disable
      OEMUPDATE = Disable
      NOSTARTMENU = Enable
      REBOOT = Disable
      MSI_CMDLINE = REBOOT=Disable
      CMDLINE = INSTALL_SILENT="Enable" AUTO_UPDATE="Disable" SPONSORS="Disable" NOSTARTMENU="Enable"
      /s = 1
      |-------------------------------------|

      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), Locales.cpp:317 (Locale::preferredLanguages)]
      INFO: PreferredUILanguages: Vista+
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Wrapper, check for reinstall case..
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), WrapperUtils.cpp:1289 (IsSameJREVersionInstalled)]
      ERROR: Error Opening registry key SOFTWARE\JavaSoft\Java Runtime Environment: 183
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), WrapperUtils.cpp:1290 (IsSameJREVersionInstalled)]
      INFO: No same version JRE exists
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), WrapperUtils.cpp:1289 (IsSameJREVersionInstalled)]
      ERROR: Error Opening registry key SOFTWARE\JavaSoft\Java Runtime Environment: 183
      [2015/09/23 14:24:50.761, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), WrapperUtils.cpp:1290 (IsSameJREVersionInstalled)]
      INFO: No same version JRE exists
      [2015/09/23 14:24:50.777, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Wrapper: Extract MSI ...
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), WrapperOffline.cpp:125 (GetOptionsFromXmlIfOnline)]
      ERROR: Exception with message 'NetUtils.cpp(162) at HttpConnection::connect(): HttpSendRequest failed: system error 12007 (The server name or address could not be resolved)' caught
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), Locales.cpp:317 (Locale::preferredLanguages)]
      INFO: PreferredUILanguages: Vista+
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), WrapperOffline.cpp:156 (GetOptionsFromXmlIfOnline)]
      ERROR: Exception with message 'NetUtils.cpp(92) at HttpConnection::connect(): InternetCrackUrl failed: system error 12006 (The URL does not use a recognized protocol)' caught
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), UpdateUtils.hpp:46 (getCheckSum)]
      ERROR: Error opening file "C:\windows\system32\config\systemprofile\AppData\LocalLow\Sun\Java\jre1.8.0_51\Java3BillDevices.jpg" failed with system error 2 (The system cannot find the file specified)
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Could not find HKEY_LOCAL_MACHINE, SOFTWARE\JavaSoft registry key.
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), wrapper.cpp:370 (WinMain)]
      INFO: MSI command line: REBOOT=Disable INSTALL_SILENT="Enable" AUTO_UPDATE="Disable" SPONSORS="Disable" NOSTARTMENU="Enable"
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Exporting config settings
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: ...Exporting config settings
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Writing to the runtime config file.
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Unable to install Java

      Unable to open file C:\ProgramData\Oracle\Java\java.settings.cfg.
      Check that the configuration file exists and that the path to the file is correct.
      [2015/09/23 14:24:50.964, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), InstallConfigData.cpp:702 (InstallConfigData::ExportConfigSettings)]
      ERROR: Fails on writing to the runtime config file.
      [2015/09/23 14:24:50.980, jre-8u51-windows-i586.exe (PID: 2628, TID: 2624), AllUtils.cpp:177 (logit)]
      INFO: Error occurred while exporting configuration settings. Exiting installer.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      As found here: https://bugs.openjdk.java.net/browse/JDK-8130520

      Simply create an empty %ProgramData%\Oracle\Java\java.settings.cfg file before running the installer.

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: