Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-23302

[GSS](7.4.z) CLOUD-3172 - readinessProve / livenessProbe fails with "'ascii' codec can't encode characters" when the locale supports non-ascii characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.4.11.CR1, 7.4.11.GA
    • None
    • OpenShift
    • None
    • Hide

      Specify the following system property. This can output log messages in English. Hence, "failure description" in DMR is also written only in English:

      -Dorg.jboss.logging.locale=en-US
      

      Note that the specified value should be in the BCP 47 format: https://tools.ietf.org/html/bcp47

      Show
      Specify the following system property. This can output log messages in English. Hence, "failure description" in DMR is also written only in English: -Dorg.jboss.logging.locale=en-US Note that the specified value should be in the BCP 47 format: https://tools.ietf.org/html/bcp47
    • Hide

      1. Deploy eap7.4 pod using eap74-basic-s2i template.

      $ oc new-project eap74-demo
      $ oc create -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/templates/eap74-basic-s2i.json
      $ oc create -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/eap74-openjdk8-image-stream.json
      $ oc new-app --template eap74-basic-s2i  -p IMAGE_STREAM_NAMESPACE=eap74-demo -p APPLICATION_NAME=helloworld -p SOURCE_REPOSITORY_URL=https://github.com/jboss-developer/jboss-eap-quickstarts.git -p CONTEXT_DIR=helloworld -p SOURCE_REPOSITORY_REF=openshift -p EAP_IMAGE_NAME=jboss-eap74-openjdk8-openshift:7.4.0 -p EAP_RUNTIME_IMAGE_NAME=jboss-eap74-openjdk8-runtime-openshift:7.4.0
      

      2. Set non-acsii locale to just created DeploymentConfig.

      $ oc set env dc/helloworld JAVA_OPTS_APPEND="-Duser.language=ja -Duser.country=JP -Dfile.encoding=UTF8"
      

      3. Call readinessProbe in the application pod

      $ oc rsh helloworld-2-8tq86
      sh-4.2$ /opt/eap/bin/readinessProbe.sh 
      {
          "probe.eap.dmr.EapProbe": {
              "probe.eap.dmr.ServerStatusTest": "running",
              "probe.eap.dmr.DeploymentTest": {
                  "ROOT.war": "OK"
              },
              "probe.eap.dmr.BootErrorsTest": "No boot errors",
              "probe.eap.dmr.ServerRunningModeTest": "NORMAL"
          },
          "probe.eap.dmr.HealthCheckProbe": {
              "probe.eap.dmr.HealthCheckTest": "Exception executing test: 'ascii' codec can't encode characters in position 13-16: ordinal not in range(128)"
          }
      }
      
      Show
      1. Deploy eap7.4 pod using eap74-basic-s2i template. $ oc new -project eap74-demo $ oc create -f https: //raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/templates/eap74-basic-s2i.json $ oc create -f https: //raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/eap74-openjdk8-image-stream.json $ oc new -app --template eap74-basic-s2i -p IMAGE_STREAM_NAMESPACE=eap74-demo -p APPLICATION_NAME=helloworld -p SOURCE_REPOSITORY_URL=https: //github.com/jboss-developer/jboss-eap-quickstarts.git -p CONTEXT_DIR=helloworld -p SOURCE_REPOSITORY_REF=openshift -p EAP_IMAGE_NAME=jboss-eap74-openjdk8-openshift:7.4.0 -p EAP_RUNTIME_IMAGE_NAME=jboss-eap74-openjdk8-runtime-openshift:7.4.0 2. Set non-acsii locale to just created DeploymentConfig. $ oc set env dc/helloworld JAVA_OPTS_APPEND= "-Duser.language=ja -Duser.country=JP -Dfile.encoding=UTF8" 3. Call readinessProbe in the application pod $ oc rsh helloworld-2-8tq86 sh-4.2$ /opt/eap/bin/readinessProbe.sh { "probe.eap.dmr.EapProbe" : { "probe.eap.dmr.ServerStatusTest" : "running" , "probe.eap.dmr.DeploymentTest" : { "ROOT.war" : "OK" }, "probe.eap.dmr.BootErrorsTest" : "No boot errors" , "probe.eap.dmr.ServerRunningModeTest" : "NORMAL" }, "probe.eap.dmr.HealthCheckProbe" : { "probe.eap.dmr.HealthCheckTest" : "Exception executing test: 'ascii' codec can't encode characters in position 13-16: ordinal not in range(128)" } }

      When EAP 7.4 image running with the locale like ja_JP which outputs non-ascii characters, HealthCheckProbe in readinessProve / livenessProbe will fail with the following messages:

      sh-4.2$ /bin/bash -c /opt/eap/bin/readinessProbe.sh
      {
          "probe.eap.dmr.EapProbe": {
              "probe.eap.dmr.ServerStatusTest": "running",
              "probe.eap.dmr.DeploymentTest": {
                  "ROOT.war": "OK"
              },
              "probe.eap.dmr.BootErrorsTest": "No boot errors",
              "probe.eap.dmr.ServerRunningModeTest": "NORMAL"
          },
          "probe.eap.dmr.HealthCheckProbe": {
              "probe.eap.dmr.HealthCheckTest": "Exception executing test: 'ascii' codec can't encode characters in position 13-16: ordinal not in range(128)"
          }
      

              rhn-engineering-lgao Lin Gao
              rhn-support-nagetsum Norito Agetsuma
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: