Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRPCUnavailableError:UNAVAILABLE: No connection established #165

Open
AhmedZahRan7 opened this issue May 18, 2022 · 1 comment
Open

GRPCUnavailableError:UNAVAILABLE: No connection established #165

AhmedZahRan7 opened this issue May 18, 2022 · 1 comment

Comments

@AhmedZahRan7
Copy link

It's just happened when trying running the quick-start in the redmi file

const { Etcd3 } = require('etcd3');
const client = new Etcd3();

(async () => {
    await client.put('foo').value('bar');

    const fooValue = await client.get('foo').string();
    console.log('foo was:', fooValue);

    const allFValues = await client.getAll().prefix('f').keys();
    console.log('all our keys starting with "f":', allFValues);

    await client.delete().all();
})();

The output error is:

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^
GRPCUnavailableError: 14 UNAVAILABLE: No connection established

Node version is 17.6.0

@icetbr
Copy link

icetbr commented Nov 20, 2022

Check if your etcd is using a certfile

Example in docker-compose.yml

      - /usr/local/bin/etcd
      - --data-dir=/data
      - --name=etcdv3
      - --advertise-client-urls=https://etcdv3:2379
      - --listen-client-urls=https://0.0.0.0:2379
      - --cert-file=/etc/etcd/etcdv3.mycert.com.br.crt
      - --key-file=/etc/etcd/etcdv3.mycert.com.br.key

In this case, you need to add the certified to your client

Dockerfile

ENV NODE_EXTRA_CA_CERTS=$project_home/public.crt

Remember to check if you set up everything right inside your container

  • echo $NODE_EXTRA_CA_CERTS
  • cat $project_home/public.crt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants