WebLogic Server Overview   Amber Yu 2011.9 Oracle WebLogic Server
Agenda <ul><li>WebLogic Server Overview </li></ul><ul><li>Administration Tools </li></ul><ul><li>JVM Monitoring / Tuning <...
Oracle Weblogic Server 11g
Domain <ul><li>What is it? </li></ul><ul><ul><li>a logically related group of WebLogic Server instances that you manage fr...
Server <ul><li>What is it? </li></ul><ul><ul><li>A configured instance to host applications and resources </li></ul></ul><...
Administration Server <ul><li>What is it? </li></ul><ul><ul><li>Central configuration controller for the entire domain </l...
Managed Server <ul><li>What is it?  </li></ul><ul><ul><li>A running instance that hosts applications and application resou...
Cluster Cluster 1 Cluster 2 Admin Svr <ul><li>A cluster is a group of Managed Servers running simultaneously and working t...
Node Manager
Summary <ul><li>WebLogic Server configuration is segmented by domain </li></ul><ul><ul><li>Each domain represents a config...
WebLogic Server Directory Structure <ul><li>Middleware home  </li></ul><ul><li>WebLogic Server  </li></ul><ul><ul><li>wlse...
WebLogic Domain  Directory  Structure <ul><li>User Projects  </li></ul><ul><ul><li>Domains  </li></ul></ul><ul><li>Root di...
Installation of WebLogic based Products  <ul><li>Start page for downloading the software is:  </li></ul><ul><li>http://www...
Agenda <ul><li>WebLogic Server Overview </li></ul><ul><li>Administration Tools </li></ul><ul><li>Troubleshooting </li></ul...
Configuration Wizard <ul><li>Configuration Wizard </li></ul><ul><ul><li>GUI/scriptable tool to create and extend WebLogic ...
Administrator Console <ul><li>Administration Console </li></ul><ul><ul><li>Browser-based tool for configuring and monitori...
Dashboard
WebLogic Scripting Tool (WLST) <ul><li>WebLogic Scripting Tool (WLST) </li></ul><ul><ul><li>Script or command line tool to...
Enterprise Manager  - Server   Status
Console vs. EM <ul><li>Console </li></ul><ul><ul><li>Wls, </li></ul></ul><ul><li>EM </li></ul><ul><ul><li>跨元件管理 </li></ul>...
EM -  Performance  Monitoring
EM -  Log Configuration
Agenda <ul><li>WebLogic Server Overview </li></ul><ul><li>Administration Tools </li></ul><ul><li>JVM Monitoring / Tuning <...
JVM
針對  Oracle  客戶的  JVM  建議
32-bit VS. 64-bit <ul><li>32 bit  </li></ul><ul><ul><li>-d32 (default)  </li></ul></ul><ul><ul><li>For heap size up to 1.8...
JVM Tools –  java, jps, jstat….
Hotspot JVM Tools –  jvisualvm
Jrockit Mission Control
JVM Tuning
Hotspot JVM Heap Layout
Sun HotSpot Heap Layout
Before Minor GC
After Minor GC
Jrockit JVM Heap Layout
Nursery collection
Calculate Live Data size
Initial Heap Configuration
Hotspot JVM Heap Layout
JVM Heap Tuning
Memory Leak
Throughput vs. Latency
GC Algorithms
Application Requirement
Sun Hotspot Garbage Collectors  in Java SE 6
Hotspot jdk heap option summary
G1 Collector
GC tuning
JVM Tools –  GC Log
Tuning Techniques
Tuning Techniques
Tuning Techniques:
Agenda <ul><li>WebLogic Server Overview </li></ul><ul><li>Administration Tools </li></ul><ul><li>JVM Monitoring / Tuning  ...
Troubleshooting:
OutOfMemoery Error 1:
OutOfMemoery Error 2:
OutOfMemoery Error 3:
Q&A Q A &
實作練習
設定參數 :Set classpath
SOA_SERVER  設定參數 :
Java VisualVM -  Remote
Java VisualVM
Jstatd <ul><li>啟動 </li></ul><ul><ul><li>jstatd -J-Djava.security.policy=jstatd.all.policy </li></ul></ul><ul><li>利用 jps 查看...
Upcoming SlideShare
Loading in...5
×

WLS

2,921

Published on

Published in: Career, Technology
1 Comment
12 Likes
Statistics
Notes
No Downloads
Views
Total Views
2,921
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
12
Embeds 0
No embeds

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&apos;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&apos;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&apos;s configuration state. Just before pending changes to the configuration are activated, the domain&apos;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&apos;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&apos;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 -&gt; admin server -&gt; managed server -&gt; 元件、佈署程式
  • 配置、監控 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 &amp; 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 &amp;quot;file:${java.home}/../lib/tools.jar&amp;quot; {     permission java.security.AllPermission; }; 再次启动 jstatd -J-Djava.security.policy=jstatd.all.policy 利用 jps 查看 jps -l 127.0.0.1
  • WLS

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

    ×