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

server: stale range lease prevents server quit #6963

Closed
jseldess opened this issue May 31, 2016 · 0 comments
Closed

server: stale range lease prevents server quit #6963

jseldess opened this issue May 31, 2016 · 0 comments
Assignees

Comments

@jseldess
Copy link
Contributor

jseldess commented May 31, 2016

Please follow the steps below to help us help you.

  1. Please supply the header (i.e. the first few lines) of your most recent
    log file for each node in your cluster. On most unix-based systems
    running with defaults, this boils down to the output of
$ grep -F '[config]' cockroach-data/logs/cockroach.INFO
I160530 22:33:32.783084 util/log/clog.go:998  [config] file created at: 2016/05/30 22:33:32
I160530 22:33:32.783084 util/log/clog.go:998  [config] running on machine: JESSEs-MacBook-Pro
I160530 22:33:32.783084 util/log/clog.go:998  [config] binary: CockroachDB beta-20160526-111-gf55bfc4 (darwin amd64, built 2016/05/31 01:09:14, go1.6)
I160530 22:33:32.783084 util/log/clog.go:998  [config] arguments: [./cockroach start --background --background=false]
  1. Please describe the issue you observed:

I started up a 2-node local cluster. I shut down the first node. I tried to shut down the second node and got an rpc error.

  • What did you do?
$ ./cockroach start --background
build:     beta-20160526-111-gf55bfc4 @ 2016/05/31 01:09:14 (go1.6)
admin:     http://localhost:8080
sql:       postgresql://root@localhost:26257?sslmode=disable
logs:      cockroach-data/logs
store[0]:  path=cockroach-data

$ ./cockroach start --background --store=node2 --port=26258 --http-port=8081 --join=localhost:26257
build:     beta-20160526-111-gf55bfc4 @ 2016/05/31 01:09:14 (go1.6)
admin:     http://localhost:8081
sql:       postgresql://root@localhost:26258?sslmode=disable
logs:      node2/logs
store[0]:  path=node2

$ ./cockroach quit
ok
$ initiating graceful shutdown of server
server drained and shutdown completed

$ ./cockroach quit --port=26258
Error: rpc error: code = 2 desc = replica range=1 [/Min-/Table/11) still has an active lease
Failed running "quit"
  • What did you expect to see?

I expected the second node to shut down gracefully.

  • What did you see instead?
Error: rpc error: code = 2 desc = replica range=1 [/Min-/Table/11) still has an active lease
Failed running "quit"
@knz knz changed the title Can't quit last node in local cluster server: stale range lease prevents server quit Jun 4, 2016
@tbg tbg self-assigned this Jun 27, 2016
tbg added a commit to tbg/cockroach that referenced this issue Jun 27, 2016
```
$ ./cockroach quit
graceful shutdown failed, proceeding with hard shutdown: rpc error: code = 2 desc = replica range=1 [/Min-/Table/11) still has an active lease
ok
```

Fixes cockroachdb#6963.
@tbg tbg closed this as completed in #7483 Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants