资源描述
Click to edit Master title style,Click to edit Master text styles,Second level,Third level,Fourth level,Fifth level,Sixth level,Seventh level,Eighth level,Ninth level,*,*,管理监听,Weblogic,环境,姓名:李飞,邮箱:,lifei,手机:,15001025303,管理监听,Weblogic,环境,在这节课中我们应该学会下面内容,了解节点管理器,了解日志信息,2025/12/5 周五,大纲,2025/12/5 周五,远程管理,配置机器,节点管理,配置节点管理器,日志监听,节点管理器(,NM,),2025/12/5 周五,节点管理器,在集群中可以远程启动或关闭被管,Server,它是一个脚本进程,监控,Server,运行健康状态,可以做为一个后面进程运行,必须在被管,Server,主机中启动节点管理器,节点管理器作用,我们可以用节点管理器作下面操作,启动、关闭重启管理,Server,启动、关闭、暂挂、重启被管,Server,自动重启失败的,Server,监控,Server,收集日志信息,2025/12/5 周五,节点管理器体系架构,2025/12/5 周五,节点管理器怎样启动,AS,2025/12/5 周五,节点管理器怎样启动,MS,2025/12/5 周五,节点管理器怎样重启,AS,2025/12/5 周五,节点管理器怎样重启,MS,2025/12/5 周五,节点管理器怎样关闭一个实例,2025/12/5 周五,配置节点管理器,2025/12/5 周五,节点管理器必须运行在你要控制的被管,Server,机器上,需要配置,Machine,并且把,NM,控制的,Server,实例分配到,Machine,中,MN,以一个操作系统服务来运行,因此可以实现自动重启,节点管理器默认行为,在,WLS,安装好后,节点管理器就可以直接启动,默认情况下,管理管制台可以使用节点管理器启动被管,Server,在被管,Server,启动后,节点管理器监听被管,Server,自动重启失败的被管,Server,2025/12/5 周五,配置基于,Java,的,NM,2025/12/5 周五,BEA,推荐,NM,以操作系统服务来运行,配置基于,Java,的节点管理器包含,在,Windows,中重新配置,NM,启动服务,在多个机器上配置节点管理器,查看,nodemanager.properties,在,Windows,中重新配置,NM,服务,使用,uninstallNodeMgrSvc.cmd,删除服务,编辑,installNodeMgrSvc.cmd,来指定监听地址与端口,运行,installNodeMgrSvc.cmd,重新重启安装,NM,服务,2025/12/5 周五,在多个机器中配置,NM,节点管理器应该在每个机器上安装配置,可以使用,WLST,脚本命令,nmEnroll,,可以把一个机器中的,Domain,中所有的信息复制到另一台机器中,nmEnroll(domainDir,nmHome),这个命令会从管理服务器中下载下面文件,nm_password.properties,,包含加密的用户名密码,SerializedSystemIni.dat,文件,2025/12/5 周五,查看,nodemanager.properties,在,nodemanager.properties,文件中指定了基于,Java,的,NM,属性,在命令行中的值要优先于,nodemanager.properties,中的值,在,nodemanager.properties,文件中配置启动脚本,设置,the,StartScriptEnabled,属性为,True,设置,StartScriptName,属性指向你的脚本名字,2025/12/5 周五,其它配置选项,其它,NM,配置任务包括,给机器配置节点管理器,配置,nodemanager.domains,文件,配置远程启动参数,确保定义了管理,Server,的地址,设置,NM,环境变量,2025/12/5 周五,给机器配置,NM,MachinesConfigurationNode,2025/12/5 周五,配置,nodemanager.domain,文件,nodemanager.domains,文件指定了,NM,可以控制的,Domain,当用户发出一个命令,NM,从这个文件中查找,Domain,目录,2025/12/5 周五,配置远端启动参数,2025/12/5 周五,确保定义管理服务地址,2025/12/5 周五,设置,NM,环境变量,2025/12/5 周五,Environment Variable,Description,JAVA_HOME,Root directory of JDK that you are using for Node Manager.For example:,set JAVA_HOME=c:beajdk1.5.0_06,Node Manager has the same JDK version requirements as WebLogic Server.,WL_HOME,WebLogic Server installation directory.For example:,set WL_HOME=c:bea,wlserver_10.0,PATH,Must include the WebLogic Server bin directory and path to your Java executable.For example:,set PATH=%WL_HOME%serverbin;%JAVA_HOME%bin;%PATH%,LD_LIBRARY_PATH(UNIX only),For HP UX and Solaris systems,you must include the path to the native Node Manager libraries.,Solaris example:,LD_LIBRARY_PATH:$WL_HOME/server/native/solaris:$WL_HOME/server/lib/solaris/oci816_8,HP UX example:,SHLIB_PATH=$SHLIB_PATH:$WL_HOME/server/native/hpux11:$WL_HOME/server/lib/hpux11/oci816_8,CLASSPATH,You can set the Node Manager CLASSPATH either as an option on the java command line used to start Node Manager,or as an environment variable.,Windows example:,set CLASSPATH=.;%WL_HOME%serverlibweblogic_sp.jar;%WL_HOME%serverlibweblogic.jar,节点管理器配置及日志文件,2025/12/5 周五,节点管理器配置及日志文件,NM,配置文件包含,:,nodemanager.properties,nodemanager.hosts,nodemanager.domains,nm_data.properties,nm_password.properties,boot.properties,startup.properties,server_name.lck,server_name.pid,server_name.state,NM,日志文件包含,:,nodemanager.log,server_name.out,2025/12/5 周五,大纲,日志和监听,使用日志文件,监听,Server,2025/12/5 周五,使用日志文件,使用日志文件可以帮助我们发现,经常访问的资源,数据的发送与接收情况,用户访问时的,IP,地址,在访问时出现的异常信息,性能信息,2025/12/5 周五,Server,日志,Server,日志,记录,Server,的行为,默认在,serverNamelogs,.log,Domain,日志,记录所有,Server,的行为,默认在,logs,.log,Server,日志是独立存在不受其它,Server,影响,2025/12/5 周五,配置,Server,日志,2025/12/5 周五,打印到,Domain,日志的信息,2025/12/5 周五,Severity,Forwarded to Domain Log by Default,Meaning,Trace,No,Used for messages from the Diagnostic Action Library.,Info,No,Used for reporting normal operations.,Notice,Yes,An informational message with a higher level of importance,Warning,Yes,A suspicious operation or configuration has occurred but it may not have an impact on normal operation.,Error,Yes,A user error has occurred.The system or application is able to handle the error with no interruption and limited degradation of service.,Critical,Yes,A system or service error has occurred.The system is able to recover but there might be a momentary loss or permanent degradation of service.,Alert,Yes,A particular service is in an unusable state while other parts of the system continue to function.Automatic recovery is not possible;the immediate attention of the administrator is needed to resolve the problem.,Emergency,Yes,The server is in an unusable state.This severity indicates a severe system failure or panic.,Debug,Yes,A debug message was generated.,信息属性,#,2025/12/5 周五,信息属性,2025/12/5 周五,Attribute,Description,Timestamp,The time and date when the message originated,in a format that is specific to the locale.,Severity,Indicates the degree of impact or seriousness of the event reported by the message.,Subsystem,This attribute denotes the particular subsystem of WebLogic Server that was the source of the message,for example,EJB,RMI,JMS.,Machine Name,Server Name,Thread ID,These attributes identify the origins of the message.,Server Name is the name of the WebLogic Server instance on which the message was generated.,Machine Name is the DNS name of the computer that hosts the server instance.,Thread ID is the ID that the JVM assigns to the thread in which the message originated.,信息属性,2025/12/5 周五,Attribute,Description,User ID,The user from the security context when the message was generated.,Transaction ID,Present only for messages logged within the context of a transaction,.,Diagnostic Context ID,Context information to correlate messages coming from a specific request or application,.,Raw Time Value,The timestamp in milliseconds,.,Message ID,A unique six-digit identifier.Message IDs through 499999 are reserved for WebLogic Server system messages.,Message Text,For WebLogic Server messages,this contains the Short Description as defined in the system message catalog.For other messages,this is text defined by the developer of the program.,日志过虑,日志过虑功能可以控制日志信息输出级别,可以为每个,Server,创建不同的过虑器,它可以作用于,它是,Server,的日志,标准输出,Domain,日志中,2025/12/5 周五,创建日志过虑器,2025/12/5 周五,分配日志过滤器,2025/12/5 周五,信息日志,我们可以访问下面日志来了解日志含义,周五,日志信息,2025/12/5 周五,使用控制台监听,控制台自身也提供了一些监控功能,2025/12/5 周五,Description,Attribute,The monitoring view can be customized by clicking Customize this table,Many of the Consoles objects have a Monitoring tab that allows you to view monitoring information for that object.,监控运行的,Server,2025/12/5 周五,自定义监控,2025/12/5 周五,监控单个,Server,2025/12/5 周五,信息属性,2025/12/5 周五,Attribute,Description,Timestamp,The time and date when the message originated,in a format that is specific to the locale.,Severity,Indicates the degree of impact or seriousness of the event reported by the message.,Subsystem,This attribute denotes the particular subsystem of WebLogic Server that was the source of the message,for example,EJB,RMI,JMS.,Machine Name,Server Name,Thread ID,These attributes identify the origins of the message.,Server Name is the name of the WebLogic Server instance on which the message was generated.,Machine Name is the DNS name of the computer that hosts the server instance.,Thread ID is the ID that the JVM assigns to the thread in which the message originated.,
展开阅读全文