k_satish22
asked on
Jython Script
Hello HonorGod,
Thank you very much for help on my previous questions.
Now I am looking for a script to take properties files as input to configure NameSpaceBinding and MQ Queue Configurations. I have 1200 different NameSpaceBinding to be configured and 1200 MQ Queue to be configured. You help will be highly appreciated.
Script -1
Script to create NameSpaceBinding by taking input from Properties files.
Command :
AdminConfig.create('String NameSpaceB inding', AdminConfig.getid('/Cell:P roc01/Node :wps1Node0 1/Server:s erver1/'), '[[name "CACHE_SWITCH"] [nameInNameSpace "CACHE_SWITCH"] [stringToBind "ON"]]')
The Properties file will contain –
Scope=
Name: nameInNameSpace, stringToBind
Property:Value= CACHE_SWITCH, CACHE_SWITCH,ON
Script-2
Need a script to Create MQ Queues by taking properties from properties file.
Command –
Example
AdminTask.createWMQQueue(' Proc1(cell s/Proc1|ce ll.xml)', '[-name Queue1 -jndiName Queue1 -queueName Queue1 -qmgr QMGR1 -description -customProperties [[MDREAD YES] [MDMSGCTX SET_ALL_CONTEXT] [MSGBODY MQ]]]')
For the this script in the properties file will have
Scope=
Name:Destination JNDI Name,Qmgr name,Base queue name,Targate client, MDREAD, MDMSGCTX, MSGBODY
Property:Value=Queue1:Queu e1,QMG1,Qu eue1,JMS, YES, SET_ALL_CONTEXT, MQ
MDREAD, MDMSGCTX and MSGBODY are custom properties.
Thank you very much for help on my previous questions.
Now I am looking for a script to take properties files as input to configure NameSpaceBinding and MQ Queue Configurations. I have 1200 different NameSpaceBinding to be configured and 1200 MQ Queue to be configured. You help will be highly appreciated.
Script -1
Script to create NameSpaceBinding by taking input from Properties files.
Command :
AdminConfig.create('String
The Properties file will contain –
Scope=
Name: nameInNameSpace, stringToBind
Property:Value= CACHE_SWITCH, CACHE_SWITCH,ON
Script-2
Need a script to Create MQ Queues by taking properties from properties file.
Command –
Example
AdminTask.createWMQQueue('
For the this script in the properties file will have
Scope=
Name:Destination JNDI Name,Qmgr name,Base queue name,Targate client, MDREAD, MDMSGCTX, MSGBODY
Property:Value=Queue1:Queu
MDREAD, MDMSGCTX and MSGBODY are custom properties.
ASKER
Please find my answers below...
- Does the Scope entry identify the scope of a namespace binding to be created?
Yes.
- Are there multiple Scope entries in the file?
No
- Is the order guaranteed to be that shown above?
The oder should not be changed. If you have some other idea that you can yo use it.
- How do the "values" for the scope record relate to the create() parameters?
please find the attached script and properties file. They may help you.
createMQ.py
createMQ.txt
- Does the Scope entry identify the scope of a namespace binding to be created?
Yes.
- Are there multiple Scope entries in the file?
No
- Is the order guaranteed to be that shown above?
The oder should not be changed. If you have some other idea that you can yo use it.
- How do the "values" for the scope record relate to the create() parameters?
please find the attached script and properties file. They may help you.
createMQ.py
createMQ.txt
ASKER
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.properties]"
createMQ: INFO --- In main function
createMQ: INFO --- Loading the properties to Hash Map => START......
createMQ: INFO --- Loading the properties to Hash Map => DONE.
createMQ: INFO --- Adding property value to servers START......
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 129, in ?
File "<string>", line 122, in main
File "<string>", line 46, in createPropValues
java.lang.IllegalAccessExc eption: Class org.python.core.PyReflecte dFunction can not access a member of class java.util.HashMap$Abstract MapIterato r with modifiers "public"
at sun.reflect.Reflection.ens ureMemberA ccess(Refl ection.jav a:65)
at java.lang.reflect.Method.i nvoke(Meth od.java:59 1)
at org.python.core.PyReflecte dFunction. __call__(P yReflected Function.j ava)
at org.python.core.PyMethod._ _call__(Py Method.jav a)
at org.python.core.PyObject._ _call__(Py Object.jav a)
at org.python.core.PyInstance .invoke(Py Instance.j ava)
at org.python.pycode._pyx47.c reatePropV alues$2(<s tring>:46)
at org.python.pycode._pyx47.c all_functi on(<string >)
at org.python.core.PyTableCod e.call(PyT ableCode.j ava)
at org.python.core.PyTableCod e.call(PyT ableCode.j ava)
at org.python.core.PyFunction .__call__( PyFunction .java)
at org.python.pycode._pyx47.m ain$5(<str ing>:122)
at org.python.pycode._pyx47.c all_functi on(<string >)
at org.python.core.PyTableCod e.call(PyT ableCode.j ava)
at org.python.core.PyTableCod e.call(PyT ableCode.j ava)
at org.python.core.PyFunction .__call__( PyFunction .java)
at org.python.pycode._pyx47.f $0(<string >:129)
at org.python.pycode._pyx47.c all_functi on(<string >)
at org.python.core.PyTableCod e.call(PyT ableCode.j ava)
at org.python.core.PyCode.cal l(PyCode.j ava)
at org.python.core.Py.runCode (Py.java)
at org.python.core.Py.exec(Py .java)
at org.python.util.PythonInte rpreter.ex ec(PythonI nterpreter .java)
at com.ibm.bsf.engines.jython .JythonEng ine$BSFPyt honInterpr eter.exec( Unknown Source)
at com.ibm.bsf.engines.jython .JythonEng ine.exec(U nknown Source)
at com.ibm.bsf.BSFManager$6.r un(Unknown Source)
at java.security.AccessContro ller.doPri vileged(Ac cessContro ller.java: 251)
at com.ibm.bsf.BSFManager.exe c(Unknown Source)
at com.ibm.ws.scripting.Abstr actShell.e xecuteScri pt(Abstrac tShell.jav a:1189)
at com.ibm.ws.scripting.Abstr actShell.r un(Abstrac tShell.jav a:2202)
at com.ibm.ws.scripting.WasxS hell.main( WasxShell. java:1010)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:48 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:60 0)
at com.ibm.wsspi.bootstrap.WS Launcher.l aunchMain( WSLauncher .java:213)
at com.ibm.wsspi.bootstrap.WS Launcher.m ain(WSLaun cher.java: 93)
at com.ibm.wsspi.bootstrap.WS Launcher.r un(WSLaunc her.java:7 4)
at org.eclipse.core.internal. runtime.Pl atformActi vator$1.ru n(Platform Activator. java:78)
at org.eclipse.core.runtime.i nternal.ad aptor.Ecli pseAppLaun cher.runAp plication( EclipseApp Launcher.j ava:92)
at org.eclipse.core.runtime.i nternal.ad aptor.Ecli pseAppLaun cher.start (EclipseAp pLauncher. java:68)
at org.eclipse.core.runtime.a daptor.Ecl ipseStarte r.run(Ecli pseStarter .java:400)
at org.eclipse.core.runtime.a daptor.Ecl ipseStarte r.run(Ecli pseStarter .java:177)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:48 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:60 0)
at org.eclipse.core.launcher. Main.invok eFramework (Main.java :336)
at org.eclipse.core.launcher. Main.basic Run(Main.j ava:280)
at org.eclipse.core.launcher. Main.run(M ain.java:9 77)
at com.ibm.wsspi.bootstrap.WS PreLaunche r.launchEc lipse(WSPr eLauncher. java:340)
at com.ibm.wsspi.bootstrap.WS PreLaunche r.main(WSP reLauncher .java:110)
java.lang.IllegalAccessExc eption: java.lang.IllegalAccessExc eption: Class org.python.core.PyReflecte dFunction can not access a member of class java.util.HashMap$Abstract MapIterato r with modifiers "public"
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.properties]"
createMQ: INFO --- In main function
createMQ: INFO --- Loading the properties to Hash Map => START......
createMQ: INFO --- Loading the properties to Hash Map => DONE.
createMQ: INFO --- Adding property value to servers START......
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 129, in ?
File "<string>", line 122, in main
File "<string>", line 46, in createPropValues
java.lang.IllegalAccessExc
at sun.reflect.Reflection.ens
at java.lang.reflect.Method.i
at org.python.core.PyReflecte
at org.python.core.PyMethod._
at org.python.core.PyObject._
at org.python.core.PyInstance
at org.python.pycode._pyx47.c
at org.python.pycode._pyx47.c
at org.python.core.PyTableCod
at org.python.core.PyTableCod
at org.python.core.PyFunction
at org.python.pycode._pyx47.m
at org.python.pycode._pyx47.c
at org.python.core.PyTableCod
at org.python.core.PyTableCod
at org.python.core.PyFunction
at org.python.pycode._pyx47.f
at org.python.pycode._pyx47.c
at org.python.core.PyTableCod
at org.python.core.PyCode.cal
at org.python.core.Py.runCode
at org.python.core.Py.exec(Py
at org.python.util.PythonInte
at com.ibm.bsf.engines.jython
at com.ibm.bsf.engines.jython
at com.ibm.bsf.BSFManager$6.r
at java.security.AccessContro
at com.ibm.bsf.BSFManager.exe
at com.ibm.ws.scripting.Abstr
at com.ibm.ws.scripting.Abstr
at com.ibm.ws.scripting.WasxS
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at com.ibm.wsspi.bootstrap.WS
at com.ibm.wsspi.bootstrap.WS
at com.ibm.wsspi.bootstrap.WS
at org.eclipse.core.internal.
at org.eclipse.core.runtime.i
at org.eclipse.core.runtime.i
at org.eclipse.core.runtime.a
at org.eclipse.core.runtime.a
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.eclipse.core.launcher.
at org.eclipse.core.launcher.
at org.eclipse.core.launcher.
at com.ibm.wsspi.bootstrap.WS
at com.ibm.wsspi.bootstrap.WS
java.lang.IllegalAccessExc
ok, it's going to take me a bit to get my head around your code. Thanks for providing it.
hm. Can I make extensive changes to your code?
Or, do you prefer for me to make minimum changes?
Or, do you prefer for me to make minimum changes?
It appears that you prefer Java constructs to Jython ones.
Is that what you prefer that I use? Or should I, as part of the modification, use Jython idioms, instead?
Is that what you prefer that I use? Or should I, as part of the modification, use Jython idioms, instead?
ASKER
I just send that script as an example. You can use which every is easy and convient for you.
ASKER
Hello HonorGod,
Any luck? If you can give me the scripts today that will be highly appreciated. I have some deadline to meet. I am really sorry for the rush.
Thanks
Any luck? If you can give me the scripts today that will be highly appreciated. I have some deadline to meet. I am really sorry for the rush.
Thanks
Something like this perhaps?
createMQ.py
createMQ.py
ASKER
Thank you HonorGod for the script. But when I am executing the script it is failing with below information.
./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
Error: Unexpected number of parameters: 1
Command: createMQ.txt
Purpose: Use the information from the specified properties file, and use it to
create the specified MQ items.
Usage: wsadmin -f createMQ.txt.py <propertiesFileName>
Example: ./wsadmin.sh -f createMQ.txt.py createMQ.txt.txt
./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
Error: Unexpected number of parameters: 1
Command: createMQ.txt
Purpose: Use the information from the specified properties file, and use it to
create the specified MQ items.
Usage: wsadmin -f createMQ.txt.py <propertiesFileName>
Example: ./wsadmin.sh -f createMQ.txt.py createMQ.txt.txt
oops. Sorry.
I also realized that I forgot to call save() or do a sync()... sigh
Please forgive my earlier attempt
createMQ.py
I also realized that I forgot to call save() or do a sync()... sigh
Please forgive my earlier attempt
createMQ.py
ASKER
Now it is failing with below error
$ ./wsadmin.sh -lang jython -f /opt/app/IBM/WebSphere/Pro cDmgr70/pr ofiles/Pro cDmgr01/bi n/createMQ .py /opt/app/IBM/WebSphere/Pro cDmgr70/pr ofiles/Pro cDmgr01/bi n/createMQ .txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[/opt/app/IBM/WebSphere/P rocDmgr70/ profiles/P rocDmgr01/ bin/create MQ.txt]"
WASX7017E: Exception received while running file "/opt/app/IBM/WebSphere/Pr ocDmgr70/p rofiles/Pr ocDmgr01/b in/createM Q.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
(no code object) at line 0
File "<string>", line 179
if ( node no in [ 'was_dmgr_node', 'wps_dmgr_node' ] :
^
$ ./wsadmin.sh -lang jython -f /opt/app/IBM/WebSphere/Pro
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[/opt/app/IBM/WebSphere/P
WASX7017E: Exception received while running file "/opt/app/IBM/WebSphere/Pr
Traceback (innermost last):
(no code object) at line 0
File "<string>", line 179
if ( node no in [ 'was_dmgr_node', 'wps_dmgr_node' ] :
^
stupid, stupid, stupid...
That line should be:
if node not in [ 'was_dmgr_node', 'wps_dmgr_node' ] :
createMQ.py
That line should be:
if node not in [ 'was_dmgr_node', 'wps_dmgr_node' ] :
createMQ.py
ASKER
Now I am getting below Error.
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 214, in ?
IndexError: index out of range: 1
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 214, in ?
IndexError: index out of range: 1
That's what I get for testing with Jython, and not wsadmin :-(
createMQ.py
createMQ.py
ASKER
Thank you so much for the script. But when I am setting the Scope to Cell it failing with below error.
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.ws.scripting.Scrip tingExcept ion: Invalid object name: /Cell:ProcCell01/ProcCell0 1/JMSProvi der:WebSph ere MQ JMS Provider
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.ws.scripting.Scrip
ASKER
I am sorry. The issues is with the properties file Now I corrected. But I am getting below error.
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
createMQ: ERROR --- Unable to get WebSphere MQ JMS Provider at the scopeCell:ProcCell01specif ied.Check the logs for more information.
createMQ: ERROR --- Unable to get WebSphere MQ JMS Provider at the scopeCell:ProcCell01specif ied.Check the logs for more information.
createMQ: ERROR --- Unable to get WebSphere MQ JMS Provider at the scopeCell:ProcCell01specif ied.Check the logs for more information.
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main() 3 error(s) encountered
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
createMQ: ERROR --- Unable to get WebSphere MQ JMS Provider at the scopeCell:ProcCell01specif
createMQ: ERROR --- Unable to get WebSphere MQ JMS Provider at the scopeCell:ProcCell01specif
createMQ: ERROR --- Unable to get WebSphere MQ JMS Provider at the scopeCell:ProcCell01specif
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main() 3 error(s) encountered
hm. Super. Thanks for the output.
I'm checking line 75, now that I have access to my AppServer...
I think that it should be as shown below.
One moment please.
I'm checking line 75, now that I have access to my AppServer...
I think that it should be as shown below.
One moment please.
mqjmsp = AdminConfig.getid( '/Cell:%s/%s/JMSProvider:WebSphere MQ JMS Provider/' % ( cellName, scope )
Ah. Thanks for the update.
What is the output for serverStatus for all profiles?
To list all configured profile names, you can use:
*ix:
./manageprofiles.sh -listProfiles
Windows:
manageprofiles -listProfiles
Then, for each profile name listed, use:
*ix:
./serverStatus.sh -all -profileName <profileName>
Windows
serverStatus -all -profileName <profileName>
e.g.,
serverStatus -all -profileName AppSrv01
What is the output for serverStatus for all profiles?
To list all configured profile names, you can use:
*ix:
./manageprofiles.sh -listProfiles
Windows:
manageprofiles -listProfiles
Then, for each profile name listed, use:
*ix:
./serverStatus.sh -all -profileName <profileName>
Windows
serverStatus -all -profileName <profileName>
e.g.,
serverStatus -all -profileName AppSrv01
This will provide us with more information!
createMQ.py
createMQ.py
ASKER
After executing the above script I am getting the same error with more details. Please find the attached file for the results.
One More thing, for my second script on NameSpaceBinding do you have any script to export NameSpaceBinding from one Server and Import them to diffrent server. Instead of creating the NameSpaceBindings. I want to export all NameSpaceBindings at diffrent scopes and import them at the same scops.
Thank you very much for all your help.
OutPut.txt
One More thing, for my second script on NameSpaceBinding do you have any script to export NameSpaceBinding from one Server and Import them to diffrent server. Instead of creating the NameSpaceBindings. I want to export all NameSpaceBindings at diffrent scopes and import them at the same scops.
Thank you very much for all your help.
OutPut.txt
The problem is that in your input (Properties) file, you have scope as
Cell:ProcCell01
Which isn't what is needed.
Since the valid/configured MQ JMS Providers are as shown below, that the scope should be something like:
clusters/Rules_Cluster
or
clusters/NonClaims_Cluster
Does this make sense?
Cell:ProcCell01
Which isn't what is needed.
Since the valid/configured MQ JMS Providers are as shown below, that the scope should be something like:
clusters/Rules_Cluster
or
clusters/NonClaims_Cluster
Does this make sense?
"WebSphere MQ JMS Provider(cells/ProcCell01/clusters/Claims_Cluster|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/clusters/Cots_Cluster|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/clusters/ME_Cluster|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/clusters/NonClaims_Cluster|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/clusters/Rules_Cluster|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/dmgr1ProcNode01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps01Node01/servers/Claims1|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps01Node01/servers/Cots1|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps01Node01/servers/ME1|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps01Node01/servers/NonClaims1|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps01Node01/servers/Rules1|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps01Node01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps02Node01/servers/Claims2|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps02Node01/servers/Cots2|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps02Node01/servers/ME2|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps02Node01/servers/NonClaims2|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps02Node01/servers/Rules2|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/nodes/wps02Node01|resources.xml#builtin_mqprovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01|resources.xml#builtin_mqprovider)"
ASKER
The Script is working fine at Node and Server level when using
Scope=Node:wps01Node01
or
Scope=Node:wps01Node01/Ser ver:Cots1
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
createMQ: SUCCESS ---Created the Queue Sample1 at scope Node:wps01Node01/Server:Co ts1
createMQ: SUCCESS ---Created the Queue Sample2 at scope Node:wps01Node01/Server:Co ts1
createMQ: SUCCESS ---Created the Queue Sample3 at scope Node:wps01Node01/Server:Co ts1
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main() no error(s) encountered
Scope=Node:wps01Node01
or
Scope=Node:wps01Node01/Ser
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
createMQ: SUCCESS ---Created the Queue Sample1 at scope Node:wps01Node01/Server:Co
createMQ: SUCCESS ---Created the Queue Sample2 at scope Node:wps01Node01/Server:Co
createMQ: SUCCESS ---Created the Queue Sample3 at scope Node:wps01Node01/Server:Co
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main() no error(s) encountered
good.
So, what's next?
So, what's next?
Please note:
This error message is because of the way you originally had the SynchNode() check for the DM nodename.
I used the same kind of test.
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
If you want the code to correctly detect (and not try to synch) the DM, change line 182 from this:
if node not in [ 'was_dmgr_node', 'wps_dmgr_node' ] :
To correctly identify the DM node name(s), e.g.,
if node not in [ 'dmgr1ProcNode01', 'wps_dmgr_node' ] :
You might even be able to get by with something like:
if node.find( 'dmgr' ) < 0 :
Which only tries to synch for nodes what have a name that doesn't include "dmgr" somewhere in the node name.
Does that make sense?
This error message is because of the way you originally had the SynchNode() check for the DM nodename.
I used the same kind of test.
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
If you want the code to correctly detect (and not try to synch) the DM, change line 182 from this:
if node not in [ 'was_dmgr_node', 'wps_dmgr_node' ] :
To correctly identify the DM node name(s), e.g.,
if node not in [ 'dmgr1ProcNode01', 'wps_dmgr_node' ] :
You might even be able to get by with something like:
if node.find( 'dmgr' ) < 0 :
Which only tries to synch for nodes what have a name that doesn't include "dmgr" somewhere in the node name.
Does that make sense?
ASKER
The Script is not working at Cell Scope.
Cell:ProcCell01
Cell:ProcCell01
Ah, that's because the script, as originally written, didn't take that into account, and therefore I didn't consider it. One moment please
ASKER
One more thing: The script is not taking the custom properties "'MDREAD', ' MDMSGCTX', ' MSGBODY'
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
createMQ: ERROR --- Unexpecited roles specified: ['queue/sample_sat', 'INKMW00', 'NKM.ACQUISITION.WAS', 'JMS', 'MDREAD', ' MDMSGCTX', ' MSGBODY']
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main() 1 error(s) encountered
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: INFO --- processing queue names
createMQ: ERROR --- Unexpecited roles specified: ['queue/sample_sat', 'INKMW00', 'NKM.ACQUISITION.WAS', 'JMS', 'MDREAD', ' MDMSGCTX', ' MSGBODY']
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main() 1 error(s) encountered
I wonder if it would work for the cell if the scope were specified as
nodes/dmgr1ProcNode01
nodes/dmgr1ProcNode01
> The script is not taking the custom properties "'MDREAD', ' MDMSGCTX', ' MSGBODY'
When the Properties file contains these properties:
['queue/sample_sat', 'INKMW00', 'NKM.ACQUISITION.WAS', 'JMS', 'MDREAD', ' MDMSGCTX', ' MSGBODY']
Then I understand the stuff shown below.
However, you haven't told me how the rest are to be interpreted...
When the Properties file contains these properties:
['queue/sample_sat', 'INKMW00', 'NKM.ACQUISITION.WAS', 'JMS', 'MDREAD', ' MDMSGCTX', ' MSGBODY']
Then I understand the stuff shown below.
However, you haven't told me how the rest are to be interpreted...
'queue/sample_sat' == qjndiname
'INKMW00' == qManager
'NKM.ACQUISITION.WAS' == bqname
'JMS' == tclient
ASKER
My Bad I am sorry. Can you please include them. These values also can be hardcoded.
MDREAD = YES,
MDMSGCTX = SET_ALL_CONTEXT
MSGBODY = MQ
-customProperties [[MDREAD YES] [MDMSGCTX SET_ALL_CONTEXT] [MSGBODY MQ]]
MDREAD = YES,
MDMSGCTX = SET_ALL_CONTEXT
MSGBODY = MQ
-customProperties [[MDREAD YES] [MDMSGCTX SET_ALL_CONTEXT] [MSGBODY MQ]]
ASKER
I think the issue with the script is the script was initially developed configured at node level so it is not working at Cell level
mqjmsp = AdminConfig.getid( '/Cell:%s/%s/JMSProvider:W ebSphere MQ JMS Provider/' % ( cellName, scope ) )
In the script it is taking the Scope for Node as Node:wps01Node01 and it working fine
mqjmsp = AdminConfig.getid( '/Cell:Node/wps01Node01/JM SProvider: WebSphere MQ JMS Provider/' % ( cellName, scope ) )
When comming to Cell it is failing because of follwing issue. it taking Cell:Cell/ProcCell01 Instead of /Cell:ProcCell01
mqjmsp = AdminConfig.getid( '/Cell:Cell/ProcCell01/JMS Provider:W ebSphere MQ JMS Provider/' % ( cellName, scope ) )
mqjmsp = AdminConfig.getid( '/Cell:%s/%s/JMSProvider:W
In the script it is taking the Scope for Node as Node:wps01Node01 and it working fine
mqjmsp = AdminConfig.getid( '/Cell:Node/wps01Node01/JM
When comming to Cell it is failing because of follwing issue. it taking Cell:Cell/ProcCell01 Instead of /Cell:ProcCell01
mqjmsp = AdminConfig.getid( '/Cell:Cell/ProcCell01/JMS
I'm (very) surprised that
/Cell:Node/wps01Node01/
appears to work. The proper syntax is:
/Cell:/Node:wps01Node01/
or even better:
/Node:wps01Node01/
The statements you are showing appear to have been modified. The ones that I show in the code are:
mqjmsp = AdminConfig.getid( '/Cell:%s/%s/JMSProvider:W ebSphere MQ JMS Provider/' % ( cellName, scope ) )
which should cause the following string substitution to occur:
...
So, if we look at the point shown above (i.e., https://www.experts-exchange.com/questions/26928348/Jython-Script.html?cid=1572&anchorAnswerId=35314539#a35314539) identifies all of the valid configuration ID's for the configured MQ JMS Providers.
/Cell:Node/wps01Node01/
appears to work. The proper syntax is:
/Cell:/Node:wps01Node01/
or even better:
/Node:wps01Node01/
The statements you are showing appear to have been modified. The ones that I show in the code are:
mqjmsp = AdminConfig.getid( '/Cell:%s/%s/JMSProvider:W
which should cause the following string substitution to occur:
...
So, if we look at the point shown above (i.e., https://www.experts-exchange.com/questions/26928348/Jython-Script.html?cid=1572&anchorAnswerId=35314539#a35314539) identifies all of the valid configuration ID's for the configured MQ JMS Providers.
'/Cell:%s/%s/JMSProvider:WebSphere MQ JMS Provider/' % ( cellName, scope )
The value of cellName should be put in place of the first %s, and the value of scope should be put in place of the 2nd %s. So, if "cellName" is ProcCell01, the first phase of the substitution would have the string looking something like:
'/Cell:ProcCell01/%s/JMSProvider:WebSphere MQ JMS Provider/'
^^
The question is, at this point, what value of scope should we use/supply to identify that actual destination to be used.
ASKER
We need to supply below values in the properties file and the script should pick it from there.
CellName=ProcCell01
Scope=Node:dmgr1ProcNode01
Scope can be Cell, Node or Server
examples
Scope=Node:dmgr1ProcNode01
Server=Node:abcNode/Server :abcServer
Scope=Cell:ProcCell01
CellName=ProcCell01
Scope=Node:dmgr1ProcNode01
Scope can be Cell, Node or Server
examples
Scope=Node:dmgr1ProcNode01
Server=Node:abcNode/Server
Scope=Cell:ProcCell01
Why would you want to duplicate the cell if you want the cell scope?
CellName=ProcCell01
Scope=Cell:ProcCell01
CellName=ProcCell01
Scope=Cell:ProcCell01
ASKER
hmm. I dont want to duplicate. I thought it is a Mandatory value to be passed.
As a matter of fact, unless you are using something like Hypervisor Edition (www.IBM.com/software/webservers/appserv/hypervisor), then there will only be 1 Cell.
ASKER
I have only one cell.
So, the question is:
When you want the configuration scope to the the cell, what are the preferred values (in the Properties) file of CellName and Scope?
When you want the configuration scope to the the cell, what are the preferred values (in the Properties) file of CellName and Scope?
In fact, if the server name is unique (i.e., only exists in one node), then you shouldn't even have to specify (qualify) the server name with the node name.
The script could even figure it out.
What if you had:
CellName=
NodeName=
ServerName=
ClusterName=
in the first part of the Properties file, as well as something like:
Scope=(Cell|Cluster|Node|S erver)
The script could even figure it out.
What if you had:
CellName=
NodeName=
ServerName=
ClusterName=
in the first part of the Properties file, as well as something like:
Scope=(Cell|Cluster|Node|S
ASKER
I have a cluster environment and AppServer name are unique on nodes. If script can parse the values to proper nodes/servers then it is ok for me. Thanks alot for your help.
ASKER
Hi HonorGod,
Do you have a script handy to import and report Namespace Bindings from one environment other.
Thanks
Do you have a script handy to import and report Namespace Bindings from one environment other.
Thanks
Do you, by any chance, mean detail information about the configured NameSpaceBinding objects?
print AdminConfig.list( 'NameSpaceBinding' )
ASKER
I need a script to export and import Namespace Bindings from one environment other.
ok, that's a different question...
I'm not quite done with this one, at least not yet... ;-)
I'm not quite done with this one, at least not yet... ;-)
Do me a favor though, when you open that new question, please include the output of the following.
Thanks
Thanks
for ns in AdminConfig.list( 'NameSpaceBinding' ).splitlines() :
print ns
print '-' * 50
print AdminConfig.show( ns )
print '-' * 50
print
ASKER
Any Luck with the script... I am sorry to rush you, as I need accomplish my task by tomorrow.
This version attempts to do what was discussed above (i.e., http://e-ecom/Q_26928348.html#a35316498)
i.e., To define the scope in the properties file, provide the appropriate values of:
CellName, ClusterName, NodeName, and ServerName
Then, the value of Scope in the properties file must be 1 of:
Cell - CellName is required
Cluster - ClusterName is required, CellName is optional
Node - NodeName is required, CellName is optional
Server - ServerName is required, CellName and NodeName are optional
Let's see if this works for you.
createMQ.py
i.e., To define the scope in the properties file, provide the appropriate values of:
CellName, ClusterName, NodeName, and ServerName
Then, the value of Scope in the properties file must be 1 of:
Cell - CellName is required
Cluster - ClusterName is required, CellName is optional
Node - NodeName is required, CellName is optional
Server - ServerName is required, CellName and NodeName are optional
Let's see if this works for you.
createMQ.py
ASKER
Thank you for the script.
If I Want to define the scope at cell level then what I need to specify the properties file?
The values in the properties file are....
CellName=ProcCell01
Scope=ProcCell01
Property:Value=Sample_sat: queue/samp le_sat,INK MW00,NKM.A CQUISITION .WAS,JMS
when I try to use Cell as scope I am getting below error.
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Error unexpected "Scope" value: ProcCell01
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 284, in ?
File "<string>", line 155, in main
NameError: configID
If I Want to define the scope at cell level then what I need to specify the properties file?
The values in the properties file are....
CellName=ProcCell01
Scope=ProcCell01
Property:Value=Sample_sat:
when I try to use Cell as scope I am getting below error.
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Error unexpected "Scope" value: ProcCell01
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 284, in ?
File "<string>", line 155, in main
NameError: configID
Q: If I Want to define the scope at cell level then what I need to specify the properties file?
CellName=rocCell01
Scope=Cell
CellName=rocCell01
Scope=Cell
Sorry, there was a typographical error on line 155
configID should be scopeID, so the line should be:
Note: The indentation was right!
configID should be scopeID, so the line should be:
Note: The indentation was right!
if scopeID :
ASKER
Now I am getting follow error.
./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: ERROR --- Unable to locate WebSphere MQ JMS Provider at the specified scope. Check the logs for more information.
createMQ: Debug - configured JMSProviders:
-------------------------- ---------- ---------- ----
"WebSphere JMS Provider(cells/ProcCell01/ clusters/C laims_Clus ter|resour ces.xml#bu iltin_jmsp rovider)"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/C ots_Cluste r|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/M E_Cluster| resources. xml#builti n_jmsprovi der)"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/N onClaims_C luster|res ources.xml #builtin_j msprovider )"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/R ules_Clust er|resourc es.xml#bui ltin_jmspr ovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/dmgr 1ProcNode0 1|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Clai ms1|resour ces.xml#bu iltin_jmsp rovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Cots 1|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/ME1| resources. xml#builti n_jmsprovi der)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/NonC laims1|res ources.xml #builtin_j msprovider )"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Rule s1|resourc es.xml#bui ltin_jmspr ovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01|re sources.xm l#builtin_ jmsprovide r)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Clai ms2|resour ces.xml#bu iltin_jmsp rovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Cots 2|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/ME2| resources. xml#builti n_jmsprovi der)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/NonC laims2|res ources.xml #builtin_j msprovider )"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Rule s2|resourc es.xml#bui ltin_jmspr ovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01|re sources.xm l#builtin_ jmsprovide r)"
"WebSphere JMS Provider(cells/ProcCell01| resources. xml#builti n_jmsprovi der)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/C laims_Clus ter|resour ces.xml#bu iltin_mqpr ovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/C ots_Cluste r|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/M E_Cluster| resources. xml#builti n_mqprovid er)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/N onClaims_C luster|res ources.xml #builtin_m qprovider) "
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/R ules_Clust er|resourc es.xml#bui ltin_mqpro vider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/dmgr 1ProcNode0 1|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Clai ms1|resour ces.xml#bu iltin_mqpr ovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Cots 1|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/ME1| resources. xml#builti n_mqprovid er)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/NonC laims1|res ources.xml #builtin_m qprovider) "
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Rule s1|resourc es.xml#bui ltin_mqpro vider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01|re sources.xm l#builtin_ mqprovider )"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Clai ms2|resour ces.xml#bu iltin_mqpr ovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Cots 2|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/ME2| resources. xml#builti n_mqprovid er)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/NonC laims2|res ources.xml #builtin_m qprovider) "
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Rule s2|resourc es.xml#bui ltin_mqpro vider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01|re sources.xm l#builtin_ mqprovider )"
"WebSphere MQ JMS Provider(cells/ProcCell01| resources. xml#builti n_mqprovid er)"
-------------------------- ---------- ---------- ----
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 1 error(s) encountered.
./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: ERROR --- Unable to locate WebSphere MQ JMS Provider at the specified scope. Check the logs for more information.
createMQ: Debug - configured JMSProviders:
--------------------------
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01|
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01|
--------------------------
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 1 error(s) encountered.
Revised debug output to better understand what is occurring.
createMQ.py
createMQ.py
ASKER
here is the output...
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: ERROR --- Unable to locate WebSphere MQ JMS Provider at the specified scope. Check the logs for more information.
createMQ: Debug Begin:
ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
-------------------------- ---------- ---------- ----
"WebSphere JMS Provider(cells/ProcCell01/ clusters/C laims_Clus ter|resour ces.xml#bu iltin_jmsp rovider)"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/C ots_Cluste r|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/M E_Cluster| resources. xml#builti n_jmsprovi der)"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/N onClaims_C luster|res ources.xml #builtin_j msprovider )"
"WebSphere JMS Provider(cells/ProcCell01/ clusters/R ules_Clust er|resourc es.xml#bui ltin_jmspr ovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/dmgr 1ProcNode0 1|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Clai ms1|resour ces.xml#bu iltin_jmsp rovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Cots 1|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/ME1| resources. xml#builti n_jmsprovi der)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/NonC laims1|res ources.xml #builtin_j msprovider )"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Rule s1|resourc es.xml#bui ltin_jmspr ovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01|re sources.xm l#builtin_ jmsprovide r)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Clai ms2|resour ces.xml#bu iltin_jmsp rovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Cots 2|resource s.xml#buil tin_jmspro vider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/ME2| resources. xml#builti n_jmsprovi der)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/NonC laims2|res ources.xml #builtin_j msprovider )"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Rule s2|resourc es.xml#bui ltin_jmspr ovider)"
"WebSphere JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01|re sources.xm l#builtin_ jmsprovide r)"
"WebSphere JMS Provider(cells/ProcCell01| resources. xml#builti n_jmsprovi der)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/C laims_Clus ter|resour ces.xml#bu iltin_mqpr ovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/C ots_Cluste r|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/M E_Cluster| resources. xml#builti n_mqprovid er)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/N onClaims_C luster|res ources.xml #builtin_m qprovider) "
"WebSphere MQ JMS Provider(cells/ProcCell01/ clusters/R ules_Clust er|resourc es.xml#bui ltin_mqpro vider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/dmgr 1ProcNode0 1|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Clai ms1|resour ces.xml#bu iltin_mqpr ovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Cots 1|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/ME1| resources. xml#builti n_mqprovid er)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/NonC laims1|res ources.xml #builtin_m qprovider) "
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01/se rvers/Rule s1|resourc es.xml#bui ltin_mqpro vider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 1Node01|re sources.xm l#builtin_ mqprovider )"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Clai ms2|resour ces.xml#bu iltin_mqpr ovider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Cots 2|resource s.xml#buil tin_mqprov ider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/ME2| resources. xml#builti n_mqprovid er)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/NonC laims2|res ources.xml #builtin_m qprovider) "
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01/se rvers/Rule s2|resourc es.xml#bui ltin_mqpro vider)"
"WebSphere MQ JMS Provider(cells/ProcCell01/ nodes/wps0 2Node01|re sources.xm l#builtin_ mqprovider )"
"WebSphere MQ JMS Provider(cells/ProcCell01| resources. xml#builti n_mqprovid er)"
-------------------------- ---------- ---------- ----
createMQ: Debug Finish:
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 1 error(s) encountered.
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: ERROR --- Unable to locate WebSphere MQ JMS Provider at the specified scope. Check the logs for more information.
createMQ: Debug Begin:
ProcCell01(cells/ProcCell0
--------------------------
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01/
"WebSphere JMS Provider(cells/ProcCell01|
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01/
"WebSphere MQ JMS Provider(cells/ProcCell01|
--------------------------
createMQ: Debug Finish:
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 1 error(s) encountered.
Very strange, that last config ID should match...
createMQ.py
createMQ.py
ASKER
Now I got below error
./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.ws.scripting.Scrip tingExcept ion: Invalid object name: /Cell:/<function scope at 471997474>/JMSProvider:Web Sphere MQ JMS Provider/MQQueue:Sample_sa t/
./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.ws.scripting.Scrip
You're making me work... ;-)
createMQ.py
createMQ.py
ASKER
I am really sorry about that. I really need this script.
still getting the same error. :(
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "Sample_sat", "['queue/sample_sat', 'INKMW00', 'NKM.ACQUISITION.WAS', 'JMS']" )
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.ws.scripting.Scrip tingExcept ion: Invalid object name: /Cell:/<function scope at 546709654>/JMSProvider:Web Sphere MQ JMS Provider/MQQueue:Sample_sa t/
I think somthing to do with command used to create the Queue destination. If I execute the below command it is working fine.
AdminTask.createWMQQueue(' ProcCell01 (cells/Pro cCell01|ce ll.xml#Cel l_1)', '[-name HonorGod -jndiName HonorGod -queueName sample1 -qmgr Sample -description -customProperties [[MDREAD YES] [MDMSGCTX SET_ALL_CONTEXT] [MSGBODY MQ]]]')
'HonorGod(cells/ProcCell01 |resources .xml#MQQue ue_1302035 665579)'
still getting the same error. :(
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell
WASX7017E: Exception received while running file "createMQ.py"; exception information: com.ibm.ws.scripting.Scrip
I think somthing to do with command used to create the Queue destination. If I execute the below command it is working fine.
AdminTask.createWMQQueue('
'HonorGod(cells/ProcCell01
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much the script is working for Cell scope. But it is not working at when I am specifying Scope as Node as below. I am not sure whether I am specifying it correctly in the properties file or not .
Scope=wps01Node01
Scope=wps01Node01
Nope, Specify
Scope=Node
That's the beauty of using this technique.
We specify only the required names (e.g., CellName, NodeNode, ClusterName, and/or ServerName), then one of the corresponding Scope values:
Cell
Node
Cluster
Server
Scope=Node
That's the beauty of using this technique.
We specify only the required names (e.g., CellName, NodeNode, ClusterName, and/or ServerName), then one of the corresponding Scope values:
Cell
Node
Cluster
Server
Sorry for the delayed response. My machine died (BSoD) on me. ;-(
ASKER
Excellent!!! The Scirpt is working fine. You are Marvelous. Thank you somuch for helping me.
;-)
Thanks for the compliments, grade and points.
Good luck & have a great day.
Thanks for the compliments, grade and points.
Good luck & have a great day.
ASKER
I am sorry for commenting on this question, The script is not working. I am getting error is Queue Defination is already configured at specified scope. Skipping the MQ Queue creation.
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Node" ) == wps02Node01(cells/ProcCell 01/nodes/w ps02Node01 |node.xml# Node_1)
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q", "['NHFA.UNIT.EN05.BATCH.EL IGIBILITY. REQ', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ELIGI BILITY.REQ is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q.BKOUT", "['NHFA.UNIT.EN05.BATCH.EL IGIBILITY. REQ.BKOUT' , 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q.BKOUT', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ELIGI BILITY.REQ .BKOUT is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.ENRO LLMENT.REQ .BKOUT", "['NHFA.UNIT.EN05.BATCH.EN ROLLMENT.R EQ.BKOUT', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.ENRO LLMENT.REQ .BKOUT', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL LMENT.REQ. BKOUT is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.ENRO LLMENT.REQ UEST", "['NHFA.UNIT.EN05.BATCH.EN ROLLMENT.R EQUEST', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.ENRO LLMENT.REQ UEST', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL LMENT.REQU EST is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.ENRO LLMENT.RES P.BKOUT", "['NHFA.UNIT.EN05.BATCH.EN ROLLMENT.R ESP.BKOUT' , 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.ENRO LLMENT.RES P.BKOUT', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL LMENT.RESP .BKOUT is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.ENRO LLMENT.RES PONSE", "['NHFA.UNIT.EN05.BATCH.EN ROLLMENT.R ESPONSE', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.ENRO LLMENT.RES PONSE', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL LMENT.RESP ONSE is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.SWIP ECARD.FFA" , "['NHFA.UNIT.EN05.BATCH.SW IPECARD.FF A', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.SWIP ECARD.FFA' , 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE CARD.FFA is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.SWIP ECARD.FFA. BKOUT", "['NHFA.UNIT.EN05.BATCH.SW IPECARD.FF A.BKOUT', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.SWIP ECARD.FFA. BKOUT', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE CARD.FFA.B KOUT is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.SWIP ECARD.PROC ESS", "['NHFA.UNIT.EN05.BATCH.SW IPECARD.PR OCESS', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.SWIP ECARD.PROC ESS', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE CARD.PROCE SS is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.SWIP ECARD.PROC ESS.BKOUT" , "['NHFA.UNIT.EN05.BATCH.SW IPECARD.PR OCESS.BKOU T', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.SWIP ECARD.PROC ESS.BKOUT' , 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE CARD.PROCE SS.BKOUT is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.CNTYPMT.RE Q", "['NHFA.UNIT.EN05.CNTYPMT. REQ', 'MQSHCU01', 'NHFA.UNIT.EN05.CNTYPMT.RE Q', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.REQ is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.CNTYPMT.RE Q.BKOUT", "['NHFA.UNIT.EN05.CNTYPMT. REQ.BKOUT' , 'MQSHCU01', 'NHFA.UNIT.EN05.CNTYPMT.RE Q.BKOUT', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.REQ .BKOUT is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.CNTYPMT.RS P", "['NHFA.UNIT.EN05.CNTYPMT. RSP', 'MQSHCU01', 'NHFA.UNIT.EN05.CNTYPMT.RS P', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.RSP is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.CNTYPMT.RS P.BKOUT", "['NHFA.UNIT.EN05.CNTYPMT. RSP.BKOUT' , 'MQSHCU01', 'NHFA.UNIT.EN05.CNTYPMT.RS P.BKOUT', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.RSP .BKOUT is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.COBILL.ITE MS.REQ", "['NHFA.UNIT.EN05.COBILL.I TEMS.REQ', 'MQSHCU01', 'NHFA.UNIT.EN05.COBILL.ITE MS.REQ', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.COBILL.ITEM S.REQ is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.COBILL.ITE MS.REQ.BKO UT", "['NHFA.UNIT.EN05.COBILL.I TEMS.REQ.B KOUT', 'MQSHCU01', 'NHFA.UNIT.EN05.COBILL.ITE MS.REQ.BKO UT', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.COBILL.ITEM S.REQ.BKOU T is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.COBILL.ITE MS.RSP", "['NHFA.UNIT.EN05.COBILL.I TEMS.RSP', 'MQSHCU01', 'NHFA.UNIT.EN05.COBILL.ITE MS.RSP', 'JMS']" )
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.COBILL.ITEM S.RSP is already configured at specified scope. Skipping the MQ Queue creation.
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.COBILL.ITE MS.RSP.BKO UT", "['NHFA.UNIT.EN05.COBILL.I TEMS.RSP.B KOUT', 'MQSHCU01', 'NHFA.UNIT.EN05.COBILL.ITE MS.RSP.BKO UT', 'JMS']" )
$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Node" ) == wps02Node01(cells/ProcCell
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ELIGI
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ELIGI
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.ENROL
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.BATCH.SWIPE
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.REQ
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.REQ
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.RSP
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.CNTYPMT.RSP
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.COBILL.ITEM
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.COBILL.ITEM
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
createMQ: INFO --- MQ Queue NHFA.UNIT.EN05.COBILL.ITEM
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
revised to provide information about previously configured resource of the specified name:
createMQ.py
createMQ.py
ASKER
Thank you oncea agin for helping me out. Now I am getting below error.
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q", "['NHFA.UNIT.BATCH.ELIGIBI LITY.REQ', 'MQSHCS01', 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q', 'JMS']" )
WASX7017E: Exception received while running file "/opt/app/IBM/WebSphere/AC SProject/c reateMQ.py "; exception information: java.lang.IllegalArgumentE xception: java.lang.IllegalArgumentE xception: WASX7480E: """ found instead of expected [.
Attribute= had invalid value= for input parameter=['name' 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q'] ['jndiName' 'NHFA.UNIT.BATCH.ELIGIBILI TY.REQ'] ['baseQueueName' 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q'] ['targetClient' 'JMS'] ['baseQueueManagerName' 'MQSHCS01'] "customProperties" [['MDREAD' 'YES'] ['MDMSGCTX' 'SET_ALL_CONTEXT'] ['MSGBODYMQ']]
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell
WASX7017E: Exception received while running file "/opt/app/IBM/WebSphere/AC
Attribute= had invalid value= for input parameter=['name' 'NHFA.SYST.EN57.BATCH.ELIG
If we display the attributes for an MQQueue, we see the following:
So I don't see where the "customProperties" you identified should exist...
So I don't see where the "customProperties" you identified should exist...
. CCSID int
. baseQueueManagerName String
. baseQueueName String
. category String
. decimalEncoding ENUM(Normal, Reversed)
. description String
. expiry ENUM(APPLICATION_DEFINED, SPECIFIED, UNLIMITED)
. floatingPointEncoding ENUM(IEEENormal, IEEEReversed, S390)
. integerEncoding ENUM(Normal, Reversed)
. jndiName String
. name String
. password String
. persistence ENUM(APPLICATION_DEFINED, HIGH, NONPERSISTENT, PERSISTENT, QUEUE_DEFINED)
. priority ENUM(APPLICATION_DEFINED, SPECIFIED, QUEUE_DEFINED)
. propertySet J2EEResourcePropertySet
. provider J2EEResourceProvider@
. providerType String
. queueManagerHost String
. queueManagerPort int
. readAhead ENUM(QUEUE_DEFINED, YES, NO)
. readAheadClose ENUM(DELIVERCURRENT, DELIVERALL)
. sendAsync ENUM(QUEUE_DEFINED, YES, NO)
.serverConnectionChannelName String
. specifiedExpiry long
. specifiedPriority int
. targetClient ENUM(JMS, MQ)
. useNativeEncoding boolean
. userName String
ASKER
If we us wsadmin command intractivly we can see that option.
Below command is working fine for me,
AdminTask.createWMQQueue(' Proc1(cell s/Proc1|ce ll.xml)', '[-name Queue1 -jndiName Queue1 -queueName Queue1 -qmgr QMGR1 -description -customProperties [[MDREAD YES] [MDMSGCTX SET_ALL_CONTEXT] [MSGBODY MQ]]]')
Below command is working fine for me,
AdminTask.createWMQQueue('
Ah, that's the problem!
Here, try this one. (I hope you don't have Triskaidekaphobia ;-)
createMQ.py
Here, try this one. (I hope you don't have Triskaidekaphobia ;-)
createMQ.py
ASKER
Still getting the same error.....
wasadmin@env5_dmgr1:bin$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Node" ) == wps02Node01(cells/ProcCell 01/nodes/w ps02Node01 |node.xml# Node_1)
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel l01/nodes/ wps02Node0 1|node.xml #Node_1)", "NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q", "['NHFA.UNIT.EN05.BATCH.EL IGIBILITY. REQ', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q', 'JMS']" )
WASX7017E: Exception received while running file "createMQ.py"; exception information: java.lang.IllegalArgumentE xception: java.lang.IllegalArgumentE xception: WASX7480E: "-customProperties" found instead of expected [.
Attribute= had invalid value= for input parameter=['name' 'NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q'] ['jndiName' 'NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q'] ['baseQueueName' 'NHFA.UNIT.EN05.BATCH.ELIG IBILITY.RE Q'] ['targetClient' 'JMS'] ['baseQueueManagerName' 'MQSHCU01'] -customProperties [['MDREAD' 'YES'] ['MDMSGCTX' 'SET_ALL_CONTEXT'] ['MSGBODYMQ']]
wasadmin@env5_dmgr1:bin$ ./wsadmin.sh -lang jython -f createMQ.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Node" ) == wps02Node01(cells/ProcCell
createMQ: Debug: createMQ( "wps02Node01(cells/ProcCel
WASX7017E: Exception received while running file "createMQ.py"; exception information: java.lang.IllegalArgumentE
Attribute= had invalid value= for input parameter=['name' 'NHFA.UNIT.EN05.BATCH.ELIG
ooh. I missed something.
Note how your "example" uses the AdminTask.createWMQQueue() method, instead of the AdminConfig.createUsingTem plate() one.
Can we change the input (properties) file format from this:
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Property:Value=Sample1:que ue/sample1 ,INKMW00,N KM.ACQUISI TION.WAS,J MS
Property:Value=Sample2:que ue/sample2 ,INKMW00,N KM.ACQUISI TION.WAS,J MS
Property:Value=Sample3:que ue/sample3 ,INKMW00,N KM.ACQUISI TION.WAS,J MS
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Which maps to
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Property:Value=<Qname>:<jn diname>,<q Manager>,< bqname>,<t client>
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
To something that more closely matches the AdminTask.createWMQQueue() arguments?
Perhaps something like:
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Property:Value=<Name>:<jnd iname>,<Qn ame>,<Qmgr >,<Persist ence>,<Pri ority>,<Ex piry>
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Please let me know.
Thanks!
Note how your "example" uses the AdminTask.createWMQQueue()
Can we change the input (properties) file format from this:
--------------------------
Property:Value=Sample1:que
Property:Value=Sample2:que
Property:Value=Sample3:que
--------------------------
Which maps to
--------------------------
Property:Value=<Qname>:<jn
--------------------------
To something that more closely matches the AdminTask.createWMQQueue()
Perhaps something like:
--------------------------
Property:Value=<Name>:<jnd
--------------------------
Please let me know.
Thanks!
Just in case you need it, here's the link to the Information Center to the AdminTask.createWMQQueue() method:
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rmj_wmq_jmswmqq_create.html
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rmj_wmq_jmswmqq_create.html
ASKER
Changing properties file is not a problem. Please let me know which one to use.
Use the link shown above, and you tell me the ones you want/need. Most are optional.
ASKER
I need -
Name,
JNDI
QMGR
QUEUE
type
and -customproperties
Name,
JNDI
QMGR
QUEUE
type
and -customproperties
ASKER
Any luck with the script ?
ASKER
I thinks to set the custom properties is the limitation in using template. I found this info in below link.http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14586071
hm..
To which AdminTask.createWMQQueu() parameter does the "type" mentioned above refer?
To which AdminTask.createWMQQueu() parameter does the "type" mentioned above refer?
Name = -name : Required parm, ok
JNDI = -jndiName : Required parm, ok
QMGR = -qmgr : Optional parm, ok
QUEUE = -queueName : Optional parm, ok
type = This, I don't understand
-customproperties ... ok
ASKER
type = targetClient ENUM(JMS, MQ)
ASKER
You can ignore it. Let us take it out.
ASKER
I desperately need this script today. I need to meet my dead lines today. I am really sorry for the rush. Your help is highly appreciated.
ok, so the values after Property:Value should be:
Name,JNDI,QMGR,Queue
which relate to the corresponding arguments, as documented on this page of the Information Center: http://goo.gl/XCn5e
Name,JNDI,QMGR,Queue
which relate to the corresponding arguments, as documented on this page of the Information Center: http://goo.gl/XCn5e
Name = -name : Required parm, ok
JNDI = -jndiName : Required parm, ok
QMGR = -qmgr : Optional parm, ok
QUEUE = -queueName : Optional parm, ok
createMQ.py
Let me know, ASAP, if it doesn't work for you. Thanks!
ASKER
Just came for lunch. Please give me 20 minutes. Thank you so much for your quick response.
ASKER
Getting below error:
./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
WASX7017E: Exception received while running file "createMQ_new.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
(no code object) at line 0
File "<string>", line 81
print 'qname, roles:', qname, roles print '-' * 50
^
SyntaxError: invalid syntax
./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
WASX7017E: Exception received while running file "createMQ_new.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
(no code object) at line 0
File "<string>", line 81
print 'qname, roles:', qname, roles print '-' * 50
^
SyntaxError: invalid syntax
Somehow 2 lines got joined...
createMQ.py
createMQ.py
ASKER
Now I am getting this error...
wasadmin@env57_dmgr1:bin$ ./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new2.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
WASX7017E: Exception received while running file "createMQ_new2.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 289, in ?
File "<string>", line 147, in main
File "<string>", line 54, in Properties
ValueError: unpack sequence too short
wasadmin@env57_dmgr1:bin$ ./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new2.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
WASX7017E: Exception received while running file "createMQ_new2.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 289, in ?
File "<string>", line 147, in main
File "<string>", line 54, in Properties
ValueError: unpack sequence too short
argh...
Please attach your properties (input) file.
Please attach your properties (input) file.
ASKER
Why does your Property:Value have 5 (comma separated) values?
Previously, you had the Queue Name (1st parm) delimited by a ':'
Property:Value=Queue1:Queu e1,QMG1,Qu eue1,JMS, YES, SET_ALL_CONTEXT, MQ
Do you want all of the stuff after "Property:Value=" comma separated?
Previously, you had the Queue Name (1st parm) delimited by a ':'
Property:Value=Queue1:Queu
Do you want all of the stuff after "Property:Value=" comma separated?
NHFA.SYST.EN57.BATCH.ELIGIBILITY.REQ_satish
NHFA.UNIT.BATCH.ELIGIBILITY.REQ_satish
MQSHCS01
NHFA.SYST.EN57.BATCH.ELIGIBILITY.REQ
JMS
ASKER
As per your comment at 04/11/11 09:39 AM, ID: 35367917 I have change my properties.
Now I have changed it back to ":"After changing it I am gettting below error.
./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new2.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q_satish", "['NHFA.UNIT.BATCH.ELIGIBI LITY.REQ_s atish', 'MQSHCS01', 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q', 'JMS']" )
createMQ: ERROR --- Unexpected roles specified: ['NHFA.UNIT.BATCH.ELIGIBIL ITY.REQ_sa tish', 'MQSHCS01', 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q', 'JMS']
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 1 error(s) encountered.
Now I have changed it back to ":"After changing it I am gettting below error.
./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new2.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell
createMQ: ERROR --- Unexpected roles specified: ['NHFA.UNIT.BATCH.ELIGIBIL
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 1 error(s) encountered.
ok, what does your input file look like now, and what to the values after Property:Value= represent?
ASKER
Property:Value=NHFA.SYST.E N57.BATCH. ELIGIBILIT Y.REQ_sati sh:NHFA.UN IT.BATCH.E LIGIBILITY .REQ_satis h,MQSHCS01 ,NHFA.SYST .EN57.BATC H.ELIGIBIL ITY.REQ,JM S
ok, that answers the 1st part of the question, but not the second...
From that:
From that:
Name = -name : NHFA.SYST.EN57.BATCH.ELIGIBILITY.REQ_satish
JNDI = -jndiName : NHFA.UNIT.BATCH.ELIGIBILITY.REQ_satish
QMGR = -qmgr : MQSHCS01
QUEUE = -queueName : NHFA.SYST.EN57.BATCH.ELIGIBILITY.REQ
What, is this? JMS
ASKER
type = targetClient ENUM(JMS, MQ) which ignored. I have removed JMS and tried it again I am getting below error. I think we are still using MQ template to create the queue destination. custom properties is the limitation in using template. I think we can not set custom properties using the MQ template. I am not sure.
./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new2.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q_satish", "['NHFA.UNIT.BATCH.ELIGIBI LITY.REQ_s atish', 'MQSHCS01', 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q']" )
WASX7017E: Exception received while running file "createMQ_new2.py"; exception information: java.lang.IllegalArgumentE xception: java.lang.IllegalArgumentE xception: WASX7480E: "-customProperties" found instead of expected [.
Attribute= had invalid value= for input parameter=['name' 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q_satish'] ['jndiName' 'NHFA.UNIT.BATCH.ELIGIBILI TY.REQ_sat ish'] ['baseQueueName' 'MQSHCS01'] ['baseQueueManagerName' 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q'] -customProperties [['MDREAD' 'YES'] ['MDMSGCTX' 'SET_ALL_CONTEXT'] ['MSGBODYMQ']]
./wsadmin.sh -lang jython -port 28879 -username wpsbind -password passw0rd -f createMQ_new2.py MQ_input.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[MQ_input.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell
WASX7017E: Exception received while running file "createMQ_new2.py"; exception information: java.lang.IllegalArgumentE
Attribute= had invalid value= for input parameter=['name' 'NHFA.SYST.EN57.BATCH.ELIG
ASKER
sorry for the typo -- type = targetClient ENUM(JMS, MQ) which can be ignored/removed
You are absolutely right. Please accept my apologies.
I was rushed, and didn't check my work as completely as I should have
createMQ.py
I was rushed, and didn't check my work as completely as I should have
createMQ.py
ASKER
Now I am getting this error.
wasadmin@env5_dmgr1:bin$ ./wsadmin.sh -lang jython -f createMQ_new3.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "NHFA.UNIT.EN05.BATCH.12", "['NHFA.UNIT.BATCH12', 'MQSHCU01', 'NHFA.UNIT.EN05.BATCH.REQ' ]" )
WASX7017E: Exception received while running file "createMQ_new3.py"; exception information: java.lang.IllegalArgumentE xception: java.lang.IllegalArgumentE xception: WASX7122E: Expected "-" not found.
[['name' 'NHFA.UNIT.EN05.BATCH.12'] ['jndiName' 'NHFA.UNIT.BATCH12'] ['baseQueueName' 'MQSHCU01'] ['baseQueueManagerName' 'NHFA.UNIT.EN05.BATCH.REQ' ] -customProperties [['MDREAD' 'YES'] ['MDMSGCTX' 'SET_ALL_CONTEXT'] ['MSGBODYMQ']] ]
^
wasadmin@env5_dmgr1:bin$ ./wsadmin.sh -lang jython -f createMQ_new3.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell
WASX7017E: Exception received while running file "createMQ_new3.py"; exception information: java.lang.IllegalArgumentE
[['name' 'NHFA.UNIT.EN05.BATCH.12']
^
ASKER
still same error......
wasadmin@env5_dmgr1:bin$ ./wsadmin.sh -lang jython -f createMQ_new4.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q.BKOUT", "['NHFA.SYST.EN57.BATCH.EL IGIBILITY. REQ.BKOUT' , 'MQSHCU01', 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q.BKOUT']" )
WASX7017E: Exception received while running file "createMQ_new4.py"; exception information: java.lang.IllegalArgumentE xception: java.lang.IllegalArgumentE xception: WASX7122E: Expected "-" not found.
[['-name' 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q.BKOUT'] ['-jndiName' 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q.BKOUT'] ['-baseQueueName' 'MQSHCU01'] ['-baseQueueManagerName' 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q.BKOUT'] -customProperties [['MDREAD' 'YES'] ['MDMSGCTX' 'SET_ALL_CONTEXT'] ['MSGBODYMQ']] ]
^
wasadmin@env5_dmgr1:bin$ ./wsadmin.sh -lang jython -f createMQ_new4.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell
WASX7017E: Exception received while running file "createMQ_new4.py"; exception information: java.lang.IllegalArgumentE
[['-name' 'NHFA.SYST.EN57.BATCH.ELIG
^
I don't understand that error message. It makes no sense. When I used the '-interactive' option to step through the generation of the AdminTask.createWMQQueue() command the "generated" command looked like this:
ooh... wait a minute.
Alright, here's what I've done.
I've modified the createMQ() function, as well as the expected parameters from the properties file!!!
Here's a sample test of the routine from an interactive wsadmin session:
Things to note:
* The 1st value from the Properties file between the "=" and the ":" is the:
The administrative name assigned to this WebSphere MQ messaging provider queue type destination.
* The value after the ":" is the jndiName
* The value after the 1st comma is the queueName
* The value after the 2nd (last) comma is the qMgr
ooh... wait a minute.
Alright, here's what I've done.
I've modified the createMQ() function, as well as the expected parameters from the properties file!!!
Here's a sample test of the routine from an interactive wsadmin session:
Things to note:
* The 1st value from the Properties file between the "=" and the ":" is the:
The administrative name assigned to this WebSphere MQ messaging provider queue type destination.
* The value after the ":" is the jndiName
* The value after the 1st comma is the queueName
* The value after the 2nd (last) comma is the qMgr
wsadmin>from cre8 import createMQ
wsadmin>cell = AdminConfig.list( 'Cell' )
wsadmin>createMQ( cell, 'myProvider', [ 'jndiName', 'queueName', 'qMgr' ] )
createMQ Debug: AdminTask.createWMQQueue( "ragweedCell02(cells/ragweedCell02|cell.xml#Cell_1)", "-name myProvider -jndiName jndi
Name -queueName queueName -customProperties [[MDREAD yes] [MDMSGCTX SET_ALL_CONTEXT] [MSGBODY MQ]]" )
createMQ: SUCCESS ---Created the Queue queueName at specified scope
0
AdminTask.createWMQQueue( scopeID, '[-name myQueue -jndiName JNDIname -queueName queueName -customProperties [ [ MDREAD yes] [ MDMSGCTX SET_ALL_CONTEXT] [ MSGBODY MQ ] ] ]' )
createMQ.py
ASKER
Now the issue is the not taking Qmgr value. In place of Queue Name it is talking Qmgr Name from the properties file. Please check the output below.
Values in properties file:
Property:Value=Nam:jndi,QM GR,Queue
Property:Value=NHFA.SYST.E N57.BATCH. ELIGIBILIT Y.REQ.BKOU T:NHFA.SYS T.EN57.BAT CH.ELIGIBI LITY.REQ.B KOUT,MQSHC U01,NHFA.S YST.EN57.B ATCH.ELIGI BILITY.REQ .BKOUT
./wsadmin.sh -lang jython -f createMQ_new5.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0 1|cell.xml #Cell_1)
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q.BKOUT", "['NHFA.SYST.EN57.BATCH.EL IGIBILITY. REQ.BKOUT' , 'MQSHCU01', 'NHFA.SYST.EN57.BATCH.ELIG IBILITY.RE Q.BKOUT']" )
createMQ Debug: AdminTask.createWMQQueue( "ProcCell01(cells/ProcCell 01|cell.xm l#Cell_1)" , "-name NHFA.SYST.EN57.BATCH.ELIGI BILITY.REQ .BKOUT -jndiName NHFA.SYST.EN57.BATCH.ELIGI BILITY.REQ .BKOUT -queueName MQSHCU01 -customProperties [[MDREAD yes] [MDMSGCTX SET_ALL_CONTEXT] [MSGBODY MQ]]" )
createMQ: SUCCESS ---Created the Queue MQSHCU01 at specified scope
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 0 error(s) encountered.
Values in properties file:
Property:Value=Nam:jndi,QM
Property:Value=NHFA.SYST.E
./wsadmin.sh -lang jython -f createMQ_new5.py createMQ.txt
WASX7209I: Connected to process "dmgr" on node dmgr1ProcNode01 using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[createMQ.txt]"
argc: 1
createMQ: INFO --- Enter main()
createMQ: INFO --- Enter Properties() - load from Properties file
createMQ: INFO --- Exit Properties()
createMQ: Debug Scope( "Cell" ) == ProcCell01(cells/ProcCell0
createMQ: Debug: createMQ( "ProcCell01(cells/ProcCell
createMQ Debug: AdminTask.createWMQQueue( "ProcCell01(cells/ProcCell
createMQ: SUCCESS ---Created the Queue MQSHCU01 at specified scope
createMQ: INFO --- Saving configuration changes.
createMQ: Enter SynchNodes().
createMQ: ERROR --- Unable to synchronise with node dmgr1ProcNode01. Nodeagent appears inactive.
createMQ: SUCCESS --- Synchronization successfull with Node wps01Node01
createMQ: SUCCESS --- Synchronization successfull with Node wps02Node01
createMQ: Exit SynchNodes().
createMQ: INFO --- Exit main(), 0 error(s) encountered.
;-(
createMQ.py
createMQ.py
ASKER
The script is working fine. But in place of QueueName it is taking qmgr and viceversa. Do I need to check the the values in properties file or it can be fixed in the code?
Are you saying that the order isn't what you expect?
The code is expecting:
Do you need that changed?
The code is expecting:
Do you need that changed?
Property:Value=name:jndiName,qName,qMgr
ASKER
No. I am just check whether the order can be chaged to Property:Value=Name:JNDI,Q mgrName,Qu eueName
Not a problem. I have changed the values to
Property:Value=name:jndiNa me,qName,q Mgr
Now the script is working absolutely fine. Thank you so much for you help. I am doing testing now. I will let you know the result by tomorrow.
Not a problem. I have changed the values to
Property:Value=name:jndiNa
Now the script is working absolutely fine. Thank you so much for you help. I am doing testing now. I will let you know the result by tomorrow.
ok, this version expects the Property values to be in this order:
Property:Value=name:jndiNa me,qName,q Mgr
Use whichever version you prefer.
I really appreciate your patience, and willingness to continue working with me on this.
Thanks
createMQ.py
Property:Value=name:jndiNa
Use whichever version you prefer.
I really appreciate your patience, and willingness to continue working with me on this.
Thanks
createMQ.py
ASKER
I am sorry for delayed response. I want out of country for few weeks. Now the script is work fine. Thank you so much. I really appreciate it.
Super. I'm glad to hear it. I hope that you had a safe trip.
Are you sure you don't want to do this manually? ;-)
ok, will the properties file to be processed by script 1 have mult-line entries?
--------------------------
Scope= Name: nameInNameSpace, stringToBind
Property:Value= CACHE_SWITCH, CACHE_SWITCH,ON
--------------------------
- Does the Scope entry identify the scope of a namespace binding to be created?
- Are there multiple Scope entries in the file?
- Is the order guaranteed to be that shown above?
- How do the "values" for the scope record relate to the create() parameters?
Can you related the entries from the Scope and Property records to the following (just to help me understand)?
Open in new window