• Save
WLS
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Nice
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
3,096
On Slideshare
3,096
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
1
Likes
11

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • 所谓 Domain 就是,由配置为 Administrator Server 的 WebLogic Server 实例管理的逻辑单元,这个单元是有所有相关资源 的集合。
  • Server 是一个相对独立的,为实现某些特定功能而结合在一起的单元
  •   中央配置控制器為整個域  還有什麼作用?  主機管理控制台  使您能夠啟動和停止服務器從一個中央位置  使您能夠遷移服務器和服務領域內的  讓您在部署應用程序域 Guidelines   必須有正好一個 * 在域管理服務器  管理服務器只控制一個域。  對於生產使用,我們建議不要宿主應用程序邏輯或資源上的管理服務器
  • 正在運行的實例承載的應用程序和應用程序資源  每個受管服務器是獨立的其他管理服務器(除非他們是在一個集群)  沒有限制數量的管理服務器在域中  個別託管服務器添加容量和 / 或應用程序隔離 Administration Server stores the master copy of the domain configuration 管理服務器的主副本的存儲域配置 Administration Server stores the configuration for all managed servers in the domain 管理服務器存儲配置所有託管服務器在域 Each Managed Server stores a local copy of its configuration 每個受管服務器存儲一個本地副本的配置 When a Managed Server starts, it connects to the Administration Server to synchronize the configuration 當管理服務器啟動時,它連接到管理服務器同步配置 When configuration is changed, the Administration Server sends changed configuration to Managed Servers 當配置改變時,管理服務器發送改變配置管理服務器
  • Utility/process running on a physical server that enables you to start, stop, suspend, and restart WebLogic Server instances remotely
  • Weblogic server configuration is 分割 by domain 每個 domain 可以包含一個 administration server, 及多個 managed server , cluster Node manager 每個 machine process 用來 啟動、停止  weblogic server instances 另外,有一些 administration tools 來配置、管理  weblogic domain
  • domain-name : The name of this directory is the name of the domain. Autodeploy: in development mode, apps and files are automatically deployed Bin: contains scripts that are used in the process of starting and stopping the Administration Server and the Managed Servers in the domain. can optionally contain other scripts of domain-wide interest, config: contains the current configuration and deployment state of the domain. The central domain configuration file, config.xml, resides in this directory. config/configCache: Contains data that is used to optimize performance when validating changes in the domain's configuration documents. config/diagnostics: contains system modules for the WebLogic Diagnostic Framework. config/jdbc: contains system modules for global JDBC modules that can be configured directly from JMX config/jms: contains system modules for JMS config/lib: not used in the current release of WebLogic Server. config/nodemanager: holds configuration information for connection to the Node Manager. config/security: contains system modules for the security framework. It contains one security provider configuration extension for each kind of security provider in the domain's current realm. config/startup: contains system modules that contain startup plans. Startup plans are used to generate shell scripts that can be used as part of server startup. configArchive: contains a set of JAR files that save the domain's configuration state. Just before pending changes to the configuration are activated, the domain's existing configuration state, consisting of the config.xml file and the other related configuration files, is saved in a versioned JAR file with a name like config.jar#1, config.jar#2, etc. console-ext: contains extensions to the Administration Console, which enable you to add content to the WebLogic Server Administration Console, replace content, and change the logos, styles and colors without modifying the files that are installed with WebLogic Server. init-info: contains files used for WebLogic domain provisioning. lib: Any JAR files you put in this directory are added to the system classpath of each server instance in the domain when the server's Java virtual machine starts. pending: contains domain configuration files representing configuration changes that have been requested, but not yet activated. security: holds security-related files that are the same for every WebLogic Server instance in the domain: SerializedSystemIni.dat This directory also holds security-related files that are only needed by the domain's Administration Server: DefaultAuthorizerInit.ldift DefaultAuthenticatorInit.ldift DefaultRoleMapperInit.ldift servers: contains one subdirectory for each WebLogic Server instance in the domain. The subdirectories contain data that is specific to each server instance. servers/ server-name: the server directory for the WebLogic Server instance with the same name as the directory. servers/ server-name /bin: holds executable or shell files that can be or must be different for each server. servers/ server-name /cache: holds directories and files that contain cached data. servers/ server-name /cache/EJBCompilerCache: cache for compiled EJBs. servers/ server-name /data: holds files that maintain persistent per-server state used to run the WebLogic Server instance, other than security state, as opposed to temporary, cached or historical information. servers/ server-name /data/ldap: holds the embedded LDAP database. The runtime security state for the WebLogic Server instance is persisted in this directory. servers/ server-name /data/store: holds WebLogic persistent stores. servers/ server-name /logs: holds logs and diagnostic information. servers/ server-name /logs/diagnostic_images: holds information created by the Server Image Capture component of WLDF servers/ server-name /logs/jmsServers: contains one subdirectory for each JMS server in the WebLogic Server instance. Each such subdirectory contains the logs for that JMS server. servers/ server-name /logs/connector: the default base directory for connector module (JCA ResourceAdapter) logs. servers/ server-name /security: h olds security-related files that can be or must be different for each WebLogic Server instance. The file boot.properties is an example of a file that resides here because it can differ from one server to the next. This directory also maintains files related to SSL keys. servers/ server-name /tmp This directory holds temporary directories and files that are created while a server instance is running. For example, a JMS paging directory is automatically created here unless another location is specified. Files in this directory must be left alone while the server is running, but may be freely deleted when the server instance is shut down. tmp: stores temporary files used in the change management process.
  • create domain -> admin server -> managed server -> 元件、佈署程式
  • 配置、監控 domain
  • WebLogic Documentation • Oracle WebLogic Scripting Tool 11g Release 1 (10.3.3) • http://download.oracle.com/docs/cd/E14571_01/web.1111/e13715/toc.htm • The WebLogic Server® Mbean Reference • http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e13951/core/in dex.html
  • What is jvm?
  • JDK v6 之後內建 Jvisualvm ; Path: C:\\Java\\jdk\\bin VisualGC plug-in , 到 menu 的 Tools 下,下載安裝。 提供 Java options, JVM heap… 等資訊 顯示 jvm heap & GC 活動狀況 Thread( θrɛd ) 執行緒分析與圖表 可以遠端的監控
  • 必須有安裝 jrockit 1.6 版以上 .start menu 開啟 可以看更細節的監控
  • 什麼是 GC
  • 如何停服務、啟動
  • jstatd [options] 此命令是一个 RMI Server 应用程序,提供了对 JVM 的创建和结束监视,也为远程监视工具提供了一个可以 attach 的接口 options -nr 当一个存在的 RMI Registry 没有找到时,不尝试创建一个内部的 RMI Registry -p port 端口号,默认为 1099 -n rminame 默认为 JStatRemoteHost ;如果多个 jstatd 服务开始在同一台主机上, rminame 唯一确定一个 jstatd 服务 -J jvm 选项 jstatd 会报如下错误: Could not create remote object access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write) java.security.AccessControlException: access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)         at java.security.AccessController.checkPermission(AccessController.java:546)         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)         at java.lang.System.setProperty(System.java:727)         at sun.tools.jstatd.Jstatd.main(Jstatd.java:122) 这是因为没有给 jstatd 指定安全策略 创建安全策略文件,并命名为 jstatd.all.policy grant codebase "file:${java.home}/../lib/tools.jar" {     permission java.security.AllPermission; }; 再次启动 jstatd -J-Djava.security.policy=jstatd.all.policy 利用 jps 查看 jps -l 127.0.0.1

Transcript

  • 1. WebLogic Server Overview Amber Yu 2011.9 Oracle WebLogic Server
  • 2. Agenda
    • WebLogic Server Overview
    • Administration Tools
    • JVM Monitoring / Tuning
    • Troubleshooting
  • 3. Oracle Weblogic Server 11g
  • 4. Domain
    • What is it?
      • a logically related group of WebLogic Server instances that you manage from a single set of configuration artifacts.
    • What’s in a domain?
      • Servers
      • Clusters of servers
    • Rules:
      • All WebLogic Server instances within the same domain must be at the same major and minor version.
      • Servers within a domain can be at different Maintenance Pack levels
      • Administration Server is at the same Maintenance Pack Level or higher than its Managed Servers.
  • 5. Server
    • What is it?
      • A configured instance to host applications and resources
        • WebApps, Enterprise Apps, Web Services, …
        • JMS, JDBC, Diagnostics, …
    • What types of servers are there?
      • Administration Server
      • Managed Server
    JNDI JMS Queue JDBC Pool
  • 6. Administration Server
    • What is it?
      • Central configuration controller for the entire domain
    • What else does it do?
      • Hosts the Administration Console
      • Enables you to start and stop servers from a central location
      • Enables you to migrate servers and services within the domain
      • Enables you to deploy applications within the domain
    • Guidelines :
      • There must be exactly one* Administration Server in domain
      • An Administration Server controls only one domain.
      • For production use, we recommend not hosting application logic or resources on the Administration Server
  • 7. Managed Server
    • What is it?
      • A running instance that hosts applications and application resources
      • Each Managed Server is independent of other Managed Servers (unless they are in a cluster)
      • No limit to number of Managed Servers in a domain
      • Individual Managed Servers are added for capacity and/or application isolation
  • 8. Cluster Cluster 1 Cluster 2 Admin Svr
    • A cluster is a group of Managed Servers running simultaneously and working together to provide increased scalability and reliability
      • Scalability: through parallelism
      • Reliability/Availability: through replication and redundancy
    • A cluster appears as a single instance to most clients.
    • Clusters enable some advanced features, such as Whole Server Migration, Service Migration, and clustered JMS destinations.
  • 9. Node Manager
  • 10. Summary
    • WebLogic Server configuration is segmented by domain
      • Each domain represents a configuration entity and uses one set of configuration artifacts
      • Each domain has one Administration Server, and can have multiple managed servers and clusters
    • Node Manager is a per-machine process used to start and stop WebLogic Server instances
    • There are a number of administration tools available for configuring and managing a WebLogic domain:
      • Config Wizard, Admin Console, WLST, weblogic.Deployer
    Admin Server Managed Servers config.xml Admin Console
  • 11. WebLogic Server Directory Structure
    • Middleware home
    • WebLogic Server
      • wlserver_10.3
      • All of the WebLogic Server binaries, libraries etc
      • Lib directory contains libraries, including thin client libraries for JMS, WS clients etc
    • User Projects
      • Contains the domain directories
      • Described in the next couple of slides
    • Oracle home
      • Oracle_OSB1,Oracle_SOA1…
  • 12. WebLogic Domain Directory Structure
    • User Projects
      • Domains
    • Root directory is the name of the domain setup
    • Bin directory contains all scripts needed to manage lifecycle
      • startWebLogic
      • stopWebLogic
      • startManagedWebLogic
      • setDomainEnv
    • Config directory
      • Domain config.xml
      • JMS modules configuration files
    • Servers directory
      • Server logs
      • Ex: servers/AdminServer
  • 13. Installation of WebLogic based Products
    • Start page for downloading the software is:
    • http://www.oracle.com/technology/software/products/middleware/htdocs/fmw_11_download.html
  • 14. Agenda
    • WebLogic Server Overview
    • Administration Tools
    • Troubleshooting
    • JVM Monitoring / Tuning
  • 15. Configuration Wizard
    • Configuration Wizard
      • GUI/scriptable tool to create and extend WebLogic domains
      • Template based
    • Use the Configuration Wizard shortcut in the Start menu
    • Creates domains in the user_projects/domains directory be default
  • 16. Administrator Console
    • Administration Console
      • Browser-based tool for configuring and monitoring domains, deploying applications, and controlling servers
    • Graphical interface to configure, manage, monitor a domain
    • One Administration Console for each domain
    • The Administration Server in the domain hosts the Admin Console application
    • Open the Admin Console with the following URL:
      • http://host:port/console
      • Typically in dev: http://localhost:7001/console
  • 17. Dashboard
  • 18. WebLogic Scripting Tool (WLST)
    • WebLogic Scripting Tool (WLST)
      • Script or command line tool to do the same thing as the Administration Console and Configuration Wizard
      • Note that we will cover details on WLST in a separate document
    • Scripting tool for administering a domain
      • • Anything you do in Admin console can be done via WLST
      • • Based on Jython, which is based on Python
      • • Great for automating repetitive tasks
      • • Provides a repeatable process for propagating configuration changes across
    • environments
      • • Quickly allows environments to be replicated and migrated
      • • “ Record” feature in Admin console: record actions to a WLST script
      • • Two modes:
      • • Offline: analogous to the Configuration Wizard
      • • Online: analogous to the Administration Console
  • 19. Enterprise Manager - Server Status
  • 20. Console vs. EM
    • Console
      • Wls,
    • EM
      • 跨元件管理
  • 21. EM - Performance Monitoring
  • 22. EM - Log Configuration
  • 23. Agenda
    • WebLogic Server Overview
    • Administration Tools
    • JVM Monitoring / Tuning
    • Troubleshooting
  • 24. JVM
  • 25. 針對 Oracle 客戶的 JVM 建議
  • 26. 32-bit VS. 64-bit
    • 32 bit
      • -d32 (default)
      • For heap size up to 1.8G/3G or so
    • 64 bit
      • -d64,
      • -XX:+/-UseCompressedOops (default after 1.6.0_23)
      • For heap sizes up to 26G / unlimited
    • • 32-bit -> 64-bit migration
      • Higher heap size requirements (around 20%)
      • Throughput impact (up to 20%, without compressed refs)
  • 27. JVM Tools – java, jps, jstat….
  • 28. Hotspot JVM Tools – jvisualvm
  • 29. Jrockit Mission Control
  • 30. JVM Tuning
  • 31.
  • 32.
  • 33.
  • 34. Hotspot JVM Heap Layout
  • 35. Sun HotSpot Heap Layout
  • 36. Before Minor GC
  • 37. After Minor GC
  • 38. Jrockit JVM Heap Layout
  • 39. Nursery collection
  • 40. Calculate Live Data size
  • 41.
  • 42. Initial Heap Configuration
  • 43. Hotspot JVM Heap Layout
  • 44. JVM Heap Tuning
  • 45. Memory Leak
  • 46. Throughput vs. Latency
  • 47. GC Algorithms
  • 48. Application Requirement
  • 49. Sun Hotspot Garbage Collectors in Java SE 6
  • 50. Hotspot jdk heap option summary
  • 51. G1 Collector
  • 52. GC tuning
  • 53. JVM Tools – GC Log
  • 54. Tuning Techniques
  • 55. Tuning Techniques
  • 56. Tuning Techniques:
  • 57. Agenda
    • WebLogic Server Overview
    • Administration Tools
    • JVM Monitoring / Tuning
    • Troubleshooting
  • 58. Troubleshooting:
  • 59. OutOfMemoery Error 1:
  • 60.
  • 61. OutOfMemoery Error 2:
  • 62.
  • 63. OutOfMemoery Error 3:
  • 64.
  • 65. Q&A Q A &
  • 66. 實作練習
  • 67. 設定參數 :Set classpath
  • 68. SOA_SERVER 設定參數 :
  • 69. Java VisualVM - Remote
  • 70. Java VisualVM
  • 71. Jstatd
    • 啟動
      • jstatd -J-Djava.security.policy=jstatd.all.policy
    • 利用 jps 查看
      • jps -l 127.0.0.1