2 Replies Latest reply on Jan 28, 2013 8:39 AM by Bernd Koecke

    7.2.0.Alpha1 can't configure JGroups subsystem with a CLI script

    Bernd Koecke Novice

      Hello,

       

      today I updated my 7.2.0.Alpha1 git checkout to the newest version and tried to configure the JGroups subsystem with the follwowing CLI script:

       

      batch

      /extension=org.jboss.as.clustering.jgroups:add

      run-batch

       

      batch

      /subsystem=jgroups:add(default-stack=udp)

      /subsystem=jgroups/stack=udp:add(transport={"type"=>"UDP","socket-binding"=>"jgroups-udp"},protocols=["PING","MERGE3","FD_SOCK","FD","VERIFY_SUSPECT","BARRIER","pbcast.NAKACK2","UNICAST2","pbcast.STABLE","pbcast.GMS","UFC","MFC","FRAG2","RSVP"])

      /subsystem=jgroups/stack=udp/protocol=FD_SOCK:write-attribute(name=socket-binding,value=jgroups-udp-fd)

      /subsystem=jgroups/stack=tcp:add(transport={"type"=>"TCP","socket-binding"=>"jgroups-tcp"},protocols=["MPING","MERGE2","FD_SOCK","FD","VERIFY_SUSPECT","pbcast.NAKACK2","UNICAST2","pbcast.STABLE","pbcast.GMS","UFC","MFC","FRAG2","RSVP"])

      /subsystem=jgroups/stack=tcp/protocol=MPING:write-attribute(name=socket-binding,value=jgroups-mping)

      /subsystem=jgroups/stack=tcp/protocol=FD_SOCK:write-attribute(name=socket-binding,value=jgroups-tcp-fd)

      run-batch

       

      In earlier versions it was possible to configure the protocols in one command, like "transport". But the "protocols" attribute is a list of String now. So I do the above two step approach. After sending the lines, I looked into the server configuration with the Swing GUI of jboss-cli-sh. The list of protocol objects is generated as expected, but the "protocols" attribute of both stacks, "stack=udp" and "stack=tcp", contains the list of protocol names twice. When the configuration is persisted to the standalone.xml file, I get the following list (for tcp it looks the same):

       

      <stack name="udp">

        <transport type="UDP" socket-binding="jgroups-udp"/>

        <protocol type="PING"/>

        <protocol type="MERGE3"/>

        <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>

        <protocol type="FD"/>

        <protocol type="VERIFY_SUSPECT"/>

        <protocol type="BARRIER"/>

        <protocol type="pbcast.NAKACK2"/>

        <protocol type="UNICAST2"/>

        <protocol type="pbcast.STABLE"/>

        <protocol type="pbcast.GMS"/>

        <protocol type="UFC"/>

        <protocol type="MFC"/>

        <protocol type="FRAG2"/>

        <protocol type="RSVP"/>

        <protocol type="PING"/>

        <protocol type="MERGE3"/>

        <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>

        <protocol type="FD"/>

        <protocol type="VERIFY_SUSPECT"/>

        <protocol type="BARRIER"/>

        <protocol type="pbcast.NAKACK2"/>

        <protocol type="UNICAST2"/>

        <protocol type="pbcast.STABLE"/>

        <protocol type="pbcast.GMS"/>

        <protocol type="UFC"/>

        <protocol type="MFC"/>

        <protocol type="FRAG2"/>

        <protocol type="RSVP"/>

      </stack>

       

      This results in an error when the server restarts. When I shutdown the server and remove the second half of both protocol lists, the server comes up and all is working fine. But how can I define the protocol list with a CLI script? Even when I configure only a single "PING" protocol for the udp stack I end up with ["PING","PING"] for attribute "protocols" in the CLI GUI and get the following XML:

       

      <stack name="udp">

        <transport type="UDP" socket-binding="jgroups-udp"/>

        <protocol type="PING"/>

        <protocol type="PING"/>

      </stack>

       

      It would be nice if you can tell me what I am doing wrong and what the right CLI commands are. Thanks a lot for your help!

       

      Best regards

      Bernd