I am having issue in getting REST connector working locally. I believe it is most likely due to firewall restriction all our outgoing network call need to go through proxy server. So i was trying to configure proxy in connector properties but the connection still fails,
connectors-application.properties
[http.proxyHost=gate.proxy.com:8080
http.proxyPort=8080
https.proxyHost=gate.proxy.com
https.proxyPort=8080
http.nonProxyHosts=localhost|127.0.0.1]
Also tried with JVM options,
JAVA_HOME=C:\JDK\jdk-21.0.2+13
JAVA_OPTS=-Dhttp.proxyHost=gate.proxy.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=gate.proxy.com -Dhttps.proxyPort=8080 -Dhttp.noProxyHosts=localhost,127.0.0.1
2024-11-21T12:18:42.690+01:00 INFO 3504 --- [pool-3-thread-1] i.c.c.r.c.outbound.ConnectorJobHandler : Received job: 2251799813730614 for tenant: <default>
2024-11-21T12:19:03.901+01:00 ERROR 3504 --- [pool-3-thread-1] i.c.c.r.c.outbound.ConnectorJobHandler : Exception while processing job: 2251799813730614 for tenant: <default>
io.camunda.connector.api.error.ConnectorException: An error occurred while executing the request, or the connection was aborted
at io.camunda.connector.http.base.client.apache.CustomApacheHttpClient.execute(CustomApacheHttpClient.java:119)
at io.camunda.connector.http.base.HttpService.executeRequest(HttpService.java:61)
at io.camunda.connector.http.base.HttpService.executeConnectorRequest(HttpService.java:56)
at io.camunda.connector.http.rest.HttpJsonFunction.execute(HttpJsonFunction.java:74)
at io.camunda.connector.runtime.core.outbound.ConnectorJobHandler.handle(ConnectorJobHandler.java:184)
at io.camunda.connector.runtime.outbound.jobhandling.SpringConnectorJobHandler.lambda$handle$0(SpringConnectorJobHandler.java:75)
at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:141)
at io.camunda.zeebe.spring.client.actuator.MicrometerMetricsRecorder.executeWithTimer(MicrometerMetricsRecorder.java:50)
at io.camunda.connector.runtime.outbound.jobhandling.SpringConnectorJobHandler.handle(SpringConnectorJobHandler.java:66)
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.executeJob(JobRunnableFactoryImpl.java:45)
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.lambda$create$0(JobRunnableFactoryImpl.java:40)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.apache.hc.client5.http.HttpHostConnectException: Connect to https://api.weather.gov:443 [api.weather.gov/23.78.216.17] failed: Connection timed out: getsockopt
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:751)
at org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.lambda$connectSocket$0(SSLConnectionSocketFactory.java:281)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
at org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:280)
at org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:240)
at org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:189)
at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:450)
at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:162)
at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:172)
at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:142)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:113)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:152)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:245)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:188)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:162)
at io.camunda.connector.http.base.client.apache.CustomApacheHttpClient.execute(CustomApacheHttpClient.java:107)
... 16 common frames omitted