Bu islem icin bize iki tane dosya gerekmektedir.
- domain.properties
- ve scriptimizin oldugu NodeManager_AdminServer_Start.py diger dosyamiz
domain.properties dosyamizin icerigi
username=weblogicpassword=wadmin12host=localhostnm.port=5556domain.name=lab_domaindomain.dir=/u01/app/oracle/Middleware/user_projects/domains/lab_domainnm.type=ssladmin.server.name=AdminServermanaged.server.name=j2eeServer
NodeManager_AdminServer_Start.py dosyamizin icerigi
#############################################################################
#
# Bu dosyada python kodlari bulunmaktadir.
# Daha onceki bolumde gordugumu NodeManager`imizi bu seferde
# bu script ile calistiracagiz.
#
#############################################################################
from java.io import FileInputStream
import java.lang
import os
import string
print '.....NodeManager, Admin Server ve Managed Server baslatiliyor....'
propInputStream = FileInputStream("/media/DATA/Programming/domain.properties")
configProps = Properties()
configProps.load(propInputStream)
print '.................... Properties dosyasi yuklendi.................'
kullaniciAdi = configProps.get("username")
parola = configProps.get("password")
host = configProps.get("host")
nmPort = configProps.get("nm.port")
domainAdi = configProps.get("domain.name")
domainDir = configProps.get("domain.dir")
nmType = configProps.get("nm.type")
startNodeManager()
print ''
print '============================================='
print '...NodeManager baslatildi...!!!'
print '============================================='
print ''
nmConnect(kullaniciAdi,parola,host,nmPort,domainAdi,domainDir,nmType)
print ''
print '============================================='
print '...NodeManager ile baglanti kuruldu ...'
print '============================================='
print ''
print '...Admin Server Baslatilacak ...'
adminServerName = configProps.get("admin.server.name")
print '###### serverName = ', adminServerName
nmStart(adminServerName)
adminServerName = configProps.get("admin.server.name")
print ''
print '============================================='
print '===> ', adminServerName, ' server baslatildi <==='
print '============================================='
print ''
print '...Managed Server baslatilacak ...'
managedServerName = configProps.get("managed.server.name")
print '###### managedServerName = ', managedServerName
nmStart(managedServerName)
managedServerName = configProps.get("managed.server.name")
print ''
print '============================================='
print '===> ', managedServerName, ' server baslatildi <==='
print '============================================='
print ''
#############################################################################
#
# Bu dosyada python kodlari bulunmaktadir.
# Daha onceki bolumde gordugumu NodeManager`imizi bu seferde
# bu script ile calistiracagiz.
#
#############################################################################
from java.io import FileInputStream
import java.lang
import os
import string
print '.....NodeManager, Admin Server ve Managed Server baslatiliyor....'
propInputStream = FileInputStream("/media/DATA/Programming/domain.properties")
configProps = Properties()
configProps.load(propInputStream)
print '.................... Properties dosyasi yuklendi.................'
kullaniciAdi = configProps.get("username")
parola = configProps.get("password")
host = configProps.get("host")
nmPort = configProps.get("nm.port")
domainAdi = configProps.get("domain.name")
domainDir = configProps.get("domain.dir")
nmType = configProps.get("nm.type")
startNodeManager()
print ''
print '============================================='
print '...NodeManager baslatildi...!!!'
print '============================================='
print ''
nmConnect(kullaniciAdi,parola,host,nmPort,domainAdi,domainDir,nmType)
print ''
print '============================================='
print '...NodeManager ile baglanti kuruldu ...'
print '============================================='
print ''
print '...Admin Server Baslatilacak ...'
adminServerName = configProps.get("admin.server.name")
print '###### serverName = ', adminServerName
nmStart(adminServerName)
adminServerName = configProps.get("admin.server.name")
print ''
print '============================================='
print '===> ', adminServerName, ' server baslatildi <==='
print '============================================='
print ''
print '...Managed Server baslatilacak ...'
managedServerName = configProps.get("managed.server.name")
print '###### managedServerName = ', managedServerName
nmStart(managedServerName)
managedServerName = configProps.get("managed.server.name")
print ''
print '============================================='
print '===> ', managedServerName, ' server baslatildi <==='
print '============================================='
print ''
Simdi Scriptimizi calistiyoruz..
[ertugrula@easlan ]$./wlst.sh /media/DATA/Programming/NodeManager_AdminServer_Start.py
CLASSPATH=/u01/app/oracle/Middleware/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/app/oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java/jdk1.7.0_07/lib/tools.jar:/u01/app/oracle/Middleware/wlserver_12.1/server/lib/weblogic_sp.jar:/u01/app/oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar:/u01/app/oracle/Middleware/modules/features/weblogic.server.modules_12.1.1.0.jar:/u01/app/oracle/Middleware/wlserver_12.1/server/lib/webservices.jar:/u01/app/oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u01/app/oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/u01/app/oracle/Middleware/utils/config/10.3/config-launch.jar::/u01/app/oracle/Middleware/wlserver_12.1/common/derby/lib/derbynet.jar:/u01/app/oracle/Middleware/wlserver_12.1/common/derby/lib/derbyclient.jar:/u01/app/oracle/Middleware/wlserver_12.1/common/derby/lib/derbytools.jar::
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
.....NodeManager, Admin Server ve Managed Server baslatiliyor....
.................... Properties dosyasi yuklendi.................
Launching NodeManager ...
Properties: {}
Command: /usr/java/jdk1.7.0_07/jre/bin/java -classpath /usr/java/jdk1.7.0_07/jre/lib/rt.jar:/usr/java/jdk1.7.0_07/jre/lib/i18n.jar:/u01/app/oracle/Middleware/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/app/oracle/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java/jdk1.7.0_07/lib/tools.jar:/u01/app/oracle/Middleware/wlserver_12.1/server/lib/weblogic_sp.jar:/u01/app/oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar:/u01/app/oracle/Middleware/modules/features/weblogic.server.modules_12.1.1.0.jar:/u01/app/oracle/Middleware/wlserver_12.1/server/lib/webservices.jar:/u01/app/oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u01/app/oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/u01/app/oracle/Middleware/utils/config/10.3/config-launch.jar:/u01/app/oracle/Middleware/wlserver_12.1/common/derby/lib/derbynet.jar:/u01/app/oracle/Middleware/wlserver_12.1/common/derby/lib/derbyclient.jar:/u01/app/oracle/Middleware/wlserver_12.1/common/derby/lib/derbytools.jar weblogic.NodeManager -v
NMProcess:
NMProcess: Jan 08, 2013 8:58:57 PM weblogic.nodemanager.server.NMServerConfig initDomainsMap
NMProcess: INFO: Loading domains file: /u01/app/oracle/Middleware/wlserver_12.1/common/bin/nodemanager.domains
NMProcess:
NMProcess: Jan 08, 2013 8:58:58 PM weblogic.nodemanager.server.SSLConfig loadKeyStoreConfig
NMProcess: INFO: Loading identity key store: FileName=/u01/app/oracle/Middleware/wlserver_12.1/server/lib/DemoIdentity.jks, Type=jks, PassPhraseUsed=true
NMProcess:
NMProcess: Jan 08, 2013 8:58:58 PM weblogic.nodemanager.server.NMServer
NMProcess: INFO: Loaded node manager configuration properties from '/u01/app/oracle/Middleware/wlserver_12.1/common/bin/nodemanager.properties'
NMProcess: Node manager v10.3
NMProcess:
NMProcess: Configuration settings:
NMProcess:
NMProcess: NodeManagerHome=/u01/app/oracle/Middleware/wlserver_12.1/common/bin
NMProcess: ListenAddress=
NMProcess: ListenPort=5556
NMProcess: ListenBacklog=50
NMProcess: SecureListener=true
NMProcess: AuthenticationEnabled=true
NMProcess: NativeVersionEnabled=true
NMProcess: CrashRecoveryEnabled=false
NMProcess: JavaHome=/usr/java/jdk1.7.0_07/jre
NMProcess: StartScriptEnabled=true
NMProcess: StopScriptEnabled=false
NMProcess: StartScriptName=startWebLogic.sh
NMProcess: StopScriptName=
NMProcess: LogFile=/u01/app/oracle/Middleware/wlserver_12.1/common/bin/nodemanager.log
NMProcess: LogLevel=INFO
NMProcess: LogLimit=0
NMProcess: LogCount=1
NMProcess: LogAppend=true
NMProcess: LogToStderr=true
NMProcess: LogFormatter=weblogic.nodemanager.server.LogFormatter
NMProcess: DomainsFile=/u01/app/oracle/Middleware/wlserver_12.1/common/bin/nodemanager.domains
NMProcess: DomainsFileEnabled=true
NMProcess: StateCheckInterval=500
NMProcess: QuitEnabled=true
NMProcess: UseMACBroadcast=false
NMProcess: DomainRegistrationEnabled=false
NMProcess: DomainsDirRemoteSharingEnabled=false
NMProcess:
NMProcess: Domain name mappings:
NMProcess:
NMProcess: lab_domain -> /u01/app/oracle/Middleware/user_projects/domains/lab_domain
NMProcess:
NMProcess: configuration properties loaded from "/u01/app/oracle/Middleware/user_projects/domains/lab_domain/servers/portalServer/data/nodemanager/startup.properties">
NMProcess: Jan 08, 2013 8:58:58 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Startup configuration properties loaded from "/u01/app/oracle/Middleware/user_projects/domains/lab_domain/servers/portalServer/data/nodemanager/startup.properties"
NMProcess:
NMProcess: Jan 08, 2013 8:58:58 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Startup configuration properties loaded from "/u01/app/oracle/Middleware/user_projects/domains/lab_domain/servers/j2eeServer/data/nodemanager/startup.properties"
NMProcess:
NMProcess: Jan 08, 2013 8:58:59 PM weblogic.nodemanager.server.SSLListener run
NMProcess: INFO: Secure socket listener started on port 5556
Successfully launched the Node Manager.
The Node Manager process is running independent of the WLST process.
Exiting WLST will not stop the Node Manager process. Please refer
to the Node Manager logs for more information.
The Node Manager logs will be under /u01/app/oracle/Middleware/wlserver_12.1/common/bin/.
Node Manager starting in the background
=============================================
...NodeManager baslatildi...!!!
=============================================
Connecting to Node Manager ...
Successfully Connected to Node Manager.
=============================================
...NodeManager ile baglanti kuruldu ...
=============================================
###### serverName = AdminServer
Starting server AdminServer ...
NMProcess:
NMProcess: Jan 08, 2013 8:59:08 PM weblogic.nodemanager.server.LogFileRotationUtil log
NMProcess: INFO: Rotated server output log to "/u01/app/oracle/Middleware/user_projects/domains/lab_domain/servers/AdminServer/logs/AdminServer.out00006"
NMProcess:
NMProcess: Jan 08, 2013 8:59:08 PM weblogic.nodemanager.server.LogFileRotationUtil log
NMProcess: INFO: Server error log also redirected to server log
NMProcess:
NMProcess: Jan 08, 2013 8:59:08 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Starting WebLogic server with command line: /u01/app/oracle/Middleware/user_projects/domains/lab_domain/bin/startWebLogic.sh
NMProcess:
NMProcess: Jan 08, 2013 8:59:08 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Working directory is '/u01/app/oracle/Middleware/user_projects/domains/lab_domain'
NMProcess:
NMProcess: Jan 08, 2013 8:59:08 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Server output log file is '/u01/app/oracle/Middleware/user_projects/domains/lab_domain/servers/AdminServer/logs/AdminServer.out'
Successfully started server AdminServer ...
=============================================
===> AdminServer server baslatildi <===
=============================================
###### managedServerName = j2eeServer
Starting server j2eeServer ...
NMProcess:
NMProcess: Jan 08, 2013 8:59:39 PM weblogic.nodemanager.server.LogFileRotationUtil log
NMProcess: INFO: Rotated server output log to "/u01/app/oracle/Middleware/user_projects/domains/lab_domain/servers/j2eeServer/logs/j2eeServer.out00008"
NMProcess:
NMProcess: Jan 08, 2013 8:59:39 PM weblogic.nodemanager.server.LogFileRotationUtil log
NMProcess: INFO: Server error log also redirected to server log
NMProcess:
NMProcess: Jan 08, 2013 8:59:39 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Starting WebLogic server with command line: /u01/app/oracle/Middleware/user_projects/domains/lab_domain/bin/startWebLogic.sh
NMProcess:
NMProcess: Jan 08, 2013 8:59:39 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Working directory is '/u01/app/oracle/Middleware/user_projects/domains/lab_domain'
NMProcess:
NMProcess: Jan 08, 2013 8:59:39 PM weblogic.nodemanager.server.AbstractServerManager log
NMProcess: INFO: Server output log file is '/u01/app/oracle/Middleware/user_projects/domains/lab_domain/servers/j2eeServer/logs/j2eeServer.out'
Successfully started server j2eeServer ...
=============================================
===> j2eeServer server baslatildi <===
=============================================
[ertugrula@easlan bin]$
Bir sonraki makalemizde, managed Serverlarimiza, bir .war dosyasi deploy edip, biri kapandiginda digeri ile nasil baglanacagimizi gorecegiz.
Hiç yorum yok:
Yorum Gönder