簡體   English   中英

如何使用 WLST 創建新的 Unix 機器

[英]How to create a new Unix Machine with WLST

我正在嘗試為 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 Machine 的工作方法:

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)

第 4 行應該是

創建(_machineName,'UnixMachine')

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM