IBM Z and LinuxONE - IBM Z

IBM Z

The enterprise platform for mission-critical applications brings next-level data privacy, security, and resiliency to your hybrid multicloud.

 View Only

How to fix $HASP1523 Unable to connect to z/OSMF server after installing Java8 SR6 FP3

By YE TIAN posted Wed August 18, 2021 10:55 PM

  

The Problem

Some users reported that their JES2EDS function stopped working after upgrading to Java8 SR6 FP30. This is because JES2EDS was using TLS1.0 protocol to communicate with z/OSMF. After upgrading Java8 SR6 FP30, TLS1.0 was disabled by default for security reasons. You can reference the IBM Java announcement here for this change
https://www.ibm.com/docs/en/sdk-java-technology/8?topic=wn-service-refresh-6#security_whatsnew_sr6__fp30
Websphere Liberty also releases a technote on this change
https://www.ibm.com/support/pages/node/6462659
This article will guide you through 2 different ways to fix or to workaround the problem.

Precheck

If you are not seeing any connection issues after upgrading Java8 SR6 FP30, no action is needed.
If your JES2EDS fails to connect to z/OSMF after Java upgrade. You can check the following symptoms in your system.

  • In SYSLOG, “HASP1529 106 0420 Socket closed by remote partner” is reported by JES2. Following another message “$HASP1523 Unable to connect to z/OSMF server.
IEF196I IEF237I B120 ALLOCATED TO SYS00019
IEF196I IEF285I TCPIP.PEV048.TCPIP.DATA KEPT
IEF196I IEF285I VOL SER NOS= PEVTCP.
IEF196I IGD103I SMS UNIX FILE ALLOCATED TO DDNAME SYS00026
IEF196I IGD104I UNIX FILE WAS RETAINED, DDNAME IS (SYS00026)
IEF196I FILENAME IS (/etc/ipnodes)
$HASP1529 106 0420 Socket closed by remote partner
$HASP1534 z/OSMF server URI https://host:443/zosmf
$HASP1535 Current message is in email queue $EDSQ004 at offset 0000 672
in EMQT 000000015001
*$HASP1523 Unable to connect to z/OSMF server.


  • In z/OSMF Started Task JOBLOG(By default, IZUSVR1), locate the CWWKO0801E error.
ÝERROR ¨ CWWKO0801E: Unable to initialize SSL connection. Unauthorized access was denied or security settings have expired. Exception is javax.net.ssl.SSLHandshakeException: Client requested protocol TLSv1 is not enabled or supported in server context

Recommended Fix

It’s recommended to use TLS 1.2 instead of TLS 1.0 in SystemSSL for system default. To enable TLS 1.2 by default, do the following.
  • 1. Create a parmlib member, for example, CEEPRMAT, edit and add an environment variable of GSK_PROTOCOL_TLSV1_2=ON into CEEDOPT as the below example shows.
  • 2. Issue SET CEE=AT
File Edit Edit_Settings Menu Utilities Compilers Test Help
------------------------------------------------------------------------------
EDIT CIMSSRE.R25ONLY.PARMLIB(CEEPRMAT) - 01.00 Columns 00001 00072
****** ***************************** Top of Data ******************************
==MSG> -Warning- The UNDO command is not available until you change
==MSG> your edit profile using the command RECOVERY ON.
000001 CEEDOPT(ENVAR("GSK_PROTOCOL_TLSV1_2=ON") )
****** **************************** Bottom of Data ****************************



Alternative Fix

Enabling TLS 1.2 for system default may affect other zOS components, though it’s more secure. For any reason if you don’t want to move to TLS 1.2, you can re-enable TLS 1.0 for z/OSMF by doing the following.

Disclaimer:
Restore TLS1.0 and TLS1.1 may put your z/OSMF server in security risk, you may take your own risk by doing so.

In order to make JES2 EDS work normally, you need to enable TLSv1 back, following steps are one way to enable it.

Steps to re-enable TLS 1.0

  • 1. Locate the file - {JAVA_HOME}/lib/security/java.security, by default JAVA_HOME is at /usr/lpp/java
  • 2. Locate the line for the keyword jdk.tls.disabledAlgorithms property, copy the whole line for later use
………
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, DH keySize < 1024, DESede, \ EC keySize < 224, 3DES_EDE_CBC, anon, NULL, DES_CBC
………

  • 3. Locate the file at z/OSMF ${ROOT} /defaults/servers/zosmfServer/jvm.security.override.properties, by default, the ROOT dir is /usr/lpp/zosmf. Make a copy of the file. The copy can be placed at any location. Here we use /etc/zosmf/jvm.security.override.properties for instance.
  • 4. Edit the copy file at /etc/zosmf/jvm.security.override.properties. Add in a new line in the file, paste the jdk.tls.disabledAlgorithms property and remove the TLSv1, TLSv1.1 keywords, so that z/OSMF be able to use these disabledAlgorithms in Java8 SR6 FP30.
security.provider.1=com.ibm.crypto.ibmjcehybrid.provider.IBMJCEHYBRID
security.provider.2=com.ibm.crypto.hdwrCCA.provider.IBMJCECCA
security.provider.3=com.ibm.jsse2.IBMJSSEProvider2
security.provider.4=com.ibm.crypto.provider.IBMJCE
security.provider.5=com.ibm.security.jgss.IBMJGSSProvider
security.provider.6=com.ibm.security.cert.IBMCertPath
security.provider.7=com.ibm.security.sasl.IBMSASL
security.provider.8=com.ibm.xml.crypto.IBMXMLCryptoProvider
security.provider.9=com.ibm.xml.enc.IBMXMLEncProvider
security.provider.10=com.ibm.security.jgss.mech.spnego.IBMSPNEGO
security.provider.11=sun.security.provider.Sun
jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, DESede, \ EC keySize < 224, 3DES_EDE_CBC, anon, NULL, DES_CBC

Here the sample commands issued in OMVS for your reference.
# cd /usr/lpp/zosmf/defaults/servers/zosmfServer/
# cp jvm.security.override.properties /etc/zosmf
# chmod 777 /etc/zosmf/jvm.security.override.properties
# oedit /etc/zosmf/jvm.security.override.properties

  • 5. Create a z/OSMF override file to make z/OSMF pick up the jvm.security.override.properties you just created. Here are the steps
    • a. Locate the override file at ${USERDIR}/configuration/local_override.cfg. By default, the USERDIR is /global/zosmf/. If there isn’t a local_override.cfg file, you can create a new empty file.
    • b. Make sure z/OSMF server ID have read access to the file.
    • c. Edit the local_override.cfg file and add a line of
JVM_OPTIONS='-Djava.security.properties=/etc/zosmf/jvm.security.override.properties'
    • d. Save and close the file
Here are the sample commands used in Step 5
# touch /global/zosmf/ configuration/local_override.cfg
# chmod 777 local_override.cfg
# oedit local_override.cfg
Then add in a line of :
JVM_OPTIONS='-Djava.security.properties=/etc/zosmf/jvm.security.override.properties'

  • 6. Restart your z/OSMF. JES2EDS should be able to communicate with z/OSMF using TLS1.0.

Disclaimer:
All the recommended solutions described above are provided for your reference only and they are not guaranteed by IBM to solve your problems.
0 comments
15 views

Permalink