Skip to content

Commit 26aeef7

Browse files
authored
Merge pull request #896 from oracle/owls-71579
OWLS-71579 - NPE in admin server log
2 parents c144750 + cbd792c commit 26aeef7

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

kubernetes/samples/scripts/common/utility.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,10 @@ function getKubernetesClusterIP {
207207
local SVR_ADDR=`eval ${SVR_ADDR_CMD}`
208208

209209
# Server address is expected to be of the form http://address:port. Delimit
210-
# string on the colon to obtain the address. Leave the "//" on the resulting string.
210+
# string on the colon to obtain the address.
211211
local array=(${SVR_ADDR//:/ })
212-
K8S_IP="${array[1]}"
212+
K8S_IP="${array[1]/\/\//}"
213+
213214
}
214215

215216
#
@@ -245,6 +246,11 @@ function createFiles {
245246
if [ "${exposeAdminT3Channel}" = true ]; then
246247
exposeAdminT3ChannelPrefix="${enabledPrefix}"
247248
exposeAnyChannelPrefix="${enabledPrefix}"
249+
# set t3PublicAddress if not set
250+
if [ -z "${t3PublicAddress}" ]; then
251+
getKubernetesClusterIP
252+
t3PublicAddress="${K8S_IP}"
253+
fi
248254
else
249255
exposeAdminT3ChannelPrefix="${disabledPrefix}"
250256
fi

kubernetes/samples/scripts/common/validate.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ function validateCommonInputs {
342342
clusterName \
343343
managedServerNameBase \
344344
namespace \
345-
t3PublicAddress \
346345
includeServerOutInPodLog \
347346
version
348347

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ The following parameters can be provided in the inputs file.
129129
| `productionModeEnabled` | Boolean indicating if production mode is enabled for the domain. | `true` |
130130
| `serverStartPolicy` | Determines which WebLogic Servers will be started up. Legal values are `NEVER`, `IF_NEEDED`, `ADMIN_ONLY`. | `IF_NEEDED` |
131131
| `t3ChannelPort` | Port for the T3 channel of the NetworkAccessPoint. | `30012` |
132-
| `t3PublicAddress` | Public address for the T3 channel. This should be set to the public address of the Kubernetes cluster. This would normally be a load balancer address. <p/>For development environments only: In a single server (all-in-one) Kubernetes deployment, this may be set to the address of the master, or at the very least, it must be set to the address of one of the worker nodes. | `kubernetes` |
132+
| `t3PublicAddress` | Public address for the T3 channel. This should be set to the public address of the Kubernetes cluster. This would normally be a load balancer address. <p/>For development environments only: In a single server (all-in-one) Kubernetes deployment, this may be set to the address of the master, or at the very least, it must be set to the address of one of the worker nodes. | If not provided, the script will attempt to set it to the IP address of the kubernetes cluster |
133133
| `weblogicCredentialsSecretName` | Name of the Kubernetes secret for the Administration Server's user name and password. | `domain1-weblogic-credentials` |
134134

135135
Note that the names of the Kubernetes resources in the generated YAML files may be formed with the value of some of the properties specified in the `create-inputs.yaml` file. Those properties include the `adminServerName`, `clusterName` and `managedServerNameBase`. If those values contain any characters that are invalid in a Kubernetes service name, those characters are converted to valid values in the generated YAML files. For example, an uppercase letter is converted to a lowercase letter and an underscore `("_")` is converted to a hyphen `("-")`.

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ t3ChannelPort: 30012
9292
# kubernetes server address, which you can get by running "kubectl cluster-info". If this
9393
# value is not set to that address, WLST will not be able to connect from outside the
9494
# kubernetes cluster.
95-
t3PublicAddress: kubernetes
95+
#t3PublicAddress:
9696

9797
# Boolean to indicate if the channel should be exposed as a service
9898
exposeAdminT3Channel: false

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ function printSummary {
219219
echo "Domain ${domainName} was created and will be started by the WebLogic Kubernetes Operator"
220220
echo ""
221221
if [ "${exposeAdminNodePort}" = true ]; then
222-
echo "Administration console access is available at http:${K8S_IP}:${adminNodePort}/console"
222+
echo "Administration console access is available at http://${K8S_IP}:${adminNodePort}/console"
223223
fi
224224
if [ "${exposeAdminT3Channel}" = true ]; then
225-
echo "T3 access is available at t3:${K8S_IP}:${t3ChannelPort}"
225+
echo "T3 access is available at t3://${K8S_IP}:${t3ChannelPort}"
226226
fi
227227
echo "The following files were generated:"
228228
echo " ${domainOutputDir}/create-domain-inputs.yaml"

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The following parameters can be provided in the inputs file.
9696
| `productionModeEnabled` | Boolean indicating if production mode is enabled for the domain. | `true` |
9797
| `serverStartPolicy` | Determines which WebLogic Servers will be started up. Legal values are `NEVER`, `IF_NEEDED`, `ADMIN_ONLY`. | `IF_NEEDED` |
9898
| `t3ChannelPort` | Port for the T3 channel of the NetworkAccessPoint. | `30012` |
99-
| `t3PublicAddress` | Public address for the T3 channel. This should be set to the public address of the Kubernetes cluster. This would normally be a load balancer address. <p/>For development environments only: In a single server (all-in-one) Kubernetes deployment, this may be set to the address of the master, or at the very least, it must be set to the address of one of the worker nodes. | `kubernetes` |
99+
| `t3PublicAddress` | Public address for the T3 channel. This should be set to the public address of the Kubernetes cluster. This would normally be a load balancer address. <p/>For development environments only: In a single server (all-in-one) Kubernetes deployment, this may be set to the address of the master, or at the very least, it must be set to the address of one of the worker nodes. | If not provided, the script will attempt to set it to the IP address of the kubernetes cluster |
100100
| `weblogicCredentialsSecretName` | Name of the Kubernetes secret for the Administration Server's username and password. If not specified, the value is derived from the `domainUID` as `<domainUID>-weblogic-credentials`. | `domain1-weblogic-credentials` |
101101
| `weblogicImagePullSecretName` | Name of the Kubernetes secret for the Docker Store, used to pull the WebLogic Server image. | `docker-store-secret` |
102102

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain-inputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ t3ChannelPort: 30012
7676
# kubernetes server address, which you can get by running "kubectl cluster-info". If this
7777
# value is not set to that address, WLST will not be able to connect from outside the
7878
# kubernetes cluster.
79-
t3PublicAddress: kubernetes
79+
#t3PublicAddress:
8080

8181
# Boolean to indicate if the channel should be exposed as a service
8282
exposeAdminT3Channel: false

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ function printSummary {
243243
echo "Domain ${domainName} was created and will be started by the WebLogic Kubernetes Operator"
244244
echo ""
245245
if [ "${exposeAdminNodePort}" = true ]; then
246-
echo "Administration console access is available at http:${K8S_IP}:${adminNodePort}/console"
246+
echo "Administration console access is available at http://${K8S_IP}:${adminNodePort}/console"
247247
fi
248248
if [ "${exposeAdminT3Channel}" = true ]; then
249-
echo "T3 access is available at t3:${K8S_IP}:${t3ChannelPort}"
249+
echo "T3 access is available at t3://${K8S_IP}:${t3ChannelPort}"
250250
fi
251251
echo "The following files were generated:"
252252
echo " ${domainOutputDir}/create-domain-inputs.yaml"

0 commit comments

Comments
 (0)