tfonteyn / profilecloner Goto Github PK
View Code? Open in Web Editor NEWclones a full/partial profile from a running Wildfly or EAP 6/7 server into a CLI batch file
clones a full/partial profile from a running Wildfly or EAP 6/7 server into a CLI batch file
When cloning an ha profile, for these subsystems noted below, the resulting jbcli in error is:
/profile="ha-adrien"/subsystem="jca"/workmanager="default"/long-running-threads="default":add(core-threads="50",keepalive-time={"time" => "10","unit" => "SECONDS"},max-threads="50",name="default",queue-length="50")
/profile="ha-adrien"/subsystem="jca"/workmanager="default"/short-running-threads="default":add(core-threads="50",keepalive-time={"time" => "10","unit" => "SECONDS"},max-threads="50",name="default",queue-length="50")
/profile="ha-adrien"/subsystem="ejb3"/service="timer-service":add(default-data-store="default-file-store",thread-pool-name="default")
The jboss-cli.sh error for example:
'name' is not found among the supported properties: [thread-factory, queue-length, core-threads, max-threads, handoff-executor, allow-core-timeout, keepalive-time]
Removing name="default" will work with success.
Not sure if this is a problem with the profilecloner or our environment.
Attached the subsystem xml from domain.xml
I'm exporting from JBoss EAP 6.4.18 - the server I'm looking at has two outbound-socket-binding
nodes in <socket-binding-group name="standard-sockets"
, both for mail, but neither were exported. Is this expected? Or a bug?
I'm trying to create a clone of full-ha profile, but the batch fails without giving any real cause for the failure.
When I've tried running the lines one by one, there are several ones which fail (won't list all here) but at least some seem to be depending on order of adds, ex:
domain@localhost:9990 /] /profile="kims-test"/subsystem="jsr77":add()
{
"outcome" => "failed",
"failure-description" => {"domain-failure-description" => "WFLYCTL0369: Required capabilities are not available:
org.wildfly.management.jmx in context 'profile=kims-test'; Possible registration points for this capability:
/profile=*/subsystem=jmx"},
"rolled-back" => true
}
but if I add jmx first, then jsr77 can be added (but in the batch file jsr77 was before jmx)
Some additions failed because they had name="xxx" and it complained that name was not a valid attribute
Sorry for a really messy report...
Any chance you could test this with WF10?
bash$ java -cp /home/remote/klape/work/product-distributions/bin/client/jboss-cli-client.jar:./target/profilecloner-2014-08-24.jar org.jboss.tfonteyne.profilecloner.Main profile
Aug 28, 2014 12:55:24 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA-redhat-1
Aug 28, 2014 12:55:24 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA-redhat-1
Aug 28, 2014 12:55:24 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.18.GA-redhat-1
java.lang.IllegalArgumentException: newValue is null
at org.jboss.dmr.ModelNode.set(ModelNode.java:499)
at org.jboss.dmr.ModelNode.set(ModelNode.java:687)
at org.jboss.dmr.ModelNode.add(ModelNode.java:1145)
at org.jboss.tfonteyne.profilecloner.GenericCloner.getSource(GenericCloner.java:84)
at org.jboss.tfonteyne.profilecloner.GenericCloner.copy(GenericCloner.java:75)
at org.jboss.tfonteyne.profilecloner.Main.<init>(Main.java:134)
at org.jboss.tfonteyne.profilecloner.Main.main(Main.java:113)
Exporting the following configuration:
<stack name="tcpping">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPPING">
<property name="port_range">
0
</property>
<property name="timeout">
2000
</property>
I expect:
/profile=full-ha/subsystem=jgroups/stack=tcpping/protocol=TCPPING/property=port_range:add(value=0)
/profile=full-ha/subsystem=jgroups/stack=tcpping/protocol=TCPPING/property=timeout:add(value=2000)
instead I get:
/profile=full-ha/subsystem=jgroups/stack=tcpping/protocol=TCPPING:add-protocol(value=0)
/profile=full-ha/subsystem=jgroups/stack=tcpping/protocol=TCPPING:add-protocol(value=2000)
Attempting to execute with Wildfly 10.0.0.Final on a Windows 10 PC.
I created the attached batch file using the example .sh file
I receive an ominous warning (see title) followed by a java exception and stacktrace:
C:\s\ProfileCloner>cliCloner test.txt
$0 16Aug2016 Connect to WF10 CLI export utility
C:\s\ProfileCloner>SET CLASSPATH=.;c:\s\java32\lib\tools.jar;c:\s\jclasses\drivers\mysql.jar;C:\s\jclasses\jsoup\jsoup-1.6.3.jar;C:\s\wildfly-10.0.0.Final\bin\client\jboss-cli-client.jar;c:\s\ProfileCloner\profileCloner.jar
C:\s\ProfileCloner>java org.jboss.tfonteyne.profilecloner.Main --controller=GERRYDESKTOPPC --username=matteg --password=secret --file=test.txt --add-deployments=false /from=subsystem/mail mail
Aug 16, 2016 11:42:45 AM org.xnio.Xnio
INFO: XNIO version 3.3.4.Final
Aug 16, 2016 11:42:45 AM org.xnio.nio.NioXnio
INFO: XNIO NIO Implementation Version 3.3.4.Final
Aug 16, 2016 11:42:45 AM org.jboss.remoting3.EndpointImpl
INFO: JBoss Remoting version 4.0.18.Final
Aug 16, 2016 11:42:46 AM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO: Warning! The CLI is running in a non-modular environment and cannot load commands from management extensions.
Warning! The CLI is running in a non-modular environment and cannot load commands from management extensions.
java.lang.ArrayIndexOutOfBoundsException: Invalid address pair: mail
at org.jboss.tfonteyne.profilecloner.Address.(Address.java:44)
at org.jboss.tfonteyne.profilecloner.AddressStack.(AddressStack.java:43)
at org.jboss.tfonteyne.profilecloner.GenericCloner.(GenericCloner.java:78)
at org.jboss.tfonteyne.profilecloner.Main.(Main.java:131)
at org.jboss.tfonteyne.profilecloner.Main.main(Main.java:112)
C:\s\ProfileCloner>echo off
Waiting for 0 seconds, press a key to continue ...
C:\s\ProfileCloner>
cliCloner.bat.txt
GenericCloner.java:
// JGroups protocols are set with "add-protocol" instead of the normal "add"
if ((addressString.matches(".*/subsystem=\"jgroups\"/stack=.*/protocol=.*"))
// but do not do this for child resources
&& (!addressString.matches(".*/subsystem=\"jgroups\"/stack=.*/protocol=.*/.*=.*"))
) {
destinationAddress.pop();
commands.add(0, buildAdd("add-protocol", attributes));
return commands;
}
When I comment out the above block I get a working script that does not complain that child 'type' does not exist:
[domain@localhost:9990 /] /profile="ha"/subsystem="jgroups"/stack="tcp":add-protocol()
{
"outcome" => "failed",
"failure-description" => {"domain-failure-description" => "WFLYCTL0158: Operation handler failed: java.util.NoSuchElementException: No child 'type' exists"},
"rolled-back" => true
}
Hi,
I really need to get this working on JBoss EAP 6.0.1.
When I run the following command (have taken out sensitive info..) there isn't any output, its blank and an error isn't generated either.
java -cp /usr/share/jboss-as/modules/org/jboss/as/cli/main/jboss-as-cli-7.1.3.Final-redhat-4.jar:profilecloner.jar org.jboss.tfonteyne.profilecloner.Main --controller=hostname --port=9999 --username=dave --password=**** "/socket-binding-group=full-ha-sockets full-ha-sockets-copy"
or:
java -cp /usr/share/jboss-as/modules/org/jboss/as/cli/main/jboss-as-cli-7.1.3.Final-redhat-4.jar:profilecloner.jar org.jboss.tfonteyne.profilecloner.Main --controller=hostname --port=9999 --username=dave --password=**** "/profile=full-ha full-ha-copy"
I need to be able to clone the Full and Full-HA profile on JBoss EAP 6.0.1.
java -version
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.