PostgreSQL Connector Docker trying to connect to wrong Operate URL and Port

Using the following configuration to start the PostgreSQL Connector but the log shows it failing to connect to Operate, and is using a different URL:Port from the container configurations.

docker run --rm --name=postgresql-connector
-v $PWD/target/connector-postgresql-0.1.0-SNAPSHOT-with-dependencies.jar:/opt/app/connector.jar
–network=camunda-platform_camunda-platform
-e ZEEBE_CLIENT_BROKER_GATEWAY-ADDRESS=zeebe:26500
-e ZEEBE_CLIENT_SECURITY_PLAINTEXT=true
-e ZEEBE_CLIENT_ID=zeebe
-e ZEEBE_CLIENT_SECRET=zecret
-e ZEEBE_CLIENT_CONFIG_PATH=/tmp/zeebe_auth_cache
-e ZEEBE_TOKEN_AUDIENCE=zeebe-api
-e ZEEBE_AUTHORIZATION_SERVER_URL=http://keycloak:8080/auth/realms/camunda-platform/protocol/openid-connect/token
-e CAMUNDA_IDENTITY_TYPE=KEYCLOAK
-e CAMUNDA_IDENTITY_AUDIENCE=operate-api
-e CAMUNDA_IDENTITY_ISSUER_BACKEND_URL=http://keycloak:8080/auth/realms/camunda-platform
-e CAMUNDA_IDENTITY_CLIENT_ID=connectors
-e CAMUNDA_IDENTITY_CLIENT_SECRET=XALaRPl5qwTEItdwCMiPS62nVpKs7dL7
-e CAMUNDA_OPERATE_CLIENT_URL=http://operate:8080
postgresql-connector

Log Shows:

2024-03-26T03:36:59.356Z 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:18080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused

Why is it trying to connect to localhost:18080???

Hello @bjmacd ,

could you please try to set CAMUNDA_IDENTITY_ISSUER to the same value as CAMUNDA_IDENTITY_ISSUER_BACKEND_URL?

If this does not help, we will have to review which properties are applied to the Operate client for authentication.

Jonathan

Hi Jonathan
Thanks for the quick reply. I added the following with the same result.

-e CAMUNDA_IDENTITY_ISSUER=http://keycloak:8080/auth/realms/camunda-platform

BTW … I am using Camunda 8

Hello @bjmacd ,

The connector environement variables look correct based on documentation provided

could you mention the camunda 8 version and the connectors version of the Image

Along with @jonathan.lukas suggestion

Please check with your network name and the version compatibility of connector with your cluster

Based on History for connector-postgresql - Infosys/camunda-connectors · GitHub the version is 8.3.1

1 Like

For the Camunda Dockers …

CAMUNDA_CONNECTORS_VERSION=8.5.0-alpha2
CAMUNDA_PLATFORM_VERSION=8.5.0-alpha1

Hello @bjmacd,

I have tried to recreate the issue you are facing with the configuration and able to reproduce it with the configuration

The error above says that is due to i.c.common.auth.SimpleAuthentication
And tries to connect localhost which is odd

When I try with disabling the operate connectivity, It works fine