Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Error: Failed to connect before the deadline.

Aperta
#2,906 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, kubernetes

Direzione di ricerca

Non viene indicato alcun file del repository né alcun test. Inizia esaminando la configurazione di server bindAsync, la chiamata client waitForClientReady e la configurazione del servizio Kubernetes, quindi confronta i percorsi dei certificati, gli endpoint e le porte mostrati nell’issue; il lavoro è completato quando viene stabilita la connessione client sicura prevista senza l’errore di deadline.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

package: @grpc/grpc-js

What version of gRPC and what language are you using?
gRPC version = 1.8.14, Language = javascript;

What operating system (Linux, Windows,...) and version?
Linux

What did you do?
Please provide either
I have been using gRPC for a long time. I was using it with an inscure connection. Then we decided to make the connection secure using mtls.
I tested it in my local system and I am able to connect it securely but when I moved it to the server it started facing error. I have no clue how to debug it further.
The error I keep getting is Error: Failed to connect before the deadline.

This is what I have added in the code for server

const credentials = grpc.ServerCredentials.createSsl(fs.readFileSync(String(process.env.GRPC_NOTIFICATION_CA_CERT)), [{
cert_chain: fs.readFileSync(String(process.env.GRPC_NOTIFICATION_SERVER_CERT)),
private_key: fs.readFileSync(String(process.env.GRPC_NOTIFICATION_SERVER_KEY))
}], true);

server.addService(package.service, {
youService
});

server.bindAsync("0.0.0.0:3006", credentials, (err) => {
if (err) {
console.error(err);
return;
}
console.log("GRPC server running at port 3006");
server.start();
});

client code

const credentialsClient1 = grpc.credentials.createSsl(
fs.readFileSync(String(process.env.GRPC_NOTIFICATION_CA_CERT)),
fs.readFileSync(String(process.env.GRPC_NOTIFICATION_CLIENT_KEY)),
fs.readFileSync(String(process.env.GRPC_NOTIFICATION_CLIENT_CERT))
);
const client2 = new package("notification-srv:3005", credentialsClient1);

client2?.waitForClientReady(Date.now() + 5000, (err) => {
if (err) {
console.error(err);
}
else {
console.info("GRPC client connected");
}
});
Another thing I am using Kubernetes for my application.

What did you expect to see?
It should have gotten connected since I am passing a valid certificate.

What did you see instead?
It is giving me error

Copied over from https://github.com/grpc/grpc/issues/38820
@shubham-rapidops

Lingua principale
TypeScript
Stelle
4.8k
Fork
717
Merge medio
1g 18h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di grpc/grpc-node

Tutte le issue di grpc/grpc-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.