WebLogic frequently encountered problems and common configuration in operation and maintenance

Source: Internet
Author: User
Tags to domain

It is hoped that this article will be able to put together the frequently encountered problems and common configurations of weblogic operations.
1. Configure JVM Parameters:
In general, you will see the following startup log information during domain startup, as shown in:

The Red box section of the figure is the command to start WebLogic domain. This includes JVM parameters and classpath information.
"Attention"
Java-client is due to the development model of the previously established domain. Production mode, the Java-server is executed here. As for the difference between-client and-server, let's go to Google, it's not introduced here.
So how do you modify this configuration?
Locate the Setdomainenv.cmd file (setdomainenv.sh is below Linux),
Location: Weblogic11\user_projects\domains\example\bin\setdomainenv.cmd
Modify the Mem_args section of the file, with the relevant parameters configured as follows:
Java code
  1. Call "%wl_home%\common\bin\commenv.cmd"
  2. Set Wls_home=%wl_home%\server
  3. If "%java_vendor%" = ="Sun" (
  4. Set wls_mem_args_64bit=-xms256m-xmx512m
  5. Set wls_mem_args_32bit=-xms256m-xmx512m
  6. ) Else (
  7. Set wls_mem_args_64bit=-xms512m-xmx512m
  8. Set wls_mem_args_32bit=-xms512m-xmx512m
  9. )
  10. Set mem_args_64bit=%wls_mem_args_64bit%
  11. Set mem_args_32bit=%wls_mem_args_32bit%
  12. If "%java_use_64bit%" = ="true" (
  13. Set mem_args=%mem_args_64bit%
  14. ) Else (
  15. Set mem_args=%mem_args_32bit%
  16. )
  17. Set mem_perm_size_64bit=-xx:permsize=128m
  18. Set mem_perm_size_32bit=-xx:permsize=48m
  19. If "%java_use_64bit%" = ="true" (
  20. Set mem_perm_size=%mem_perm_size_64bit%
  21. ) Else (
  22. Set mem_perm_size=%mem_perm_size_32bit%
  23. )
  24. Set mem_max_perm_size_64bit=-xx:maxpermsize=256m
  25. Set mem_max_perm_size_32bit=-xx:maxpermsize=128m
  26. If "%java_use_64bit%" = ="true" (
  27. Set mem_max_perm_size=%mem_max_perm_size_64bit%
  28. ) Else (
  29. Set mem_max_perm_size=%mem_max_perm_size_32bit%
  30. )
  31. If "%java_vendor%" = ="Sun" (
  32. if "%production_mode%" = = "" (
  33. Set mem_dev_args=-xx:compilethreshold=8000%mem_perm_size%
  34. )
  35. )
  36. @REM had to has a separate test here BECAUSE of immediate variable expansion on Windows
  37. If "%java_vendor%" = ="Sun" (
  38. Set mem_args=%mem_args%%mem_dev_args%%mem_max_perm_size%
  39. )
  40. If "%java_vendor%" = ="HP" (
  41. Set mem_args=%mem_args%%mem_max_perm_size%
  42. )
  43. If "%java_vendor%" = ="Apple" (
  44. Set mem_args=%mem_args%%mem_max_perm_size%
  45. )
  46. @REM IF User_mem_args The environment variable is set, use it to override all Mem_args values
  47. If not "%user_mem_args%" = = "" (
  48. Set mem_args=%user_mem_args%
  49. )

The main is to modify the-xms,-xmx,-xx:permsize,-xx:maxpermsize parameters (depending on the specific hardware, JVM load situation to modify). If you need to set other related parameters such as-XSS, you can also add to the last Mem_args.
It is important to note that there is a 32-bit, 64-bit difference. In fact, which configuration to use to view the file:
Weblogic11\wlserver_10.3\common\bin\commenv.cmd
Locate the set Java_use_64bit=false configuration, which represents a non-64-bit environment.

2. Configure the thread queue for WebLogic:
If you have used the classic version of Weblogic8, then you must know that there is a thread queue number configuration. However, in the current version has been canceled, and the use of self-tuning strategy, according to the number of requests to adapt to the number of threads. At the beginning of the allocation of 6 execution threads, where is the specific look?
First log in to domain console, then select "Environment-Server-" adminserver-"Monitoring-" thread ", as shown in:

If I want to adjust the minimum and maximum number of threads, how do I do it? Look down:
View the Startweblogic.cmd startup script file, not under Domain, in the following location:
Weblogic11\user_projects\domains\example\bin\startweblogic.cmd
Locate the following statement for modification, as follows:
Java code
  1. If "%wls_redirect_log%" = = "" (
  2. Echo starting WLS with line:
  3. echo%java_home%\bin\java%java_vm%%mem_args%-dweblogic.threadpool.minpoolsize=80- dweblogic.threadpool.maxpoolsize=80-dweblogic.name=%server_name%-djava.security.policy=%wl_home%\server\ Lib\weblogic.policy%java_options%%proxy_settings%%server_class%
  4. %java_home%\bin\java%java_vm%%mem_args%-dweblogic.threadpool.minpoolsize=80- dweblogic.threadpool.maxpoolsize=80-dweblogic.name=%server_name%-djava.security.policy=%wl_home%\server\ Lib\weblogic.policy%java_options%%proxy_settings%%server_class%
  5. ) Else (
  6. echo redirecting output from WLS window to%wls_redirect_log%
  7. %java_home%\bin\java%java_vm%%mem_args%-dweblogic.threadpool.minpoolsize=80- dweblogic.threadpool.maxpoolsize=80-dweblogic.name=%server_name%-djava.security.policy=%wl_home%\server\   Lib\weblogic.policy%java_options%%proxy_settings%%server_class% >"%wls_redirect_log%" 2>&1
  8. )

Add two parameters after the Java command, namely:
-dweblogic.threadpool.minpoolsize=80
- DWEBLOGIC.THREADPOOL.MAXPOOLSIZE=80
80 represents the number of threads executed, and here is just an example, depending on the situation. If you do not know how to set, do not blindly toss, or let WebLogic himself adjust it. After the
has been modified, restart domain to see the thread condition as shown in:

The total number of threads and the number of active and idle threads have been clearly seen. The
is often viewed in the operations process to see the current server load in real time.

3, log configuration:
By default, the location of the related logs for WebLogic is:
Weblogic11\user_projects\domains\example\servers\adminserver\ Logs
This log folder contains two types of logs
AdminServer log: AdminServer.log (the log printed during WebLogic startup)
HTTP log: Access.log (log for HTTP request)

The log location for the Web app is:
Weblogic11\user_projects\domains\example\logs
This is mainly the Web application inside the output of the log file

If you want to configure the log, how to do it?
Log in to the console of domain, then select "Environment-server-adminserver-" log "as shown (including configuration of two types of logs):


Look at this, Do you think WebLogic console is very good and powerful?

4, port configuration (the first article moved, put here more appropriate):

, select "Environment-" server-"adminserver-" configuration-"general information-" Listening port ", modify 7001 for other ports, and click" Save " button to complete. The
can also be manually modified in Weblogic11\user_projects\domains\example\config\config.xml, locate the server node, and add the Listen-port node as follows:
Java code
  1. <server>
  2. <name>AdminServer</name>
  3. <ssl>
  4. <enabled>false</enabled>
  5. </ssl>
  6. <listen-port>7001</listen-port>
  7. <listen-port-enabled>true</listen-port-enabled>
  8. <listen-address></listen-address>
  9. <java-compiler>javac</java-compiler>
  10. <client-cert-proxy-enabled>false</client-cert-proxy-enabled>
  11. <server-diagnostic-config>
  12. <wldf-diagnostic-volume>Low</wldf-diagnostic-volume>
  13. </server-diagnostic-config>
  14. </server>


5, modify the management account, password:
After domain is created, the Boot.properties file is created in the following location (note: This location differs from version 8 and 9 prior to WebLogic)
Weblogic11\user_projects\domains\example\servers\adminserver\security
First modify the boot.properties as follows:
Java code
    1. Username=weblogic
    2. password=22222222

This is clear text, but after WebLogic starts loading the file, it is automatically processed by encryption.
After the modification is complete, enter in the console:
Security field-"myrealm-" User and group-"weblogic-" password. Enter a new password (you need to be consistent with the configuration in boot.properties, such as 22222222)
(If you need to modify the account, you need to set up the account in the user and group, and give administrator privileges)
After the above two steps are completed, restart the service.

Think of all this for the time being, like some complicated configuration, put it in the back (e.g. SSL, JAAS, SSO, etc.)

WebLogic frequently encountered problems and common configuration in operation and maintenance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.