cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Cisco Community Designated VIP Class of 2020

464
Views
0
Helpful
6
Replies
Highlighted
Cisco Employee

Getting the configuration database is locked by session by none

Hi all, We are getting config database is locked by session "NONE". I am aware that if a database is locked by another session we might be getting this issue. But, in this case, we get the session id as NONE. Is this an NSO issue?
I am guessing the fix would be to change the commit-retry-timeout..but just curious, is this an NSO issue?

Getting the configuration database is locked by session by none

com.tailf.maapi.MaapiException: the configuration database is locked by session none

  at com.tailf.maapi.MaapiException.mk(MaapiException.java:61) [conf-api-6.4.4.jar:]

  at com.tailf.maapi.MaapiException.mk(MaapiException.java:50) [conf-api-6.4.4.jar:]

  at com.tailf.maapi.Maapi.applyTrans(Maapi.java:1277) [conf-api-6.4.4.jar:]

  at com.tailf.maapi.Maapi.applyTrans(Maapi.java:1202) [conf-api-6.4.4.jar:]

                                     [{file,"proc_lib.erl"},{line,225}]}]

Args2 = [143,<<0,0,41,61,131,104,2,100,0,5,102,97,108,115,101,97,0>>,false]

4-Apr-2018::00:10:46.443 <0.29.0> <0.19377.11> confd_maapi: Other err:

{error,badarg}: [{io_lib,format,

                          ["the configuration database is locked by session ~s ~s",

                           []],

                          [{file,"io_lib.erl"},{line,168}]},

                  {cs_error,add_str,2,[{file,"cs_error.erl"},{line,113}]},

                  {cs_error,mk_cs_error,4,[{file,"cs_error.erl"},{line,46}]},

                  {confd_maapi,get_cs_error,1,

                               [{file,"confd_maapi.erl"},{line,6825}]},

                  {confd_maapi,apply_ret,4,

                               [{file,"confd_maapi.erl"},{line,6883}]},

                  {confd_maapi,do,2,[{file,"confd_maapi.erl"},{line,834}]},

                  {confd_maapi,handle_lib,1,

                               [{file,"confd_maapi.erl"},{line,755}]},

                  {proc_lib,init_p,3,[{file,"proc_lib.erl"},{line,225}]}]

Args2 = [143,<<0,0,190,174,131,104,2,100,0,5,102,97,108,115,101,97,0>>,false]

11-Apr-2018::14:00:49.631 <0.29.0> <0.19099.29> confd_maapi: Other err:

{error,badarg}: [{io_lib,format,

                          ["the configuration database is locked by session ~s ~s",

                           []],

                          [{file,"io_lib.erl"},{line,168}]},

                  {cs_error,add_str,2,[{file,"cs_error.erl"},{line,113}]},

                  {cs_error,mk_cs_error,4,[{file,"cs_error.erl"},{line,46}]},

                  {confd_maapi,get_cs_error,1,

                               [{file,"confd_maapi.erl"},{line,6825}]},

                  {confd_maapi,apply_ret,4,

                               [{file,"confd_maapi.erl"},{line,6883}]},

                  {confd_maapi,do,2,[{file,"confd_maapi.erl"},{line,834}]},

                  {confd_maapi,handle_lib,1,

                               [{file,"confd_maapi.erl"},{line,755}]},

                  {proc_lib,init_p,3,[{file,"proc_lib.erl"},{line,225}]}]

Args2 = [143,<<0,1,222,132,131,104,2,100,0,5,102,97,108,115,101,97,0>>,false]

Everyone's tags (2)
6 REPLIES 6
Cisco Employee

Re: Getting the configuration database is locked by session by none

Hi,

What version of NSO are you using? It might have been fixed in later versions.

BR,

Johan

Cisco Employee

Re: Getting the configuration database is locked by session by none

Hi Johan,

Thanks for the reply. Its 4.4.3.

Its probably happening because of CDB Journal Compaction.

Regards,

Pratik Lala

Sent from my iPhone

Cisco Employee

Re: Getting the configuration database is locked by session by none

You can see if/when compaction is happening in logs/devel.log, if you have debugging level info enabled.

Cisco Employee

Re: Getting the configuration database is locked by session by none

Hi Jan,

Yes, I saw Compaction  happening in the devel logs when the failure was happening.

But, Just want to confirm if compaction is the reason?
And is commit-retry-timeout the best solution to fix this issue?
Also, May i know in which version this issue is fixed?

Cisco Employee

Re: Getting the configuration database is locked by session by none

Ok, good that you verified against the log.

If commit-retry is the best solution depends on your use case I guess. At least it's easy to implement ;-) I guess all solutions that depend on a timeout are kind of mediocre, but it's what you get for having many clients that may have to mess with the database and the need for full (not only eventual) consistency.

Cisco Employee

Re: Getting the configuration database is locked by session by none

Hi Jan,

Thanks for the reply.

We are using maapi as the client.

Can we detect that CDB compaction is happening and could wait for the compaction to get over?

There was one flag if i remember correctly in CDB when we start the user session. LOCK_WAIT.

Any similar flags we can use for Maapi?

Or is there a way you could suggest to handle this scenario apart from commit-retry-timeout for Maapi?

Regards,

Pratik Lala

Sent from my iPhone