Payara Micro command line option --hzconfigfile is stripping the full file path and only using the file name/FISH-8106
Brief Summary
When I used the option --hzconfigfile /config/hazelcast-aws.xml, firstly the aws plugin we were using didn't work any more (that plugin was merged into hazelcast 5 at some point), but then I noticed this log message on startup:
Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull hazelcast-runtime-configuration.hazelcast-configuration-file=hazelcast-aws.xml
So as a workaround I didn't use --hzconfigfile, and used a preboot file with the following instead:
set hazelcast-runtime-configuration.hazelcast-configuration-file=/config/hazelcast-aws.xml
Then everything worked fine.
So I think in PayaraMicroImpl.java where it's creating the preboot command with alternateHZConfigFile, needs set the full path and filename, and not just the filename.
Expected Outcome
The log message should be showing the full path to the hazelcast config file, then I think it should all work e.g.
Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull hazelcast-runtime-configuration.hazelcast-configuration-file=/config/hazelcast-aws.xml
Current Outcome
Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull hazelcast-runtime-configuration.hazelcast-configuration-file=hazelcast-aws.xml
Reproducer
Run payara micro with the option such as --hzconfigfile /config/hazelcast-aws.xml
In the fixed version you would see log output such as:
Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull hazelcast-runtime-configuration.hazelcast-configuration-file=/config/hazelcast-aws.xml
Operating System
Amazon EC2 in ECS
JDK Version
Zulu JDK 17
Payara Distribution
Payara Micro
Hello @paumichaelhowell,
I have verified your report, and indeed, the --hzconfigfile command option is not recognising correctly the config XML file unless it is in the same folder as the Payara Micro jar file. Your workaround also worked as expected, and was added to my report. I have raised an internal issue FISH-8106, that our engineering team is going to start working on soon. Thank you very much for your report.
Thank you very much for your contribution!
Kind regards, Felix Ifrim