I am making HTTP Post requests from a pojo java application on the IBM I-series server.
HttpResponse response = httpclient.execute(httppost);
I am getting this error back after about 3 seconds.
java.net.SocketException: A system call received a parameter that is not
valid. (Read failed)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:127)
at java.net.SocketInputStream.read(SocketInputStream.java:182)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at com.ibm.jsse2.b.a(b.java:192)
at com.ibm.jsse2.b.a(b.java:168)
at com.ibm.jsse2.at.a(at.java:358)
at com.ibm.jsse2.at.i(at.java:785)
at com.ibm.jsse2.at.a(at.java:68)
at com.ibm.jsse2.at.startHandshake(at.java:520)
at
org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredS
ocket(SSLConnectionSocketFactory.java:394)
at
org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(
SSLConnectionSocketFactory.java:353)
at
org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.conn
ect(DefaultHttpClientConnectionOperator.java:134)
at
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.conne
ct(PoolingHttpClientConnectionManager.java:353)
at
org.apache.http.impl.execchain.MainClientExec.establishRoute(MainC
lientExec.java:380)
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientEx
ec.java:236)
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.j
I have made sure we are using TLS 1.2 and java version is 1.8
Client side - code snippets -
CloseableHttpClient httpclient =
HttpClientBuilder.create().setDefaultRequestConfig(config).build();
HttpPost httppost = new HttpPost("https://lb1.cardknox.com/gateway");
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, null, null);
SSLContext.setDefault(sslContext);
HttpResponse response = httpclient.execute(httppost);
Note: It works fine when I use it from my eclipse workbench - I only have the issue when I run this on the IBM server.
Java runtime details on the IBM server
java version "1.8.0"
Java(TM) SE Runtime Environment (build pap3280sr4fp10-20170727_01(SR4 FP10))
IBM J9 VM (build 2.8, JRE 1.8.0 OS/400 ppc-32 jvmap3280sr4fp10-20170727_01 (JIT enabled, AOT enabled)
J9VM - R28_20170722_0201_B357405
JIT - tr.r14.java_20170722_357405
GC - R28_20170722_0201_B357405
J9CL - 20170722_357405)
JCL - 20170726_01 based on Oracle jdk8u144-b01