设为首页 收藏本站
查看: 650|回复: 0

[经验分享] WebLogic 12c: Node Manager Best Practices

[复制链接]

尚未签到

发表于 2017-2-16 07:45:51 | 显示全部楼层 |阅读模式
  During the last couple of years (and the last couple of WebLogic versions) I collected a number of best practices regarding WebLogic nodemanager. All of them hold true for WebLogic 12c as well. This posting is not a step-by-step beginners guide and it willnot save you from attending some training or studying the Oracle documentation regarding node manager yourself. Anyway, here are some suggestions, check if the apply for your environments:
DSC0000.png

Node Manager Best Practices 1


  • At first, take a decision to start servers with or without NM. Note, that is not absolutely necessary. You can always start your servers with the scripts generated by the config wizzard. I personally know rather big companies building lovely carswho took the decsicion not to use node manager.
  • Would I use nodemanger myself? For an “average” project: yes! Only after configuring node manager you can use the WebLogic admin console to start and stop managed servers and node manager will restart you failed servers as well. However, if you considerrestarting you servers automatically because of out-of-memory problems, better read this article about “surviving generations” to understand how to track down memory leaks and fix them. Anyway, you still want to use node manager.
    DSC0001.png
  • Make sure you understand that nodemanger will use default values to start your servers unless you specify them yourself in the admin console under server startup parameters.
  • Make sure you always start your servers with same startup parameters! This is really important. You end up in deep trouble if you don’t. Believe me.
    Imagine somebody is starting a managed server using the admin console and the provided values there. Next day somebody else starts a server using the provided scripts (which – at least in real life – will never be identical to the startup values configuredin the admin console). Now depending on the way the server was started it will behave differently and show erratic behaviour or not.
  • Document and communicate the usage of node manager. Write it down in the operations manual. If you ever hire me as a consultant for some performance tuning it helps to know if you are actually using node manager or not.
  • Don’t forget to enroll new machines for NM usingnmEnroll()
  • A good way to overcome the potential problem with startup parameters configured in admin console is to use:?
    1
    2
    [file: nodemanger.properties]startScriptEnabled=true
    stopScriptEnabled=true



      Then node manager will use the generated start script and you do not need to configure startup values in the admin server console.
  • If you are not using SSL for your domain the default option for node manager to use encrypted communication does not make that much sense for you. Disable it. On the admin server site switcht to “plain text” for node manager communication and in the nodemanager.properties located in WL_HOME/common/nodemanager set?
    1
    secureListener=false


  • If you decide to use SSL for the node manager communication, get correct certificates! The demo certificate will not work in a distributed system. Make sure the hostnames in the certificates are correct. If they are not correct, you may want to considerdisabling host name verification on the admin server (which is the client for the node manager).
  • Remember that node manager is not part of the domain. Still you can check the node manager status and and see the logs directly from the WebLogic admin console.
    DSC0002.png

Node Manager Best Practices 2


Starting the Managed Server Using Node Manager and WLST
  The steps for starting the Managed Server using WLST and Node Manager are as follows :
  i) Setting up your environment.
  Add WebLogic Server classes to the CLASSPATH environment variable andWL_HOME\server\bin to the PATH environment variable. OR
  You can use a C:\Oracle\Middleware\wlserver_12.1\server\bin\setWLSEnv.cmd script to set both variables.
DSC0003.jpg

  ii) Start WLST Session using command : java weblogic.WLST
DSC0004.jpg

  iii) Start Node Managerusing command :
  startNodeManager(verbose=’true’, NodeManagerHome=’C:\\Oracle\\Middleware\\wlserver_12.1\\common\\nodemanager’, ListenPort=’5556′, ListenAddress=’localhost’)
DSC0005.jpg

DSC0006.jpg

  iv) Connect WLST to a Node Manager by entering the nmConnect command.
  nmConnect(‘weblogic’, ‘weblogic123′, ‘localhost’, ’5556′, ‘base_domain’ , ‘C:\\Oracle\\Middleware\\user_projects\\domains\\base_domain’ , ‘ssl’)
   DSC0007.jpg
  note: Node Manager security relies on a one-way SSL connection between the client and server.If you are establishing a command line connection to the Java Node Manager using the WebLogic Server Scripting Tool (WLST) nmConnect command, youprovide the Node Manager user name and password(here weblogic and weblogic123 respectively). Node Manager verifies the username and password against the domain’s nm_password.properties file.Node Manager credentials are located on the Security>General>AdvancedOptions of Console page.Administration Console users do not need to explicitly provide credentials to connect to Node Manager—the Node Manager user name and password are available in the domain configuration and are provided automatically.
  v) Use the nmStart command to start a server.
nmStart(‘AdminServer’)
DSC0008.jpg

  Monitor the status of the Administration Server by entering the nmServerStatus command.
nmServerStatus(‘AdminServer’)
  vi) Connect WLST to a running WebLogic Administration Server instance using the connect command.
connect(‘weblogic’,'weblogic123′)
DSC0009.jpg

  vii) To start a Managed Server or cluster, enter the following command:
start(‘Server-0′,’Server’)
start(‘mycluster’, ‘Cluster’)

DSC00010.jpg

  viii) Stop the server by entering the nmKill command.
nmKill(‘Server-0‘)
DSC00011.jpg

  ix) Stop theAdminServer by entering the nmKill command.
nmKill(‘AdminServer‘)
DSC00012.jpg

  x) Disconnect the node manager :nmDisconnect()and Exit the WLST:exit()
DSC00013.jpg

  note: To find node manager process :
For windows
netstat -ao| findstr 5556
TCP ajit:5556 ajit:0 LISTENING 1900
  here : PID – 1900.
  For Linux/unix :
  netstat -an | grep -v grep | grep weblogic.NodeManager

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-342690-1-1.html 上篇帖子: weblogic不同domain中session冲突问题 下篇帖子: weblogic 10 install on OSX 安装笔记
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表