HTTPGetStream operator issue from streams 4.2.2
kanduibm opened this issue · 2 comments
I am not sure what has changed in. The HTTPGetStream operator was working fine in previous 4.2.0 streams version toolkit but failed to process any data with the toolkit in streams 4.2.2
I am simply trying to process the xml output from this output but got the following error related with SSL. This worked fine on 4.2.0.
Thanks
https://streamsapp-kandu-admin-dev.stage1.mybluemix.net/rest/hello/48hours_xml
10 Aug 2017 11:26:45.380 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:com.ibm.streamsx.inet.http.HTTPStreamReader.onReadException:-1] - Processing Read Exception
10 Aug 2017 11:26:45.380 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
10 Aug 2017 11:26:45.380 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - com.ibm.jsse2.ae.getPeerCertificates(ae.java:137)
10 Aug 2017 11:26:45.380 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
10 Aug 2017 11:26:45.381 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
10 Aug 2017 11:26:45.381 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
10 Aug 2017 11:26:45.381 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
10 Aug 2017 11:26:45.381 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
10 Aug 2017 11:26:45.381 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
10 Aug 2017 11:26:45.381 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
10 Aug 2017 11:26:45.382 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
10 Aug 2017 11:26:45.382 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
10 Aug 2017 11:26:45.382 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - com.ibm.streamsx.inet.http.HTTPRequest.sendRequest(HTTPRequest.java:156)
10 Aug 2017 11:26:45.382 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - com.ibm.streamsx.inet.http.HTTPStreamReaderObj.newConnection(HTTPStreamReaderObj.java:78)
10 Aug 2017 11:26:45.382 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - com.ibm.streamsx.inet.http.HTTPStreamReaderObj.sendRequest(HTTPStreamReaderObj.java:90)
10 Aug 2017 11:26:45.382 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - com.ibm.streamsx.inet.http.HTTPStreamReaderObj.run(HTTPStreamReaderObj.java:125)
10 Aug 2017 11:26:45.382 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - java.lang.Thread.run(Thread.java:785)
10 Aug 2017 11:26:45.383 [369] ERROR #splapptrc,J[0],P[0],HTTPGetStreamed M[?:?:0] - com.ibm.streams.operator.internal.runtime.OperatorThreadFactory$2.run(OperatorThreadFactory.java:137)
Seems to be a certificate issue: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
Java HTTP request fails with “javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated” ... The reason the error is occurring is because the SSL certificate of the target you're connecting to isn't considered valid by your Java instance's keystore.
add parameter:
acceptAllCertificates: true to the operator