You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Grzegorz Grzybek (Jira)" <ji...@apache.org> on 2021/04/07 13:52:00 UTC
[jira] [Comment Edited] (KARAF-6955) JMX: With rmiRegistryHost =
127.0.0.1, Karaf should listen only on 127.0.0.1
[ https://issues.apache.org/jira/browse/KARAF-6955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17316350#comment-17316350 ]
Grzegorz Grzybek edited comment on KARAF-6955 at 4/7/21, 1:51 PM:
------------------------------------------------------------------
I've talked a bit with [~jbonofre]. In my opinion, activator of karaf.management.server bundle should (seeing {{rmiServerHost}} property) immediately call {{System.setProperty("java.rmi.server.hostname", <value of rmiServerHost>)}}. Because it IS RMI endpoint.
We all know, that JDK itself (especially {{sun.\*}} and {{com.sun.\*}}) packages are full of static methods/fields configured using only system properties... I don't see any elegant solution here.
was (Author: gzres):
I've talked a bit with [~jbonofre]. In my opinion, activator of karaf.management.server bundle should (seeing {{rmiServerHost}} property) immediately call {{System.setProperty("java.rmi.server.hostname", <value of rmiServerHost>)}}. Because it IS RMI endpoint.
We all know, that JDK itself (especially {{sun.*}} and {{com.sun.*}}) packages are full of static methods/fields configured using only system properties... I don't see any elegant solution here.
> JMX: With rmiRegistryHost = 127.0.0.1, Karaf should listen only on 127.0.0.1
> ----------------------------------------------------------------------------
>
> Key: KARAF-6955
> URL: https://issues.apache.org/jira/browse/KARAF-6955
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.9
> Reporter: Martin Lichtin
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 4.2.11, 4.3.1
>
>
> JMX - with rmiRegistryHost = 127.0.0.1 Karaf should listen only on 127.0.0.1
> However, Karaf listens on 0.0.0.0 which opens up access to the network.
> {noformat}
> > config:list "(service.pid=org.apache.karaf.management)"
> ----------------------------------------------------------------
> Pid: org.apache.karaf.management
> BundleLocation: ?
> Properties:
> daemon = true
> felix.fileinstall.filename = file:mykaraf/etc/org.apache.karaf.management.cfg
> jmxRealm = karaf
> jmxmpEnabled = false
> jmxmpHost = 127.0.0.1
> jmxmpObjectName = connector:name=jmxmp
> jmxmpPort = 9999
> jmxmpServiceUrl = service:jmx:jmxmp://127.0.0.1:9999
> objectName = connector:name=rmi
> rmiRegistryHost = 127.0.0.1
> rmiRegistryPort = 25031
> rmiServerHost = 127.0.0.1
> rmiServerPort = 25041
> service.pid = org.apache.karaf.management
> serviceUrl = service:jmx:rmi://127.0.0.1:25041/jndi/rmi://127.0.0.1:25031/karaf-mykaraf
> threaded = true
> {noformat}
> Using netstat one can see the listen address is not 127.0.0.1:
> {noformat}
> $ netstat -n -l -t|grep 25031
> tcp 0 0 0.0.0.0:25031 0.0.0.0:* LISTEN
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)