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

TiFlash can not establish grpc TLS connection to TiDB grpc service #9802

Open
solotzg opened this issue Jan 21, 2025 · 0 comments
Open

TiFlash can not establish grpc TLS connection to TiDB grpc service #9802

solotzg opened this issue Jan 21, 2025 · 0 comments
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/compute severity/critical type/bug The issue is confirmed as a bug.

Comments

@solotzg
Copy link
Contributor

solotzg commented Jan 21, 2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  • cloud env
  • enable tls
  • the mpp task meets error and invokes ReportMPPTaskStatus

2. What did you expect to see? (Required)

  • no error logs

3. What did you see instead (Required)

[ERROR] [MPPTask.cpp:716] ["Failed to ReportMPPTaskStatus to db-tidb-0.db-tidb-peer.tidb1379661944646414117.svc:10080, due to Code: 0, e.displayText() = DB::Exception: ReportMPPTaskStatus Failed14: failed to connect to all addresses, e.what() = DB::Exception, Stack trace:\n\n\n       0x1eeba8e\tDB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) [tiflash+32422542]\n                \tdbms/src/Common/Exception.h:46\n       0x88d6749\tDB::MPPTask::reportStatus(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [tiflash+143484745]\n                \tdbms/src/Flash/Mpp/MPPTask.cpp:706\n       0x88d48c9\tDB::MPPTask::runImpl() [tiflash+143476937]\n                \tdbms/src/Flash/Mpp/MPPTask.cpp:640\n       0x2014088\tauto DB::wrapInvocable<std::__1::function<void ()> >(bool, std::__1::function<void ()>&&)::'lambda'()::operator()() [tiflash+33636488]\n                \tdbms/src/Common/wrapInvocable.h:36\n       0x1efb703\tDB::DynamicThreadPool::executeTask(std::__1::unique_ptr<DB::IExecutableTask, std::__1::default_delete<DB::IExecutableTask> >&) [tiflash+32487171]\n                \tdbms/src/Common/DynamicThreadPool.cpp:124\n       0x1efb091\tDB::DynamicThreadPool::fixedWork(unsigned long) [tiflash+32485521]\n                \tdbms/src/Common/DynamicThreadPool.cpp:138\n       0x1efcd72\tvoid* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::thread DB::ThreadFactory::newThread<void (DB::DynamicThreadPool::*)(unsigned long), DB::DynamicThreadPool*, unsigned long&>(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void (DB::DynamicThreadPool::*&&)(unsigned long), DB::DynamicThreadPool*&&, unsigned long&)::'lambda'(auto&&...), DB::DynamicThreadPool*, unsigned long> >(void*) [tiflash+32492914]\n                \t/usr/local/bin/../include/c++/v1/thread:291\n  0x782c67982c02\tstart_thread [libc.so.6+564226]\n  0x782c67a07c40\tclone3 [libc.so.6+1109056]"] [source="MPP<gather_id:1, query_ts:1733996538165668863, local_query_id:30119, server_id:1549, start_ts:454556788492599305,task_id:1>"] [thread_id=273]

[INFO] [Server.cpp:384] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 945, log msg : subchannel 0x7821a7060800 {address=ipv4:10.0.128.40:10080, args=grpc.client_channel_factory=0x782c66a9d540, grpc.default_authority=db-tidb-0.db-tidb-peer.tidb1379661944646414117.svc:10080, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0x782bf05086f0, grpc.internal.security_connector=0x782bf0935130, grpc.internal.subchannel_pool=0x782c364c6aa0, grpc.max_receive_message_length=-1, grpc.max_reconnect_backoff_ms=3000, grpc.min_reconnect_backoff_ms=1000, grpc.primary_user_agent=grpc-c++/1.44.0, grpc.resource_quota=0x782c364c6b30, grpc.server_uri=dns:///db-tidb-0.db-tidb-peer.tidb1379661944646414117.svc:10080}: connect failed: {\"created\":\"@1733996542.127999911\",\"description\":\"Cannot check peer: missing selected ALPN property.\",\"file\":\"/workspace/source/tiflash/contrib/grpc/src/core/lib/security/security_connector/ssl_utils.cc\",\"file_line\":138}"] [source=grpc] [thread_id=273]

If a C based gRPC client connects to the TiDB status server, it might fail because of grpc/grpc#23172

4. What is your TiFlash version? (Required)

>= v7.3.0

@solotzg solotzg added the type/bug The issue is confirmed as a bug. label Jan 21, 2025
@solotzg solotzg changed the title TiFlash can not establish grpc TLS connection to tidb grpc service TiFlash can not establish grpc TLS connection to TiDB grpc service Jan 22, 2025
@solotzg solotzg added severity/critical affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. and removed severity/major may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/compute severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants