SonarQube JMX metrics in docker conatiner

Hello. I was installing and configuring the SonarQube server. Now I have a task to collect metrics. With metrics available through endpoints via HTTP everything is clear to me. But with JMX metrics somehow it does not work. My SonarQube server runs in Docker, right in front of it there is Nginx which acts as a reverse proxy. Nginx is also in a container, both containers are combined using Docker Network. I deployed JMX Exporter from Prometheus in a Docker container and combined it into the same Docker Network as the SonarQube server with Nginx. To make the container work with the exporter, I added a line to the config from the documentation on remote access to JMX Mbeans, but set the parameter -Dcom.sun.management.jmxremote.authenticate=false to test whether it works at all or not. The exporter itself works, its web interface is displayed, but it does not collect any metrics (I understood this from the parameter indicating an error). I do not understand what port should be specified in the end to listen to JMX Mbeans. In the config for the exporter I specified the hostPort - this is the name of the container with the sonarcube server, and the port was different (5555, 10443, 10444), but nothing works. The pattern was specified .*. I set up my entire configuration using ansible. Could you please describe in more detail the procedure that I need to take to gain access to all JMX Mbeans from a neighboring container with the exporter?

I used:
SonarQube server image: sonarqube:10.7.0-community
JMX expoorter image: bitnami/jmx-exporter:1.1.0
And some one of latest nginx image.

My string in SonarQube server config for JMX seems like:

sonar.web.javaAdditionalOpts=-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10443 -Dcom.sun.management.jmxremote.rmi.port=10444

Is there any easier way to access JMX Mbeans.

UPD.
I found solutions from ten years ago that simply say to add the parameter -Djava.rmi.server.hostname. Is this really true?