Websphere Scripting - SyncNode时出错

时间:2014-03-06 22:02:36

标签: websphere websphere-7 wsadmin jacl

以下是我用于在WAS 7中同步节点的jacl脚本。

    #Sync Node Changes
    puts "Begin SyncNode.." 
    set Sync1 [$AdminControl completeObjectName type=NodeSync,process=nodeagent,node=Profile01Node600,*]
    set Sync2 [$AdminControl completeObjectName type=NodeSync,process=nodeagent,node=Profile02Node601,*]
    $AdminControl invoke $Sync1 sync
    $AdminControl invoke $Sync2 sync
    puts "SyncNode Complete"

环境是集群的,在部署EAR文件后,我调用此jacl脚本将更改同步到节点。 运行脚本时出现的错误:

    WASX7209I: Connected to process "dmgr" on node wAMLDmgrNode using SOAP connector; The type of process is: DeploymentManager
    Begin SyncNode..
    WASX7017E: Exception received while running file "xxx/xxx/xxx.jacl"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7025E: Error found in String ""; cannot create ObjectName.

Sync1的原因是什么?'? 我们是否需要在命令中使用 process = nodeagent ? 如果nodeagent启动和停止会产生什么结果?

1 个答案:

答案 0 :(得分:1)

错误消息:

WASX7017E: Exception received while running file "xxx/xxx/xxx.jacl"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7025E: Error found in String ""; cannot create ObjectName.

...告诉我找不到ObjectName。最有可能的是:

  • 您的nodeagent已关闭
  • 节点名称中有拼写错误(Profile01Node600& Profile01Node601)

您可以通过运行此命令来检查哪些nodeagents(他们的NodeSync MBean)可用:

$AdminControl queryNames WebSphere:*,type=NodeSync

根据输出,你可以解决错误。

如果nodeagent不可用,那么您可以通过检查completeObjectName是否返回空字符串来满足脚本中的要求。