we faced conflict between 2 plugins and some code we using to deploy applications.
It seems that after installing parametrized-remote-trigger-plugin plugin hpe-application-automation-tools-plugin and some other code stop working with the following error:
Start login to ALM server.Failed login to ALM Server URL: <ALM URL HERE>. Exception: com.hpe.application.automation.tools.common.SSEException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1Empty Results
We've done some research and found that this example code stops working:
It returns empty results from Set-Cookie header.
If we run similar code with separate process on the same server with same java version and everything was ok and we got cookie from Set-Cookie header. But if this code run from jenkins script console - it doesn't work.
Almost the similar code used in hpe-application-automation-tools-plugin to perform authentication and get session cookie, so it stop working to.
Next we found that setting CookieHandeler to null restores all functionality:
Finally we checked installed plugins source code for setting CookieHandler and found it in parametrized-remote-trigger-plugin staring from 3.0.3 version here: https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/093a3d8244a383e815684f7c6bfe5fcaf06c8da7/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/utils/HttpHelper.java#L384
it the static block.
Im not a java programmer, but I guess this block runs just once at startup, and resetting CookieHandeler fixes until restart.