Search code examples
ibm-cloudbusiness-rules

Failed to connect to the Rule Execution Server instance for the Business Rules service on Bluemix


I created a “Rule Execution Server configuration” in the Rule Designer for the Business Rules instance on Bluemix, but I see the following error when providing the credentials from the Connection Settings tab:

Failed to connect to the Rule Execution Server instance at 'https://brsv2-xxxxxxxx.ng.bluemix.net/res'. Please check that a server is running at this address. HTTP error when contacting "/res/repositoryService", HTTP status 400: Bad Request


Solution

  • If this issue occurs, I found the following configurations to be of use:

    • Configure the firewall to allow access.

    • Configure the Eclipse network configuration ) Window > Preferences > General > Network configuration)

    • Obtain the server certificate from the web browser. For details on how to export SSL certificate, see the vendor's documentation for each browser. For example, when accessing the Rule Execution Server from Internet Explorer, a Security Alert dialog box is displayed. Click View Certificate > Details tab > Copy to file, and then follow the steps in the Export wizard. This exports the certificate to a .cer file (DER encoded binary).

    • Import the server certificate to the JVM truststore for the Eclipse instance on which the Rule Designer plug-in is installed, using the keytool -import command. In the following example, JAVA_HOME points to the Eclipse JVM that you use to launch Eclipse (Rule Designer):

    JAVA_HOME/jdk/bin/keytool.exe -import -file [PATH TO THE SERVER CERTIFICATE] -alias [CERTIFICATE ALIAS] -keystore JAVA_HOME/jdk/jre/lib/security/cacerts

    • Verify that the key is added correctly using the keytool -list command. See the Java keytool documentation for details.

    • Set the following Java system property for Eclipse (using -vmargs) to allow HTTPS/SSL connections with non-trusted certificates:

    -Dilog.rules.res.allowSelfSignedCertificate=true