Dear All, I am facing strange issue while consuming REST API in acceptance environment. The rest webservice works absolutely fine in postman and also when application is locally running. When I deploy the application in cloud I get the below error in console. 3:59:51 PMAPPERRORConnector: com.mendix.modules.microflowengine.MicroflowException: Error calling REST service 3:59:51 PMAPPINFOat Dm_Masterdata.ConsumeWS_Employee (CallRest : 'Call REST (GET)') 3:59:51 PMAPPINFOAdvanced stacktrace: 3:59:51 PMAPPINFOat com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:79) 3:59:51 PMAPPINFOCaused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.PrivilegedActionException: org.apache.http.conn.HttpHostConnectException: Connect to xx.xxx.xxx.xx:51503 [/xx.xxx.xxx.xx] failed: Connection refused (Connection refused) 3:59:51 PMAPPINFOat com.mendix.integration.util.PrivilegedUtil$$anonfun$withPrivileged$2.applyOrElse(PrivilegedUtil.scala:17) 3:59:51 PMAPPINFOCaused by: java.security.PrivilegedActionException: null 3:59:51 PMAPPINFOat java.base/java.security.AccessController.doPrivileged(Native Method) Can anybody help me how to solve this issue?Why I am getting connection refused. How Do I establish the connection?
Does the service you are trying to access have any restrictions on it? The error message looks like it is refusing connection from your application in the cloud.
The following link has a list of the IP addresses your application can come from if you are hosting the Mendix Cloud. You may want to ask whoever runs the webservice you are calling to ensure the IP addresses for your location are permitted.