consul lock invalid session

308 views
Skip to first unread message

Vincent Miszczak

unread,
Nov 16, 2016, 6:04:10 AM11/16/16
to Consul
Hello,

I'm trying to implement some HA between 2 servers with Consul lock command.
On server1, I launch my program with "consul lock mylock myprogram"
On server2, I do the same.

Initial state is ok : 
-server1 has "myprogram" running
-server2 is waiting for the lock

Then a network failure occurs, server1 looses the lock, and server2 tries to acquire it.

What I expect:
-server1 "consul lock" sends a SIGTERM to child process
-server2 acquire the lock and start the program

What I get:
-server1 "consul lock" sends a SIGTERM to child process
-server2 fails to acquire the lock with a message : 
ERR] http: Request PUT /v1/kv/mylock/.lock?acquire=2ddce477-91a0-6624-a78e-fdaee01275a3&flags=3304740253564472344, error: rpc error: rpc error: invalid session "2ddce477-91a0-6624-a78e-fdaee01275a3" from=127.0.0.1:47894

The service is started on server2 but the lock is not held.

I'm using Consul v0.6.4

Am I doing something wrong ?


James Phillips

unread,
Dec 19, 2016, 6:37:17 PM12/19/16
to consu...@googlegroups.com
Hi Vincent,

Did you figure this one out? If not can you open a Github issue so we
can track it down. Thanks!

-- James
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/consul/issues
> IRC: #consul on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Consul" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to consul-tool...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/consul-tool/e54323d8-2c1b-49d3-93fa-2645a2f0a041%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages