I have cloned the above repo and did ‘mvn clean package’ to build the jar file, built the docker image by extending the base image:
FROM camunda/connectors:0.22.1
COPY target/openweather-api-0.1.0-SNAPSHOT.jar /opt/app/
specified the env.txt file by including the zeebe client id, cluster id, as well as api key
The part where I am stuck at is when I try to run my docker image using:
docker run --rm --name=OpenWeatherConnector -v $PWD/target/openweather-api-0.1.0-SNAPSHOT.jar:/opt/app/connector.jar --env-file env.txt camunda/connectors:0.22.0
I get an error in my container saying:
Caused by: org.apache.hc.client5.http.HttpHostConnectException: Connect to http://localhost:8081 [localhost/127.0.0.1] failed: Connection refused
Basically not able to establish connection with Operate, I tried for self managed environment as well, but still the same issue. I am not sure where I am going wrong,
I am interested in knowing the complete steps for my connector application to run in my connector runtime. Thanks
Imported all the above Id’s from my cluster created in Camunda
Other than this i also tried for self managed environment (It would be great if it works for this) where the env was as follows:
Thanks for the response @jonathan.lukas, I just tried running both the connectors in the same network by using bridge method, still it is causing the same issue of
2023-08-24T12:24:28.335Z WARN 1 --- [ main] s.c.c.OperateClientProdAutoConfiguration : An attempt to connect to Operate failed: io.camunda.operate.exception.OperateException: org.apache.hc.client5.http.HttpHostConnectException: Connect to http://localhost:8081 [localhost/127.0
If in case I can get an overall idea of how to run a connector for a self managed environment, it would be great. Thanks
localhost will not take you anywhere here. You will still require to use the dedicated IP address of the other container as described in the forum post.