I've searched the forums and was unable to find anything with the exact issue I'm having. I created a new EC2 Windows instance and installed Ignition 8.1.23. I did not install Java separately. The gateway runs fine until a reboot, then the Ignition service would not start. This was found in the log:
WARN | wrapper | 2023/02/01 19:37:28 | The 'JAVA_HOME' environment variable was referenced but has not been defined.
STATUS | wrapper | 2023/02/01 19:37:28 | --> Wrapper Started as Service
STATUS | wrapper | 2023/02/01 19:37:29 | Java Service Wrapper Standard Edition 64-bit 3.5.42
STATUS | wrapper | 2023/02/01 19:37:29 | Copyright (C) 1999-2020 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2023/02/01 19:37:29 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2023/02/01 19:37:29 | Licensed to Inductive Automation for Inductive Automation
STATUS | wrapper | 2023/02/01 19:37:29 |
FATAL | wrapper | 2023/02/01 19:37:29 | Unable to execute Java command. The system cannot find the file specified. (0x2)
FATAL | wrapper | 2023/02/01 19:37:29 | "%JAVA_HOME%\bin\java" -version
ADVICE | wrapper | 2023/02/01 19:37:29 |
ADVICE | wrapper | 2023/02/01 19:37:29 | --------------------------------------------------------------------
ADVICE | wrapper | 2023/02/01 19:37:29 | Advice:
ADVICE | wrapper | 2023/02/01 19:37:29 | Usually when the Wrapper fails to start the JVM process, it is
ADVICE | wrapper | 2023/02/01 19:37:29 | because of a problem with the value of the configured Java command.
ADVICE | wrapper | 2023/02/01 19:37:29 | Currently:
ADVICE | wrapper | 2023/02/01 19:37:29 | wrapper.java.command=%JAVA_HOME%/bin/java
ADVICE | wrapper | 2023/02/01 19:37:29 | Please make sure that the PATH or any other referenced environment
ADVICE | wrapper | 2023/02/01 19:37:29 | variables are correctly defined for the current environment.
ADVICE | wrapper | 2023/02/01 19:37:29 | --------------------------------------------------------------------
I opened ignition.conf and found that wrapper.java.command was referencing %JAVA_HOME% which could not be found. I changed the path to the following and the gateway launched:
wrapper.java.command=C:\Program Files\Inductive Automation\Ignition\lib\runtime\jre-win\bin\java.exe
I will probably set the environmental variables instead of hardcoding the path as a permanent solution but I wanted to check if anyone else has seen this issue before and hopefully if anyone encounters it in the future they will see the post and be able to resolve.