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

Check result of starting grpc server #5257

Merged
merged 2 commits into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dbms/src/Server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ extern const int NO_ELEMENTS_IN_CONFIG;
extern const int SUPPORT_IS_DISABLED;
extern const int ARGUMENT_OUT_OF_BOUND;
extern const int INVALID_CONFIG_PARAMETER;
extern const int IP_ADDRESS_NOT_ALLOWED;
} // namespace ErrorCodes

namespace Debug
Expand Down Expand Up @@ -622,6 +623,10 @@ class Server::FlashGrpcServerHolder
}
}
flash_grpc_server = builder.BuildAndStart();
if (!flash_grpc_server)
{
throw Exception("Exception happens when start grpc server, the flash.service_addr may be invalid, flash.service_addr is " + raft_config.flash_server_addr, ErrorCodes::IP_ADDRESS_NOT_ALLOWED);
}
LOG_FMT_INFO(log, "Flash grpc server listening on [{}]", raft_config.flash_server_addr);
Debug::setServiceAddr(raft_config.flash_server_addr);
if (enable_async_server)
Expand Down