【发布时间】:2020-05-13 17:25:27
【问题描述】:
我正在尝试为 WebLogic 托管服务器创建 Docker 映像。我的图像快完成了,只是图像中缺少工作经理。
据我所知,为了拥有一个工作经理,我需要创建一个Machine。我正在使用 WLST 工具来创建服务器、集群等,除了创建新的机器部件外,一切看起来都很好。
这就是我的 Phyton 方法的样子:
1 def createMachine(_machineName):
2 print ('creating a new machine...')
3 cd('/')
4 cmo.createUnixMachine(_machineName)
5 cd('/Machines/' + _machineName + '/NodeManager/' + _machineName)
6 cmo.setNMType('Plain')
7 cmo.setListenAddress('localhost')
8 cmo.setListenPort(8888)
9 cmo.setDebugEnabled(false)
第 4 行对我抛出错误:
creating a new machine...
Error: only getter and setter are supported
Error: cd() failed. Do dumpStack() to see details.
Error: runCmd() failed. Do dumpStack() to see details.
Problem invoking WLST - Traceback (innermost last):
File "/u01/oracle/create-wls-domain.py", line 114, in ?
File "/u01/oracle/create-wls-domain.py", line 104, in main
File "/u01/oracle/create-wls-domain.py", line 36, in createMachine
File "/tmp/WLSTOfflineIni692244145222764912.py", line 55, in cd
File "/tmp/WLSTOfflineIni692244145222764912.py", line 19, in command
at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:69)
at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:2983)
at com.oracle.cie.domain.script.jython.WLScriptContext.runCmd(WLScriptContext.java:735)
at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.jython.WLSTException: No element AnyMachine was found
执行*.py脚本时WL服务器没有运行,所以我处于离线模式,因为域没有准备好,它正在由*.py脚本创建。
我的机器创建方法有什么问题?
更新
所以这是创建 WebLogic 机器的工作方法:
def createMachine(_machineName):
print('creating a new machine...')
cd('/')
create(_machineName,'UnixMachine')
# if you need NodeManager as well
# cd('/UnixMachine/' + _machineName)
# create(_machineName, 'NodeManager')
# cd('NodeManager/' + _machineName)
# setNMType('Plain')
# set('ListenAddress', 'localhost')
# set('ListenPort', _nodeManagerPort)
# setDebugEnabled(false)
【问题讨论】:
标签: docker weblogic weblogic12c wlst