Search code examples
wildflyhttp2

Enabling http2 on wildfly 10, standalone.conf


I've followed the step by step tutorial here but I didn't manage to make it work.

I edited standalone.conf which now looks like this

if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"

else
   echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"

fi

JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:$JBOSS_HOME/bin/alpn-boot-8.1.6.v20151105.jar"

and when starting the server i get the error:

Jetty ALPN not found. HTTP2 and SPDY are not available. Please make sure Jetty ALPN is on the boot class path.

Do I have to configure wildflt so it takes standalone.conf into account ?


Solution

  • Ok since I'm on windows the steps are actually a bit different.

    Just modify standalone.conf.bat instead of standalone.bat (edit the bat, not run it, in case you are as illiterate in that area as I am).

    and add

    set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:%JBOSS_HOME%\bin\alpn-boot-8.1.6.v20151105.jar"