Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirror introspector log to a rotating file in 'log home' (if configured) #1827

Merged
merged 6 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The following parameters can be provided in the inputs file.
| `initialManagedServerReplicas` | Number of Managed Servers to initially start for the domain. | `2` |
| `javaOptions` | Java options for starting the Administration Server and Managed Servers. A Java option can have references to one or more of the following pre-defined variables to obtain WebLogic domain information: `$(DOMAIN_NAME)`, `$(DOMAIN_HOME)`, `$(ADMIN_NAME)`, `$(ADMIN_PORT)`, and `$(SERVER_NAME)`. If `sslEnabled` is set to `true` and the WebLogic demo certificate is used, add `-Dweblogic.security.SSL.ignoreHostnameVerification=true` to allow the managed servers to connect to the Administration Server while booting up. The WebLogic generated demo certificate in this environment typically contains a host name that is different from the runtime container's host name. | `-Dweblogic.StdoutDebugEnabled=false` |
| `logHomeOnPV` | Specifies whether the log home is stored on the persistent volume. If set to true, then you must specify the `logHome`, `persistentVolumeClaimName`, and `domainPVMountPath` parameters.| `false` |
| `logHome` | The in-pod location for domain log, server logs, server out, Node Manager log, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. This parameter is required if `logHomeOnPV` is true. Otherwise, it is ignored. | `/shared/logs/domain1` |
| `logHome` | The in-pod location for domain log, server logs, server out, Node Manager log, introspector out, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. This parameter is required if `logHomeOnPV` is true. Otherwise, it is ignored. | `/shared/logs/domain1` |
| `managedServerNameBase` | Base string used to generate Managed Server names. | `managed-server` |
| `managedServerPort` | Port number for each Managed Server. | `8001` |
| `managedServerSSLPort` | SSL port number for each Managed Server. | `8002` |
Expand Down Expand Up @@ -210,7 +210,7 @@ spec:
includeServerOutInPodLog: true
# Whether to enable log home
# logHomeEnabled: false
# The in-pod location for domain log, server logs, server out, and Node Manager log files
# The in-pod location for domain log, server logs, server out, introspector out, and Node Manager log files
# logHome: /shared/logs/domain1
# serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY"
# This determines which WebLogic Servers the operator will start up when it discovers this Domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The following parameters can be provided in the inputs file.
| `includeServerOutInPodLog` | Boolean indicating whether to include the server `.out` in the pod's `stdout`. | `true` |
| `initialManagedServerReplicas` | Number of Managed Servers to start initially for the domain. | `2` |
| `javaOptions` | Java options for starting the Administration Server and Managed Servers. A Java option can have references to one or more of the following pre-defined variables to obtain WebLogic domain information: `$(DOMAIN_NAME)`, `$(DOMAIN_HOME)`, `$(ADMIN_NAME)`, `$(ADMIN_PORT)`, and `$(SERVER_NAME)`. | `-Dweblogic.StdoutDebugEnabled=false` |
| `logHome` | The in-pod location for domain log, server logs, server out, Node Manager log, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. | `/shared/logs/domain1` |
| `logHome` | The in-pod location for domain log, server logs, server out, introspector out, Node Manager log, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. | `/shared/logs/domain1` |
| `managedServerNameBase` | Base string used to generate Managed Server names. | `managed-server` |
| `managedServerPort` | Port number for each Managed Server. | `8001` |
| `namespace` | Kubernetes Namespace in which to create the domain. | `default` |
Expand Down Expand Up @@ -178,7 +178,7 @@ spec:
includeServerOutInPodLog: true
# Whether to enable log home
logHomeEnabled: true
# The in-pod name location for domain log, server logs, server out, and Node Manager log files
# The in-pod name location for domain log, server logs, server out, introspector out, and Node Manager log files
logHome: /shared/logs/domain1
# serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY"
# This determines which WebLogic Servers the operator will start up when it discovers this Domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The following parameters can be provided in the inputs file.
| `includeServerOutInPodLog` | Boolean indicating whether to include the server `.out` in the pod's `stdout`. | `true` |
| `initialManagedServerReplicas` | Number of Managed Servers to start initially for the domain. | `2` |
| `javaOptions` | Java options for starting the Administration Server and Managed Servers. A Java option can have references to one or more of the following pre-defined variables to obtain WebLogic domain information: `$(DOMAIN_NAME)`, `$(DOMAIN_HOME)`, `$(ADMIN_NAME)`, `$(ADMIN_PORT)`, and `$(SERVER_NAME)`. | `-Dweblogic.StdoutDebugEnabled=false` |
| `logHome` | The in-pod location for the domain log, server logs, server out, Node Manager log, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. | `/shared/logs/domain1` |
| `logHome` | The in-pod location for the domain log, server logs, server out, Node Manager log, introspector out, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. | `/shared/logs/domain1` |
| `managedServerNameBase` | Base string used to generate Managed Server names. | `managed-server` |
| `managedServerPort` | Port number for each Managed Server. | `8001` |
| `namespace` | Kubernetes Namespace in which to create the domain. | `default` |
Expand Down Expand Up @@ -195,7 +195,7 @@ spec:
includeServerOutInPodLog: true
# Whether to enable log home
logHomeEnabled: true
# The in-pod location for domain log, server logs, server out, and Node Manager log files
# The in-pod location for domain log, server logs, server out, introspector out, and Node Manager log files
logHome: /shared/logs/fmw-domain
# serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY"
# This determines which WebLogic Servers the Operator will start up when it discovers this Domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ Copy the following to a file called `/tmp/mii-sample/mii-initial.yaml` or simila
# Whether to enable overriding your log file location, see also 'logHome'
#logHomeEnabled: false

# The location for domain log, server logs, server out, and Node Manager log files
# The location for domain log, server logs, server out, introspector out, and Node Manager log files
# see also 'logHomeEnabled', 'volumes', and 'volumeMounts'.
#logHome: /shared/logs/sample-domain1

Expand Down Expand Up @@ -548,7 +548,7 @@ Copy the following to a file called `/tmp/mii-sample/mii-initial.yaml` or simila
# Whether to enable overriding your log file location, see also 'logHome'
#logHomeEnabled: false

# The location for domain log, server logs, server out, and Node Manager log files
# The location for domain log, server logs, server out, introspector out, and Node Manager log files
# see also 'logHomeEnabled', 'volumes', and 'volumeMounts'.
#logHome: /shared/logs/sample-domain1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The following parameters can be provided in the inputs file.
| `includeServerOutInPodLog` | Boolean indicating whether to include the server `.out` in the pod's `stdout`. | `true` |
| `initialManagedServerReplicas` | Number of Managed Servers to start initially for the domain. | `2` |
| `javaOptions` | Java options for starting the Administration Server and Managed Servers. A Java option can have references to one or more of the following pre-defined variables to obtain WebLogic domain information: `$(DOMAIN_NAME)`, `$(DOMAIN_HOME)`, `$(ADMIN_NAME)`, `$(ADMIN_PORT)`, and `$(SERVER_NAME)`. | `-Dweblogic.StdoutDebugEnabled=false` |
| `logHome` | The in-pod location for the domain log, server logs, server out, Node Manager log, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. | `/u01/oracle/user_projects/domains/logs/soainfra` |
| `logHome` | The in-pod location for the domain log, server logs, server out, Node Manager log, introspector out, and server HTTP access log files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. | `/u01/oracle/user_projects/domains/logs/soainfra` |
| `managedServerNameBase` | Base string used to generate Managed Server names. | `soa_server` |
| `managedServerPort` | Port number for each Managed Server. | `8001` |
| `namespace` | Kubernetes Namespace in which to create the domain. | `soans` |
Expand Down Expand Up @@ -229,7 +229,7 @@ spec:
# Whether to enable log home
logHomeEnabled: true

# The in-pod location for domain log, server logs, server out, and Node Manager log files
# The in-pod location for domain log, server logs, server out, introspector out, and Node Manager log files
logHome: /u01/oracle/user_projects/domains/logs/soainfra
# An (optional) in-pod location for data storage of default and custom file stores.
# If not specified or the value is either not set or empty (e.g. dataHome: "") then the
Expand Down
4 changes: 2 additions & 2 deletions docs-source/content/userguide/managing-domains/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Be aware of the following important considerations for WebLogic domains running
[WebLogic domain in Docker image protection]({{<relref "/security/domain-security/image-protection#weblogic-domain-in-docker-image-protection">}}).
{{% /notice %}}

* _Log File Locations:_ The operator can automatically override WebLogic domain and server log locations using
configuration overrides. This occurs if the Domain `logHomeEnabled` field is explicitly set to `true`, or if `logHomeEnabled` isn't set
* _Log File Locations:_ The operator can automatically override WebLogic domain, server, and introspector log locations.
This occurs if the Domain `logHomeEnabled` field is explicitly set to `true`, or if `logHomeEnabled` isn't set
and `domainHomeSourceType` is set to `PersistentVolume`. When overriding, the log location will be the location specified by the `logHome` setting.

* _Listen Address Overrides:_ The operator will automatically override all WebLogic domain default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,18 @@ By setting the `FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR` environment variable in t
* Make sure you've followed each step in the [Step-by-step guide](#step-by-step-guide).

* If WebLogic Server instance Pods do not come up at all, then:
* Examine your Domain resource status: `kubectl -n MYDOMAINNAMESPACE describe domain MYDOMAIN`
* In the domain's namespace, see if you can find a job named `DOMAIN_UID-introspect-domain-job` and a corresponding pod named something like `DOMAIN_UID-introspect-domain-job-xxxx`. If so, examine:
* `kubectl -n MYDOMAINNAMESPACE describe job INTROSPECTJOBNAME`
* `kubectl -n MYDOMAINNAMESPACE logs INTROSPECTPODNAME`
* Check your operator log for Warning/Error/Severe messages.
* `kubectl -n MYOPERATORNAMESPACE logs OPERATORPODNAME`

{{% notice tip %}}
The introspector log is mirrored to the Domain resource `spec.logHome` directory
when `spec.logHome` is configured and `spec.logHomeEnabled` is true.
{{% /notice %}}

* If WebLogic Server instance Pods do start, then:
* Search your Administration Server Pod's `kubectl log` for the keyword `situational`, for example `kubectl logs MYADMINPOD | grep -i situational`.
* The only WebLogic Server log lines that match should look something like:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ The introspection will be periodically retried and then will eventually timeout

Please review the details for diagnosing introspection failures related to [configuration overrides]({{<relref "/userguide/managing-domains/configoverrides/_index.md#debugging">}}) or [Model in Image domain home generation]({{<relref "/userguide/managing-domains/model-in-image/debugging.md">}}).

{{% notice tip %}}
The introspector log is mirrored to the Domain resource `spec.logHome` directory
when `spec.logHome` is configured and `spec.logHomeEnabled` is true.
{{% /notice %}}

### Introspection use cases

#### Adding clusters or Managed Servers to the WebLogic domain configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Elements related to domain identification, container image, and domain home:
Elements related to logging:

* `includeServerOutInPodLog`: Specifies whether the server .out file will be included in the Pod's log. Defaults to true.
* `logHome`: The directory in a server's container in which to store the domain, Node Manager, server logs, server *.out, and optionally HTTP access log files if `httpAccessLogInLogHome` is true. Ignored if `logHomeEnabled` is false.
* `logHome`: The directory in a server's container in which to store the domain, Node Manager, server logs, server *.out, introspector .out, and optionally HTTP access log files if `httpAccessLogInLogHome` is true. Ignored if `logHomeEnabled` is false.
* `logHomeEnabled`: Specifies whether the log home folder is enabled. Defaults to true if `domainHomeSourceType` is PersistentVolume; false, otherwise.
* `httpAccessLogInLogHome`: Specifies whether the server HTTP access log files will be written to the same directory specified in `logHome`. Otherwise, server HTTP access log files will be written to the directory configured in the WebLogic domain configuration. Defaults to true.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ For example, assuming your domain UID is `sample-domain1` and your domain namesp
1. WLSDPLY-05007: Model file /u01/wdt/models/model1.yaml,/weblogic-operator/wdt-config-map/..2020_03_19_15_43_05.993607882/datasource.yaml contains an unrecognized section: TYPOresources. The recognized sections are domainInfo, topology, resources, appDeployments, kubernetes
```

{{% notice tip %}}
The introspector log is mirrored to the Domain resource `spec.logHome` directory
when `spec.logHome` is configured and `spec.logHomeEnabled` is true.
{{% /notice %}}

{{% notice tip %}}
If a model file error references a model file in your `spec.configuration.model.configMap`, then you can correct the error by redeploying the ConfigMap with a corrected model file and then initiating a domain restart or roll. Similarly, if a model file error references a model file in your model image, then you can correct the error by deploying a corrected image, modifying your Domain YAML file to reference the new image, and then initiating a domain restart or roll.
{{% /notice %}}
Expand Down
2 changes: 1 addition & 1 deletion docs/domains/Domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
"$ref": "#/definitions/AdminServer"
},
"logHome": {
"description": "The directory in a server\u0027s container in which to store the domain, Node Manager, server logs, server *.out, and optionally HTTP access log files if `httpAccessLogInLogHome` is true. Ignored if `logHomeEnabled` is false.",
"description": "The directory in a server\u0027s container in which to store the domain, Node Manager, server logs, server *.out, introspector .out, and optionally HTTP access log files if `httpAccessLogInLogHome` is true. Ignored if `logHomeEnabled` is false.",
"type": "string"
},
"includeServerOutInPodLog": {
Expand Down
2 changes: 1 addition & 1 deletion docs/domains/Domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The specification of the operation of the WebLogic domain. Required.
| `imagePullSecrets` | array of [Local Object Reference](k8s1.13.5.md#local-object-reference) | A list of image pull Secrets for the WebLogic container image. |
| `includeServerOutInPodLog` | Boolean | Specifies whether the server .out file will be included in the Pod's log. Defaults to true. |
| `introspectVersion` | string | Changes to this field cause the operator to repeat its introspection of the WebLogic domain configuration. Repeating introspection is required for the operator to recognize changes to the domain configuration, such as adding a new WebLogic cluster or Managed Server instance, to regenerate configuration overrides, or to regenerate the WebLogic domain home when the `domainHomeSourceType` is FromModel. Introspection occurs automatically, without requiring change to this field, when servers are first started or restarted after a full domain shut down. For the FromModel `domainHomeSourceType`, introspection also occurs when a running server must be restarted because of changes to any of the fields listed here: https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/domain-lifecycle/startup/#properties-that-cause-servers-to-be-restarted. See also `domains.spec.configuration.overridesConfigurationStrategy`. |
| `logHome` | string | The directory in a server's container in which to store the domain, Node Manager, server logs, server *.out, and optionally HTTP access log files if `httpAccessLogInLogHome` is true. Ignored if `logHomeEnabled` is false. |
| `logHome` | string | The directory in a server's container in which to store the domain, Node Manager, server logs, server *.out, introspector .out, and optionally HTTP access log files if `httpAccessLogInLogHome` is true. Ignored if `logHomeEnabled` is false. |
| `logHomeEnabled` | Boolean | Specifies whether the log home folder is enabled. Defaults to true if `domainHomeSourceType` is PersistentVolume; false, otherwise. |
| `managedServers` | array of [Managed Server](#managed-server) | Lifecycle options for individual Managed Servers, including Java options, environment variables, additional Pod content, and the ability to explicitly start, stop, or restart a named server instance. The `serverName` field of each entry must match a Managed Server that already exists in the WebLogic domain configuration or that matches a dynamic cluster member based on the server template. |
| `maxClusterConcurrentStartup` | number | The maximum number of cluster member Managed Server instances that the operator will start in parallel for a given cluster, if `maxConcurrentStartup` is not specified for a specific cluster under the `clusters` field. A value of 0 means there is no configured limit. Defaults to 0. |
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/crd/domain-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5488,9 +5488,9 @@ spec:
logHome:
type: string
description: The directory in a server's container in which to store
the domain, Node Manager, server logs, server *.out, and optionally
HTTP access log files if `httpAccessLogInLogHome` is true. Ignored
if `logHomeEnabled` is false.
the domain, Node Manager, server logs, server *.out, introspector
.out, and optionally HTTP access log files if `httpAccessLogInLogHome`
is true. Ignored if `logHomeEnabled` is false.
includeServerOutInPodLog:
type: boolean
description: Specifies whether the server .out file will be included
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/crd/domain-v1beta1-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5377,9 +5377,9 @@ spec:
logHome:
type: string
description: The directory in a server's container in which to store
the domain, Node Manager, server logs, server *.out, and optionally
HTTP access log files if `httpAccessLogInLogHome` is true. Ignored
if `logHomeEnabled` is false.
the domain, Node Manager, server logs, server *.out, introspector
.out, and optionally HTTP access log files if `httpAccessLogInLogHome`
is true. Ignored if `logHomeEnabled` is false.
includeServerOutInPodLog:
type: boolean
description: Specifies whether the server .out file will be included
Expand Down
Loading