Nov 14 02:12:26: %LOG-6-PRI_ACTIVE: Nov 14 02:12:26: %NETCONF-YANG-3-ERR: cmns Start maapi user session failed:operation in wrong state(17),errmsg:No usersessions if no startphase2
Is failing …
After enabling CONFD_TRACE i can see this
[13-11-2017 12:32:49] CONFD:getConfig called
[13-11-2017 12:32:49] Entered : maapi_conn
TRACE MAAPI_START_USER_SESSION DEBUG operation in wrong state - No usersessions if no startphase2
–> CONFD_ERR
As Nabil writes, ConfD is not up and running yet. You can either time your application to connect to ConfD earlier than start-phase 2, using maapi_attach_init() or wait until ConfD has reached start-phase 2 using maapi_wait_start().
For documentation on ConfD start-phases:
ConfD UG / man pages under “COMMUNICATING WITH CONFD”
confd_lib_maapi man page, maapi_attach_init() maapi_start_phase() and maapi_wait_start()
Eg: in my rule-list it is group is [ApplicationAccess] then do i need to change in int maapi_start_user_session(int sock, const char *username, const char *context, const char **groups, int numgroups, const struct confd_ip *src_addr, enum confd_proto prot);
to that group(ApplicationAccess)…??