1 Reply Latest reply on Jun 14, 2012 10:28 AM by adinn

    Load rules in a remote agent.

      Is it possible to load rules in an agent that is running on a remote server from a local machine?

        • 1. Re: Load rules in a remote agent.
          adinn

          Hi Albert

          Albert Tresens wrote:

           

          Is it possible to load rules in an agent that is running on a remote server from a local machine?

           

          The Byteman agent listener and the Byteman submit program communicate using, respectively, a client socket and server socket. So, if the agent listener is configure to listen on a socket on the remote host which can be accessed from the local client then yes the client can upload to it.

           

          For example, assume your java program is started on machine remotehost.mydomain.com using the followng java command

           

          java -javaagent:${BYTEMAN_HOME}/byteman.jar=host:remotehost.mydomain.com,port:12345,listener:true \
              org.myMyApp foo bar baz

           

          The agent will open a network server socket using whatever address remotehost.mydomain.com resolves to and port number 12345.

           

          Now run bmsubmit.sh from machine thishost.mydomain.com and tell it to use te same address and socket

           

          bmsubmit.sh -h remotehost.mydomain.com -p 12345 myscript.btm

           

          bmsubmit will talk to the agent running on remotehost.

           

          Of course, whether the socket is accessible may depend upon the configuration of your firewall or any other security mechanisms you might have in palce to  control whether server sockets can be accessed.