Authentication problem with local k8n setup and Node.js

Hi,

I installed Camunda on my computer for testing. The installation was performed according to the Local Kubernetes cluster instructions (Local Kubernetes cluster | Camunda 8 Docs). All pods started correctly. Configured port-forward. The sites open and I can access the demo/demo data. Next, I started making the first example for study from the Node.js documentation (Node.js | Camunda 8 Docs). When I tried to load an example process in Zeebe I got the error:

Erroring requesting token for Client Id zeebe
RequestError: connect ECONNREFUSED ::1:18080

The documentation states that there is no Identity in the local installation, how then to call Zeebe? I can’t find how to switch Zeebe to basic authentication.

Hi @mskvortsov, welcome to the forums! I would expect a different error if it was an authentication issue. That error looks like a routing/networking error. Can you share how you’ve configured the Node client?

Hi @nathan.loding ,

This is because I do not have Identity running, since it is not in the standard Camunda installation for local k8n for testing.

@mskvortsov - I meant how did you configure/initialize the NodeJS Zeebe client? Can you share your package.json and the relevant JavaScript/TypeScript code, as well as the values for any environment variables you may have used for it?

@nathan.loding
I tried an example from Node.js | Camunda 8 Docs

This is my .env config for Camunda.

ZEEBE_ADDRESS='localhost:26500'
ZEEBE_CLIENT_ID='zeebe'
ZEEBE_CLIENT_SECRET='zecret'
CAMUNDA_SECURE_CONNECTION=false
CAMUNDA_OAUTH_URL='http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token'
CAMUNDA_TASKLIST_BASE_URL='http://localhost:8082'
CAMUNDA_OPERATE_BASE_URL='http://localhost:8081'
CAMUNDA_OPTIMIZE_BASE_URL='http://localhost:8083'
CAMUNDA_MODELER_BASE_URL='http://localhost:8070/api'

In my code I call Zeebe

import { Camunda8 } from '@camunda8/sdk';
import path from 'path';

    const camunda = new Camunda8();
    const zeebe = camunda.getZeebeGrpcApiClient();
    const deploy = await zeebe.deployResource({
      processFilename: path.join(process.cwd(), 'process.bpmn'),
    });
    console.log(`[Zeebe] Deployed process ${deploy.deployments[0].process.bpmnProcessId}`);

@mskvortsov - how did you configure the port forward for your install?

@nathan.loding

I’m using port-forwarding:

kubectl port-forward svc/camunda-platform-connectors 8086:8080
kubectl port-forward svc/camunda-platform-tasklist 8082:80
kubectl port-forward svc/camunda-platform-operate  8081:80
kubectl port-forward svc/camunda-platform-zeebe-gateway 26500:26500 -n default
kubectl port-forward svc/camunda-platform-zeebe-gateway 8088:8080 -n default

Each of them are in its own Terminal (MacOS).

From the referenced docs page:

If you are using the components without Identity, disable OAuth:

export CAMUNDA_AUTH_STRATEGY='NONE'
2 Likes