Websphere运维
查看IHS的cert有效期: /opt/IBM/IBMIHS90/bin/gskcapicmd -cert -details -db certname.kdb -stashed -label certname 查看MQ cert有效期: echo "" | openssl s_client -connect localhost:1415 > /tmp/getCert.log openssl x509 -in /tmp/getCert.log -enddate -noout | awk 'BEGIN {FS="="} {print $NF}' 查看IHS version: /opt/IBM/IBMIHS90/bin/versioninfo.sh | grep -i version 查WAS补丁的version command: /opt/IBM/WebSphere85/AppServer/bin/versionInfo.sh | grep Version 查看java 版本version: /opt/IBM/WebSphere85/AppServer/java_1.8_64/bin/java –version 查控制台的用户名和密码: cat /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/properties/soap.client.props | grep SOAP | grep -v '#' 查看控制台端口:https://{server_ip}:{port}/ibm/console ,其中server_ip为WAS部署的主机IP,port为配置的端口号 check WAS console port:/opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/config/cells/wascell/nodes/dmgrnode/serverindex.xml and look for WC_adminhost_secure's port 查看控制台端口命令: cat /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/config/cells/wascell/nodes/dmgrnode/serverindex.xml | grep -A 2 -Ei 'WC_adminhost_secure' --color=auto <specialEndpoints xmi:id="NamedEndPoint_10" endPointName="WC_adminhost_secure"> <endPoint xmi:id="EndPoint_10" host="*" port="20003"/> </specialEndpoints> WAS clean start: clean restart and sync node: /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/bin/startManager.sh ; /opt/IBM/WebSphere85/AppServer/profiles/appprofile/bin/syncNode.sh localhost 20004 ; /opt/IBM/WebSphere85/AppServer/profiles/appprofile/bin/startNode.sh ; clean start过程中需要查看sync node端口: Sync node 查看主机和端口:cat /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/logs/AboutThisProfile.txt | grep -Ei 'host|soap' --color=auto Websphere nodeagent not sync & can't be start 1. 1.去掉密码认证 /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/config/cells/wascell/security.xml 将标红处true改成false <security:Security xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:orb.securityprotocol="http://www.ibm.com/websphere/appserver/schemas/5.0/orb.securityproto col.xmi" xmlns:security="http://www.ibm.com/websphere/appserver/schemas/5.0/security.xmi" xmi:id="Security_1" useLocalSecurityServer="true" useDomainQualifiedUserNames= "false" enabled="true" cacheTimeout="600" issuePermissionWarning="false" activeProtocol="BOTH" enforceJava2Security="false" enforceFineGrainedJCASecurity="false" appEna bled="false" dynamicallyUpdateSSLConfig="true" allowBasicAuth="true" activeAuthMechanism="LTPA_1" activeUserRegistry="WIMUserRegistry_1" defaultSSLSettings="SSLConfig_1 "> 2. 2.启动dmgr,看是否有报错 3. 3.若启动无报错,则分别在两台机器上使用syncNode.sh同步node 路径:/opt/IBM/WebSphere85/AppServer/profiles/appprofile/bin ./syncNode.sh 主机hostname port 4. 4.hostname为主机,port在下面路径查找 /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/logs/AboutThisProfile.txt中Management SOAP connector port: 该参数后的值 5. 5.启动node看看是否能起得起来 6. 6.起得来关闭所有node+dmgr,并且恢复security.xml 7. 7.然后就能正常启动了 • Get account for console vi /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/properties/soap.client.props get username and password from below attribute com.ibm.SOAP.loginUserid=wsadmin-hostname com.ibm.SOAP.loginPassword= decode the password on http://strelitzia.net/wasXORdecoder/wasXORdecoder.html • Restart IHS server (Web server) 1. Login and change to ihsadm user su - ihsadm 2. Check the IHS INSTANCE ps -ef|grep httpd OR. use below command to check what instance was run on this server ls /appvol/IHS85 3. STOP THE IHS SERVER sudo /opt/IBM/IBMIHS85/bin/apachectl -k stop -D Instance_Name 4. START THE HIS SERVER sudo /opt/IBM/IBMIHS85/bin/apachectl -k start -D Instance_Name i.e. sudo /opt/IBM/IBMIHS85/bin/apachectl -k start -D CWIF01UK-WS01 sudo /opt/IBM/IBMIHS85/bin/apachectl -k start -D CWIF01UK-WS02 sudo /opt/IBM/IBMIHS85/bin/apachectl -k stop -D PWIF01UK-WS01 sudo /opt/IBM/IBMIHS85/bin/apachectl -k start -D PWIF01UK-WS01 5. Check and confirm the IHS Instance again ps -ef|grep httpd • clean cache if needed: su - wasadm sh /opt/IBM/WebSphere85/AppServer/profiles/appprofile/bin/clearClassCache.sh sh /opt/IBM/WebSphere85/AppServer/profiles/appprofile/bin/osgiCfgInit.sh sh /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/bin/clearClassCache.sh sh /opt/IBM/WebSphere85/AppServer/profiles/dmgrprofile/bin/osgiCfgInit.sh