当前位置: 首页 > 知识库问答 >
问题:

访问远程Infinispan MBean时出现问题

高博涉
2023-03-14

我可以通过本地J控制台访问Mbean,但无法从远程主机访问MBEANS。

我的配置:

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:1.4">
    <extensions>
        <extension module="org.infinispan.server.endpoint"/>
        <extension module="org.jboss.as.clustering.infinispan"/>
        <extension module="org.jboss.as.clustering.jgroups"/>
        <extension module="org.jboss.as.connector"/>
        <extension module="org.jboss.as.jdr"/>
        <extension module="org.jboss.as.jmx"/>
        <extension module="org.jboss.as.logging"/>
        <extension module="org.jboss.as.modcluster"/>
        <extension module="org.jboss.as.naming"/>
        <extension module="org.jboss.as.remoting"/>
        <extension module="org.jboss.as.security"/>
        <extension module="org.jboss.as.threads"/>
        <extension module="org.jboss.as.transactions"/>
        <extension module="org.jboss.as.web"/>
    </extensions>
    <management>
        <security-realms>
            <security-realm name="ManagementRealm">
                <authentication>
                    <local default-user="$local"/>
                    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
                </authentication>
            </security-realm>
            <security-realm name="ApplicationRealm">
                <authentication>
                    <local default-user="$local" allowed-users="*"/>
                    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                </authentication>
            </security-realm>
        </security-realms>
        <management-interfaces>
            <native-interface security-realm="ManagementRealm">
                <socket-binding native="management-native"/>
            </native-interface>
            <http-interface security-realm="ManagementRealm">
                <socket-binding http="management-http"/>
            </http-interface>
        </management-interfaces>
    </management>
    <profile>
        <subsystem xmlns="urn:jboss:domain:logging:1.2">
            <console-handler name="CONSOLE">
                <level name="INFO"/>
                <formatter>
                    <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                </formatter>
            </console-handler>
            <periodic-rotating-file-handler name="FILE" autoflush="true">
                <formatter>
                    <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                </formatter>
                <file relative-to="jboss.server.log.dir" path="server.log"/>
                <suffix value=".yyyy-MM-dd"/>
                <append value="true"/>
            </periodic-rotating-file-handler>
            <logger category="com.arjuna">
                <level name="WARN"/>
            </logger>
            <logger category="org.apache.tomcat.util.modeler">
                <level name="WARN"/>
            </logger>
            <logger category="org.jboss.as.config">
                <level name="DEBUG"/>
            </logger>
            <logger category="sun.rmi">
                <level name="WARN"/>
            </logger>
            <logger category="jacorb">
                <level name="WARN"/>
            </logger>
            <logger category="jacorb.config">
                <level name="ERROR"/>
            </logger>
            <root-logger>
                <level name="INFO"/>
                <handlers>
                    <handler name="CONSOLE"/>
                    <handler name="FILE"/>
                </handlers>
            </root-logger>
        </subsystem>
        <subsystem xmlns="urn:infinispan:server:endpoint:6.0">
            <hotrod-connector socket-binding="hotrod" cache-container="clustered">
                <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000"/>
            </hotrod-connector>
            <memcached-connector socket-binding="memcached" cache-container="clustered"/>
            <!--<rest-connector virtual-server="default-host" cache-container="clustered" security-domain="other" auth-method="BASIC"/> -->
            <rest-connector virtual-server="default-host" cache-container="clustered" />
            <websocket-connector socket-binding="websocket" cache-container="clustered"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:datasources:1.1">
            <datasources/>
        </subsystem>
        <subsystem xmlns="urn:infinispan:server:core:5.3" default-cache-container="clustered">
            <cache-container name="clustered" default-cache="default">
                <transport executor="infinispan-transport" lock-timeout="60000"/>
                <distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
                    <locking isolation="READ_COMMITTED" acquire-timeout="30000" concurrency-level="1000" striping="false"/>
                    <transaction mode="NONE"/>
                </distributed-cache>
                <distributed-cache name="memcachedCache" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
                    <locking isolation="READ_COMMITTED" acquire-timeout="30000" concurrency-level="1000" striping="false"/>
                    <transaction mode="NONE"/>
                </distributed-cache>
                <distributed-cache name="namedCache" mode="SYNC" start="EAGER"/>
            </cache-container>
            <cache-container name="security"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jca:1.1">
            <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
            <bean-validation enabled="true"/>
            <default-workmanager>
                <short-running-threads>
                    <core-threads count="50"/>
                    <queue-length count="50"/>
                    <max-threads count="50"/>
                    <keepalive-time time="10" unit="seconds"/>
                </short-running-threads>
                <long-running-threads>
                    <core-threads count="50"/>
                    <queue-length count="50"/>
                    <max-threads count="50"/>
                    <keepalive-time time="10" unit="seconds"/>
                </long-running-threads>
            </default-workmanager>
            <cached-connection-manager/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
        <subsystem xmlns="urn:jboss:domain:jgroups:1.2" default-stack="${jboss.default.jgroups.stack:udp}">
            <stack name="udp">
                <transport type="UDP" socket-binding="jgroups-udp"/>
                <protocol type="PING"/>
                <protocol type="MERGE2"/>
                <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
                <protocol type="FD_ALL"/>
                <protocol type="pbcast.NAKACK"/>
                <protocol type="UNICAST2"/>
                <protocol type="pbcast.STABLE"/>
                <protocol type="pbcast.GMS"/>
                <protocol type="UFC"/>
                <protocol type="MFC"/>
                <protocol type="FRAG2"/>
                <protocol type="RSVP"/>
            </stack>
            <stack name="tcp">
                <transport type="TCP" socket-binding="jgroups-tcp"/>
                <!--<protocol type="MPING" socket-binding="jgroups-mping"/>-->
                <protocol type="TCPPING">
                    <property name="initial_hosts">10.32.50.53[7600],10.32.50.64[7600]</property>
                </protocol>
                <protocol type="MERGE2"/>
                <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
                <protocol type="FD"/>
                <protocol type="VERIFY_SUSPECT"/>
                <protocol type="pbcast.NAKACK">
                    <property name="use_mcast_xmit">false</property>
                </protocol>
                <protocol type="UNICAST2"/>
                <protocol type="pbcast.STABLE"/>
                <protocol type="pbcast.GMS"/>
                <protocol type="UFC"/>
                <protocol type="MFC"/>
                <protocol type="FRAG2"/>
                <protocol type="RSVP"/>
            </stack>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jmx:1.1">
            <show-model value="true"/>
            <remoting-connector use-management-endpoint="false"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:modcluster:1.1">
            <mod-cluster-config advertise-socket="modcluster" connector="ajp" excluded-contexts="console">
                <dynamic-load-provider>
                    <load-metric type="busyness"/>
                </dynamic-load-provider>
            </mod-cluster-config>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:naming:1.2"/>
        <subsystem xmlns="urn:jboss:domain:remoting:1.1">
            <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:security:1.2">
            <security-domains>
                <security-domain name="other" cache-type="infinispan">
                    <authentication>
                        <login-module code="Remoting" flag="optional">
                            <module-option name="password-stacking" value="useFirstPass"/>
                        </login-module>
                        <login-module code="RealmUsersRoles" flag="required">
                            <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
                            <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
                            <module-option name="realm" value="ApplicationRealm"/>
                            <module-option name="password-stacking" value="useFirstPass"/>
                        </login-module>
                    </authentication>
                </security-domain>
                <security-domain name="jboss-web-policy" cache-type="infinispan">
                    <authorization>
                        <policy-module code="Delegating" flag="required"/>
                    </authorization>
                </security-domain>
            </security-domains>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:threads:1.1">
            <thread-factory name="infinispan-factory" group-name="infinispan" priority="5"/>
            <unbounded-queue-thread-pool name="infinispan-transport">
                <max-threads count="25"/>
                <keepalive-time time="0" unit="milliseconds"/>
                <thread-factory name="infinispan-factory"/>
            </unbounded-queue-thread-pool>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:transactions:1.2">
            <core-environment>
                <process-id>
                    <uuid/>
                </process-id>
            </core-environment>
            <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
            <coordinator-environment default-timeout="300"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
            <virtual-server name="default-host" enable-welcome-root="false">
                <alias name="localhost"/>
                <alias name="example.com"/>
            </virtual-server>
        </subsystem>
    </profile>
    <interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:10.32.222.111}"/>
        </interface>
        <interface name="public">
            <inet-address value="${jboss.bind.address:10.32.222.111}"/>
        </interface>
    </interfaces>
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
        <socket-binding name="ajp" port="8089"/>
        <socket-binding name="hotrod" port="11222"/>
        <socket-binding name="http" port="8080"/>
        <socket-binding name="https" port="8443"/>
        <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45700"/>
        <socket-binding name="jgroups-tcp" port="7600"/>
        <socket-binding name="jgroups-tcp-fd" port="57600"/>
        <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45688"/>
        <socket-binding name="jgroups-udp-fd" port="54200"/>
        <socket-binding name="memcached" port="11211"/>
        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.115" multicast-port="23364"/>
        <socket-binding name="remoting" port="4447"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <socket-binding name="websocket" port="8181"/>
    </socket-binding-group>
</server>

远程进程:服务:jmx:远程处理-jmx://10.32.222.111:4447

我将用户添加到管理和应用领域

测试=2b1be81e1da41d4ea647bd82fc8c2bc9

但当我尝试连接它说:连接失败:重试

当我使用远程进程为:10.32.222.111:4447在服务器上提示警告:

16: 29:48084错误[org.jboss.remoting.remote.connection](remoting“djd7w4r1”read-1)JBREM000200:远程连接失败:java.io。IOException:收到的无效消息长度为-2140864253

还禁用了远程身份验证:-Dcom.sun.management。jmxremote-Dcom.sun.management.jmxremote。ssl=false-Dcom.sun.management.jmxremote。authenticate=false-Dcom.sun.management.jmxremote.port=12345

仍然无法连接。

非常感谢您的帮助。谢谢

类路径:

    C:\Developer\JDK\Java\jdk1.6.0_34\lib\jconsole.jar;C:\Developer\JDK\Java\jdk1.6.0_34\lib\tools.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infini
span-server-6.0.0.CR1\jboss-modules.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers\base\org\jboss\
remoting-jmx\main\remoting-jmx-1.1.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers\base\org
\jboss\staxmapper\main\staxmapper-1.1.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers\base\
org\jboss\as\protocol\main\jboss-as-protocol-7.2.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\l
ayers\base\org\jboss\dmr\main\jboss-dmr-1.1.6.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers
\base\org\jboss\as\controller-client\main\jboss-as-controller-client-7.2.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.
0.0.CR1\modules\system\layers\base\org\jboss\threads\main\jboss-threads-2.1.0.Final.jar

共有1个答案

印宏阔
2023-03-14

您错过了一些jsole类路径上的jar。要么直接使用jconsole.sh(来自bin/目录),要么从这个脚本中找出您需要的内容并直接使用类路径。

 类似资料:
  • 我对php和mySQL是完全陌生的,并且正在尝试连接到远程数据库。这是我的代码:- $result=mysql_query(“Select*FROM Constants”); while($ROW=mysql_fetch_array($result)){echo$ROW['name']; echo“ ”;} mysql_close($con); 对这个问题有什么想法吗?马特·蒂亚

  • 我正在创建一个程序,它从一个文件中获取输入(在我的例子中,是学生姓名及其相关联的编号),并以预购形式(使用/iterator)、后置+后置形式(使用/recursive)打印出来。在我的驱动程序中,我已经成功地创建和添加了学生的名字+关联号码+用预购迭代器打印出来。然而,我的问题是当我尝试打印这两个递归方法时,我得到一个“Void type not allowed here”错误。这两个方法存储在

  • 我是infinispan的新手,通过实验学习。在尝试访问不同名称的远程缓存失败后,我需要一些帮助。下面是我的infinispan客户端-服务器模式未嵌入的场景。 1) 我在infinispan集群中启动了node1,并将默认远程缓存名称设置为node1\u cache--Hotrod服务器已启动 2) 已在infinispan群集中启动node2,并将默认远程缓存名称设置为node2\u cach

  • 本文向大家介绍Oracle 配置远程访问教程,包括了Oracle 配置远程访问教程的使用技巧和注意事项,需要的朋友参考一下 服务端配置 如果不想自己写,可以通过 Net Manager 来配置. 以下配置文件中的 localhost 改为 ip 地址,否则,远程不能访问. 1.网络监听配置 多个IP时,如下: 2.TNS 配置 多个IP时,如下: 3.停止和启动服务 先停止以下服务,然后再启动.

  • 各位大佬好,我的问题是这样: 我有一个服务器,我在服务器里自己安装了一个mongodb,假设外网访问是131.131.131.131:30303. 然后我在家里通过访问这个ip就能拿到。 而我在这个服务器上部署了一个服务,连接这个mongo使用的是127.0.0.1:30303。 但发生了异常:我在家里通过ip远程(程序访问)访问,拿回来700多的数据。 但是 在服务上的程序通过127访问mong

  • 问题内容: 我正在使用JBoss运行客户端/服务器应用程序。 如何连接到服务器JVM的MBeanServer?我想使用MemoryMX MBean来跟踪内存消耗。 我可以使用JNDI查找连接到JBoss MBeanServer,但是java.lang.MemoryMX MBean没有在JBoss MBeanServer中注册。 编辑:要求是从客户端以编程方式访问内存使用情况。 问题答案: 与JBo