JMX Connections in UberJAR/Jetty

I have two RHEL servers running a CUBA Web App/App-Core behind a load-balancer in AWS. I am using UberJAR to build and deploy my application. Everything is working great, except for JMX. Specifically I want to see the Server Logs for both servers, no matter which server I’m currently on. I have tried setting up a JMX connection without success.

After reading CUBA docs, it looks like JMX needs to be enabled. I see instructions for Tomcat on Linux - Tomcat JMX for Linux - CUBA Platform. Developer’s Manual.

UberJAR is using Jetty and I cannot find any instructions with CUBA docs/forum. I do see some JMX instructions on the Jetty site - https://www.eclipse.org/jetty/documentation/9.3.x/jmx-chapter.html, but it’s not clear to me how to integrate these into the Jetty configuration files used as part of my UberJAR build.

Viewing the server logs of any servers is a really invaluable support tool.

Mike.

Hi Mike,

Try to run uberJAR with the command that sets JMX connection properties:

java -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=7777 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.password.file=jmxremote.password -Dcom.sun.management.jmxremote.access.file=jmxremote.access -jar app.jar

I am out of the office, but I will try tomorrow. Thanks.