Details
Description
Pentaho Product: Spoon
Version: 8.0
Operating System: Windows
Memory Available/Used: 32/2
Hardware: Lenovo Thinkpad P50
Clustered/No: No
Virtualized?: No
Database for repository: N/A
Database for data: N/A
Browser type and version (If Applicable): N/A
Did you attach logs? Yes
When I use the HTTP Post step and fill in a valid username and password in the HTTP Login and HTTP Password fields, an error is thrown:
2018/04/16 16:43:43 - HTTP Post.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Because of an error, this step can't continue: 2018/04/16 16:43:43 - HTTP Post.0 - Can not result from [http://localhost:8080/pentaho/api/scheduler/triggerNow] 2018/04/16 16:43:43 - HTTP Post.0 - at java.lang.Thread.run (null:-1)
When we observe the call in the catalina access file or look in the chrome web tools, we see a 401 Authorization Error. Yet, when we pass the credentials using the Base 64 authorization header that is generated by a third party tool, this works perfectly. Strangely, if we insert a socks proxy server, like Fiddler, the transformation works.
This seems to be a regression because performing the exact same test in 7.1 works perfectly.
Closer inspection of the code seems to suggest that there might have been some underlying HTTP Client Library changes that might account for this issue, rather than pentaho code changes.
Stack Trace:
2018/04/16 16:43:43 - HTTP Post.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Because of an error, this step can't continue: 2018/04/16 16:43:43 - HTTP Post.0 - Can not result from [http://localhost:8080/pentaho/api/scheduler/triggerNow] 2018/04/16 16:43:43 - HTTP Post.0 - at java.lang.Thread.run (null:-1) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.step.RunThread.run (RunThread.java:62) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.steps.httppost.HTTPPOST.processRow (HTTPPOST.java:468) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.steps.httppost.HTTPPOST.callHTTPPOST (HTTPPOST.java:237) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:108) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:83) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:187) 2018/04/16 16:43:43 - HTTP Post.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : org.pentaho.di.core.exception.KettleException: 2018/04/16 16:43:43 - HTTP Post.0 - Can not result from [http://localhost:8080/pentaho/api/scheduler/triggerNow] 2018/04/16 16:43:43 - HTTP Post.0 - at java.lang.Thread.run (null:-1) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.step.RunThread.run (RunThread.java:62) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.steps.httppost.HTTPPOST.processRow (HTTPPOST.java:468) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.steps.httppost.HTTPPOST.callHTTPPOST (HTTPPOST.java:237) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:108) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:83) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:187) 2018/04/16 16:43:43 - HTTP Post.0 - 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.steps.httppost.HTTPPOST.callHTTPPOST(HTTPPOST.java:327) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.steps.httppost.HTTPPOST.processRow(HTTPPOST.java:468) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62) 2018/04/16 16:43:43 - HTTP Post.0 - at java.lang.Thread.run(Unknown Source) 2018/04/16 16:43:43 - HTTP Post.0 - Caused by: org.apache.http.client.ClientProtocolException 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) 2018/04/16 16:43:43 - HTTP Post.0 - at org.pentaho.di.trans.steps.httppost.HTTPPOST.callHTTPPOST(HTTPPOST.java:237) 2018/04/16 16:43:43 - HTTP Post.0 - ... 3 more 2018/04/16 16:43:43 - HTTP Post.0 - Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity. 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:226) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) 2018/04/16 16:43:43 - HTTP Post.0 - at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) 2018/04/16 16:43:43 - HTTP Post.0 - ... 6 more
Here is the list of tests we performed on both 7.1 and 8.0. Test details appear in the steps to reproduce section.
Test 1: Passing admin/password using HTTP Login and HTTP Password fields. (Passed 7.1, Failed 8.0)
Test 2: Passing Admin/password using HTTP Login and HTTP Password fields. (Passed 7.1, Failed 8.0)
Test 3: Omitting HTTP Login and HTTP Password fields and passing Authorization only (Basic QWRtaW46cGFzc3dvcmQ= or Basic YWRtaW46cGFzc3dvcmQ=). (Passed 8.0).
Test 4: Passing admin/password using HTTP Login and HTTP Password fields but inserting Fiddler as a Socks Proxy (Passed 8.0)
Test 5: Passing Admin/password using HTTP Login and HTTP Password fields but inserting Fiddler as a Socks Proxy (Passed 8.0)
Test 6: Passing Admin/password using HTTP Login and HTTP Password fields but inserting nginx as a proxy (Failed 8.0)