2 Replies Latest reply on Aug 3, 2009 5:04 PM by lchoy

    Binding Twiddle only with localhost

      Hi All

      We are in need to bind the twiddle locally. By which we will be able to invoke it only in the local machine and the remote access thro twiddle will be blocked.

      I googled and got the below link to do wat i needed

      see "*Binding the JMX invoker to localhost - HIGHLY RECOMMENDED:* " in

      http://kbase.redhat.com/faq/docs/DOC-5477

      When i tried the above mentioned steps and started the server, i get this deployment exception.

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.admin:service=PluginManager
      State: CONFIGURED
      I Depend On:
      jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
      Depends On Me:
      jboss.web.deployment:war=web-console.war,id=-653617

      ObjectName: jboss.web.deployment:war=web-console.war,id=-653617
      State: NOTYETINSTALLED
      I Depend On:
      jboss.admin:service=PluginManager

      ObjectName: jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
      State: CONFIGURED
      I Depend On:
      jboss:service=invoker,type=jrmp,host=localhost
      jboss.jmx:type=adaptor,name=Invoker
      jboss:service=Naming
      Depends On Me:
      jboss.admin:service=PluginManager
      jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=jrmp

      ObjectName: jboss.jmx:type=adaptor,name=MBeanProxyRemote,protocol=jrmp
      State: CONFIGURED
      I Depend On:
      jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss:service=invoker,type=jrmp,host=localhost
      State: NOTYETINSTALLED
      Depends On Me:
      jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory

      Twiddle was not working from both local and remote
      Only after reverting we the changes, twiddle was accessible form both local and remote. Need an aaproach so the twiddle is alllowed only when it is invoked from local machine.

        • 1. Re: Binding Twiddle only with localhost

          Contents of http://kbase.redhat.com/faq/docs/DOC-5477

           It is recommended that the jmx-invoker be bound specifically to localhost only. Do it as follows:
          
           In server/<configuration>/conf/jboss-service.xml, look for RMI/JRMP invoker section and update ServerAddress to be localhost. The section should then look something like:
          
           <!-- RMI/JRMP invoker -->
           <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
           name="jboss:service=invoker,type=jrmp">
           <attribute name="RMIObjectPort">4444</attribute>
           <attribute name="ServerAddress">localhost</attribute>
           ....
          
          
          
          In server/<configuration>/deploy/jmx-invoker-service.xml Add the following lines inside the <server> section:
          
           <!-- A pooled invoker bound to localhost -->
           <mbean code="org.jboss.invocation.pooled.server.PooledInvoker"
           name="jboss:service=invoker,type=pooled,host=localhost">
           <attribute name="NumAcceptThreads">1</attribute>
           <attribute name="MaxPoolSize">300</attribute>
           <attribute name="ClientMaxPoolSize">300</attribute>
           <attribute name="SocketTimeout">60000</attribute>
           <attribute name="ServerBindAddress">localhost</attribute>
           <attribute name="ServerBindPort">4443</attribute>
           <attribute
           name="ClientConnectAddress">localhost</attribute>
           <attribute name="ClientConnectPort">0</attribute>
           <attribute name="ClientRetryCount">1</attribute>
           <attribute name="EnableTcpNoDelay">false</attribute>
           <depends
           optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
          
          
          And in the '<mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"' section, change the <depends> element with optional-attribute-name="InvokerName" to "jboss:service=invoker,type=pooled,host=localhost" so that it looks like:
          
          <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=pooled,host=localhost</depends>
          
          


          • 2. Re: Binding Twiddle only with localhost
            lchoy

            In server/configuration/deploy/jmx-invoker-service.xml, add a closing

            </mbean>
            tag to the end of the definition for the pooled invoker bound to localhost.

            This worked for me on JBoss 4.2.2, but not JBoss AS 5.x.