DataStage序列文章
1 關於進程需要了解的基礎知識
名稱 | 說明 |
---|---|
ASB代理進程 | 通信代理程序,它的作用是協助層與層之間的通信,默認端口是31531,它以后台進程的方式運行在引擎層和客戶端層 |
ASB記錄代理進程 | 它的作用是記錄事件信息到元數據存儲層的數據庫中 |
DataStage Engine進程 | 它是核心進程,管理DataStage job任務、Cache、job資源 |
WebSphere Application Server(WAS) | Web 應用服務器程序,使用Java EE、xml和Web Service建立,它負責初始化連接器和基於Web 的console(控制台)、infocenter(信息中心) |
2 啟動InfoSphere Information Server進程
建議先啟動WAS,再啟動ASB代理,最后再啟動DataStage Engine。WAS包含與資源庫的連接、啟動Application Server,是一個很重要的進程,它啟動失敗一系列的問題如客戶端連接出錯、信息中心無法訪問就遇上了。
2.1 啟動WAS
在root用戶下啟動WAS服務:
$ /opt/IBM/InformationServer/ASBServer/bin/MetadataServer.sh start
啟動會需要一段時間,大約4分鍾左右,當WAS啟動完成后,檢查進程信息,可以看到類似如下的進程信息:
$ ps -ef|grep java
root 22151422 1 0 12:48:12 pts/2 0:52 /opt/IBM/WebSphere/AppServer/java/bin/java -Declipse.security -Dwas.status.socket=61870 -Dosgi.install.area=/opt/IBM/WebSphere/AppServer -Dosgi.configuration.area=/opt/IBM/WebSphere/AppServer/profiles/InfoSphere/configuration -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name=webspherev70_%g,groupAccess,nonFatal -Xscmx50M
在啟動過程中相關的日志記錄在/opt/IBM/InformationServer/ASBServer/bin/startMetadataServer.log中。移動到AppServer目錄下(/opt/IBM/WebSphere/AppServer/bin),檢查Server狀態
# ./serverStatus.sh -all -username wasadmin -password wasadmin
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/InfoSphere/logs/serverStatus.log
ADMU0128I: Starting tool with the InfoSphere profile
ADMU0503I: Retrieving server status for all servers
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: server1
ADMU0508I: The Application Server "server1" is STARTED
這里可以看到Server的狀態為STARTED,如果報錯
The server "server1" cannot be reached. It appears to be stopped.
請仔細查看 /opt/IBM/WebSphere/AppServer/profiles/InfoSphere/logs目錄下的SystemErr.log和SystemOut.log日志文件,引起該問題的原因很多,可能是連接資源庫問題、配置文件找不到、密碼不對等。
2.2 啟動ASB代理程序
$ /opt/IBM/InformationServer/ASBNode/bin/NodeAgents.sh start
Starting LoggingAgent...
LoggingAgent started.
Starting Agent...
Agent started.
當代理進程啟動完成后,檢查進程信息如果此時沒有任何的客戶端與服務端通信,ASB代理進程和ASB記錄代理進程端口的狀態應為為LISTEN,
$ netstat -a|grep 31533
tcp 0 0 *.31533 *.* LISTEN
$ netstat -a|grep 31531
tcp 0 0 *.31531 *.* LISTEN
$ ps -ef|grep -i agent
root 21364806 19202464 0 12:49:27 pts/2 0:02 /opt/IBM/InformationServer/ASBNode/bin/RunAgent -Xbootclasspath/a:conf -Djava.ext.dirs=apps/jre/lib/ext:lib/java:eclipse/plugins:eclipse/plugins/com.ibm.isf.client_8.5.0.0 -Djava.class.path=conf -Djava.security.auth.login.config=/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/auth.conf -Dcom.ibm.CORBA.ConfigURL=file:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/sas.client.props -Dcom.ibm.SSL.ConfigURL=file:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ssl.client.props -Dcom.ibm.CORBA.enableClientCallbacks=true -Dcom.ibm.CORBA.FragmentSize=128000 -class com/ascential/asb/agent/impl/AgentImpl run
root 9699638 1 1 12:49:25 pts/2 0:02 /opt/IBM/InformationServer/ASBNode/apps/jre/bin/java -Duser.language=en -Duser.country=US -Djava.security.auth.login.config=/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/auth.conf -Dcom.ibm.CORBA.ConfigURL=file:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/sas.client.props -Dcom.ibm.SSL.ConfigURL=file:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ssl.client.props -Dcom.ibm.CORBA.enableClientCallbacks=true -Dcom.ibm.CORBA.FragmentSize=128000 -classpath /opt/IBM/InformationServer/ASBNode/conf:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ACS_client.jar:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ACS_common.jar:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ISF_util.jar:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ISF_j2ee.jar:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ASB_utils.jar:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/ASB_util_client.jar:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/com.ibm.ws.ejb.thinclient_7.0.0.jar:/opt/IBM/InformationServer/ASBNode/eclipse/plugins/com.ibm.isf.client_8.5.0.0/com.ibm.ws.security.crypto.jar com.ascential.acs.logging.agent.LoggingAgentSocketImpl
注意:當ASB啟動完成后,需要1分鍾左右的時間注冊事件到WAS,所以啟動完成后不建議立即做像測試數據庫連接和加載數據的操作。
2.3 啟動DataStage Engine
$ uv -admin -start
啟動完Engine進程后,如果沒有任何客戶端連接,端口的狀態應為:LISTEN,並且dsrpcd 守護進程和resource_tracker進程啟動。
$ netstat -a|grep dsrpc
tcp4 0 0 *.dsrpc *.* LISTEN
$ ps -ef|grep dsrpc
root 19792368 1 0 13:07:03 pts/2 0:00 /software/IBM/InformationServer/Server/DSEngine/bin/dsrpcd
$ ps -ef|grep resource_tracker
dsadm 10485832 1 0 13:07:19 - 0:00 /software/IBM/InformationServer/Server/PXEngine/bin/resource_tracker
3 停止InfoSphere Information Server進程
建議先停止DataStage Engine,再停止ASB代理,最后在停止WAS。
3.1 停止DataStage Engine
$ ps -ef|grep dsapi
$ ps -ef|grep dscs
$ ps -ef|grep -i phantom
$ netstat -a|grep dsrpc
停止前檢查dsapi、dscs、phantom進程應該無任何輸出,檢查dsrpc端口的只有一條狀態為LISTEN的進程,如果有為ESTABLISHED,類似下面的情況則表示當前有客戶端連接到了服務端,需要等待客戶端關閉連接或者kill了該連接。
tcp4 0 0 testHost.dsrpc 192.168.1.9.sftsrv ESTABLISHED
tcp4 0 0 *.dsrpc *.* LISTEN
客戶端關閉連接后停止Engine
$ uv -admin -stop
然后再次檢查netstat -a|grep dsrpc 應無任何輸出。如果在客戶端未關閉的情況下強制停止進程,則未關閉的連接進程狀態為wait,這表明Engine未完全停止。
netstat -a|grep dsrpc
tcp4 0 0 estHost.dsrpc 192.168.1.9.sftsrv FIN_WAIT_2
3.2 停止ASB代理程序
$ /opt/IBM/InformationServer/ASBNode/bin/NodeAgents.sh stop
檢查ASB代理
$ ps -ef|grep -i agent
輸出的結果中應為沒有任何包含ASBNode路徑的進程信息,如果有請嘗試重新停止。
3.3 停止WAS進程
$ /opt/IBM/InformationServer/ASBServer/bin/MetadataServer.sh stop
檢查WAS進程
$ ps -ef|grep java
輸出的結果中應為沒有任何包含ASBServer路徑的進程信息,如果有請嘗試重新停止。
4 腳步
啟動的腳步
echo set dataStage environment...
/opt/IBM/InformationServer/Server/DSEngine/dsenv
echo start WebSphere Application Server
/opt/IBM/InformationServer/ASBServer/bin/MetadataServer.sh start
echo check there are java process are running
ps -ef|grep java
echo start ASB Agent
/opt/IBM/InformationServer/ASBNode/bin/NodeAgents.sh start
echo check the agent has running
ps -ef|grep -i agent
echo start DataStage Services
uv -admin -start
echo checking datastage backgroup process..
ps -ef |grep dsapi
ps -ef|grep dscs
ps -ef|grep -i phantom
ps -ef|grep dsrpc
echo checking datastage dsrpc port
netstat -a|grep dsrpc
echo see any momery segment left
ipcs qms a|grep ade
停止的腳步
echo set dataStage environment...
/opt/IBM/InformationServer/Server/DSEngine/dsenv
echo checking datastage backgroup process..
ps -ef |grep dsapi
ps -ef|grep dscs
ps -ef|grep -i phantom
echo checking datastage dsrpc port
netstat -a|grep dsrpc
echo stop DataStage Services
uv -admin -stop
echo see any momery segment left
ipcs qms a|grep ade
echo check the port again
netstat -a|grep dsrpc
echo stop ASB Agent
/opt/IBM/InformationServer/ASBNode/bin/NodeAgents.sh stop
echo check the agent has stopped
ps -ef|grep -i agent
echo stop WebSphere Application Server
/opt/IBM/InformationServer/ASBServer/bin/MetadataServer.sh stop
echo check there are no java process left behind
ps -ef|grep java
5 總結
ASB代理通信進程協助層與層之間的通信,ASB代理記錄進程記錄事件信息到元數據存儲層的數據庫中;DataStage Engine進程是核心進程,它負責創建、管理JOB、cache和資源;WebSphere Application Server(WAS)是InfoSphere Information Server基於Web的應用程序,它負責初始化連接器和基於web的console、infocenter等工具。它們之間互相協調工作,一個組件進程停止工作,會影響其它組件的工作,比如ASB進程停止會影響服務端與客戶端的通信,導致客戶端的連接斷開,各種編輯和保存工作不能正常進行,有可能會導致數據丟失,So認真的理解基礎知識和工作原理將會幫你更快更好的掌握DataStage。
--The end(2015-09-24)