Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Error: Failed to connect before the deadline.

Đang mở
#2,906 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, kubernetes

Hướng nghiên cứu

Không có tệp repository hoặc test nào được nêu tên. Hãy bắt đầu bằng cách xem xét thiết lập server bindAsync, lệnh gọi waitForClientReady của client và cấu hình service Kubernetes, sau đó so sánh các đường dẫn chứng chỉ, endpoint và port được nêu trong issue; hoàn thành có nghĩa là thiết lập được kết nối client bảo mật như mong đợi mà không gặp lỗi deadline.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
4.8k
Fork
717
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của grpc/grpc-node

Tất cả issue của grpc/grpc-node

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.