Social Media

MODCLUSTER000045: AverageSystemLoadMetric is not supported on this system and will be disabled.

Turns out cpu isn’t a valid load-metric on jboss wildfly on windows

Standalone.xml
[sourcecode lang=”xml”] <subsystem xmlns="urn:jboss:domain:modcluster:1.2">
<mod-cluster-config advertise-socket="modcluster" proxy-list="localhost:1234" advertise="false" ttl="10" connector="ajp">
<dynamic-load-provider>
<load-metric type="cpu"/>
</dynamic-load-provider>
</mod-cluster-config>
</subsystem>
[/sourcecode]

Logs –

MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final
MODCLUSTER000045: AverageSystemLoadMetric is not supported on this system and will be disabled.

The list of valid values is defined under –

https://github.com/wildfly/wildfly/blob/master/mod_cluster/extension/src/main/resources/schema/jboss-as-mod-cluster_2_0.xsd#L267

[sourcecode lang=”xml”] <xs:simpleType name="loadMetricEnum">
<xs:restriction base="xs:token">
<xs:enumeration value="cpu"/>
<xs:enumeration value="mem">
<xs:annotation>
<xs:documentation>Deprecated.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="heap"/>
<xs:enumeration value="sessions"/>
<xs:enumeration value="requests"/>
<xs:enumeration value="send-traffic"/>
<xs:enumeration value="receive-traffic"/>
<xs:enumeration value="busyness"/>
</xs:restriction>
</xs:simpleType>
[/sourcecode]

Change it to request –

[sourcecode lang=”xml”] <subsystem xmlns="urn:jboss:domain:modcluster:1.2">
<mod-cluster-config advertise-socket="modcluster" proxy-list="localhost:1234" advertise="false" ttl="10" connector="ajp">
<dynamic-load-provider>
<load-metric type="requests"/>
</dynamic-load-provider>
</mod-cluster-config>
</subsystem>
[/sourcecode]

After –

MODCLUSTER000001: Initializing mod_cluster version 1.3.0.Final
9MODCLUSTER000032: Listening to proxy advertisements on /localhost:23364

About the Author Martin Farrell

My name is Martin Farrell. I have almost 20 years Java experience. I specialize inthe Spring Framework and JEE. I’ve consulted to a range of businesses, and have provide Java and Spring mentoring and training. You can learn more at About or on my consultancy website Glendevon Software

follow me on:

Leave a Comment: