I am installing Go Server on EC2. Installation was successful, but when I try to start go-server service, it throws an error saying "Error starting Go Server.". Within the logs I can find as below:
[Mon Jun 19 05:21:41 UTC 2017] Starting Go Server in directory: /var/lib/go-server
Unrecognized VM option 'MaxMetaspaceSize=256m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Googled this error and got to see "The correct name of the parameter is -XX:MaxMetaspaceSize", but not sure how to set this or what should be the solution for Go issue. Can someone help me at the earliest please?
EDIT: I can see that the command used by Go Server uses -XX:MaxMetaspaceSize - See below:
[Mon Jun 19 06:54:31 UTC 2017] Starting Go Server with command: /usr/lib/jvm/jre/bin/java -server -Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx1024m -XX:MaxMetaspaceSize=256m -Duser.language=en -Djruby.rack.request.size.threshold.bytes=30000000 -Duser.country=US -Dcruise.config.dir=/etc/go -Dcruise.config.file=/etc/go/cruise-config.xml -Dcruise.server.port=8153 -Dcruise.server.ssl.port=8154 -jar /usr/share/go-server/go.jar
MaxMetaspaceSize is only available from Java 8. Check the System Requirements. It's expecting Java Runtime Environment (JRE) version 8