This article documents steps on how to increase the audit message max queue size that leads to an UnsupportedOperationException.
By default, System Settings > Foundation > Audit > "Audit message max queue size" is set at 200. The value is supposed to be greater than 0. This specific message queue configuration is to manage the audit event. If an invalid value is set (for example, 0) the Portal Admin won’t be able to create User Groups as a result. Portlet is temporarily unavailable and UnsupportedOperationException will be observed on both the front and back ends respectively.
Steps to Reproduce
- Navigate to Control Panel > Configuration > System Settings > Foundation > Audit
- Click Edit
- Set Audit message max queue size to 0
- Navigate to Users > User Groups
- Create a User Group and click Save
Observed Behavior
The user group can’t be created successfully with the following error message(snippet):
11:11:52,529 ERROR [ajp-nio-8009-exec-21][PortletServlet:111] javax.portlet.PortletException: com.liferay.portal.kernel.exception.ModelListenerException: java.lang.UnsupportedOperationException
javax.portlet.PortletException: com.liferay.portal.kernel.exception.ModelListenerException: java.lang.UnsupportedOperationException
at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:203)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:418)
at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:93)
If above exception is observed, please check if the max queue size is valid or not. If not valid, please follow the below steps to update Audit message max queue size to resolve this.
Resolution
- Navigate to Control Panel > Configuration > System Settings > Foundation > Audit
- Click Edit
- Adjust Audit message max queue size greater than 0
- Connect to Gogo shell: eg: open command line and execute telnet localhost 11311
- Execute command: lb audit | grep Wiring
- It will return an output like:
284|Active | 10|Liferay Portal Security Audit Wiring (2.0.4)
- It will return an output like:
- Execute command: refresh 284
- Note: 284 is the service ID you get from previous step.
- Navigate to Users > User Groups
- Create a User Group and click Save