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

StorageServer wait for meta ready 3 times #3215

Closed
HarrisChu opened this issue Oct 27, 2021 · 4 comments
Closed

StorageServer wait for meta ready 3 times #3215

HarrisChu opened this issue Oct 27, 2021 · 4 comments
Assignees
Labels
type/enhancement Type: make the code neat or more efficient
Milestone

Comments

@HarrisChu
Copy link
Contributor

https://github.com/vesoft-inc/nebula/blob/master/src/storage/StorageServer.cpp#L163

could we wait for meta ready 3 times?

scnarioes:

  1. there're 3 hosts with metad and storaged.
  2. run nebula.service start all separately.
  3. as meta leader is not ready, storaged in first host may be exited.
@critical27
Copy link
Contributor

I believe StorageServer will wait forever?

@HarrisChu
Copy link
Contributor Author

No.
addDelayTask is in waitForMetadReady method, if cannot connect to metad, it would return false.

It's just for the first connection, once set addDelayTask, it would wait forever.

@critical27
Copy link
Contributor

image

the default count is -1, which means retry forever.

@HarrisChu
Copy link
Contributor Author

image

waitForMetadReady would verify version first, if the metad is not ready, it return false directly.

logs as below:

I20211230 11:18:02.335803 124472 ThriftClientManager-inl.h:37] Invalid Channel: 0x7f6489a31000 for host: "127.0.0.1":9999
I20211230 11:18:02.335881 124472 ThriftClientManager-inl.h:52] There is no existing client to "127.0.0.1":9999, trying to create one
I20211230 11:18:02.335901 124472 ThriftClientManager-inl.h:73] Connecting to "127.0.0.1":9999 for 4 times
I20211230 11:18:02.336155 124472 MetaClient.cpp:654] Send request to meta "127.0.0.1":9999
I20211230 11:18:02.336275 124472 AsyncSocket.cpp:2996] AsyncSocket::handleConnect(this=0x7f6489a2e000, fd=folly::NetworkSocket(21) host=127.0.0.1:9999) exception: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused)
E20211230 11:18:02.336385 124472 MetaClient.cpp:696] Send request to "127.0.0.1":9999, exceed retry limit
E20211230 11:18:02.337249 124430 MetaClient.cpp:93] RPC failure in MetaClient: apache::thrift::transport::TTransportException: Dropping unsent request. Connection closed after: apache::thrift::transport::TTransportException: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connect
E20211230 11:18:02.337322 124430 StorageServer.cpp:188] waitForMetadReady error!
E20211230 11:18:02.337354 124430 StorageDaemon.cpp:178] Storage server start failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants