CPE already in session

Hey there,

On my path to get 1.2.7 working, I got the logs below on the cwmp service.

CPE already in session

After that, I cant get any information from the device, and after rebooting, the problem persists.
Is there anything that I can do? What`s the reason for that?

Note: Just to clarify, the device sends info to the ACS, but the server responds with the log above.

It was possible to replicate the problem, by sending REBOOT to the device through the ACS UI Interface.

on Debian:

journalctrl -f | grep cwmp

that and genieacs-cwmp log file located on /var/log/genieacs might give you a clue of what’s wrong.

I had that issue before and I managed to pinpoint the problem: it was the extension which in turn used an external web service to access a database which manifest specially during blackouts when dozens or even hundreds of CPE were trying to connect to ACS at the same time.

Modified provision to tag each CPE on boot even and made a group of bash script running in background to call them one by one to avoid the bottle neck. And while it is still a work in progress at the time I’m writing this, we made a switch to text file located on filesystem (JSON files, just to honor the K.I.S.S. rule) instead of a Rest API call and so far seems to be working a lot faster and just fine.

sry about the late reply.

hello. Sorry to use the same post, but i had same issue of “CPE already in session” on one CPE on my lab, when i try to gpv some parameter via genie GUI. Other cpe same model same fw does not have this issue

i use the command that you send and i got:

root@GenieACS:~# journalctl -f | grep cwmp
feb 03 10:27:43 GenieACS genieacs-cwmp[387]: 2022-02-03T13:27:43.996Z [ERROR] Uncaught exception; pid=771 exceptionName=“TypeError” exceptionMessage=“Argument passed in must be a Buffer or string of 12 bytes or a string of 24 hex characters” exceptionStack=“TypeError: Argument passed in must be a Buffer or string of 12 bytes or a string of 24 hex characters\n at new BSONTypeError (/opt/genieacs/node_modules/bson/lib/error.js:39:42)\n at new ObjectId (/opt/genieacs/node_modules/bson/lib/objectid.js:62:23)\n at /opt/genieacs/bin/genieacs-cwmp:2:119495\n at Array.map ()\n at /opt/genieacs/bin/genieacs-cwmp:2:119487\n at Jn (/opt/genieacs/bin/genieacs-cwmp:2:119518)\n at Un (/opt/genieacs/bin/genieacs-cwmp:2:111467)\n at Xn (/opt/genieacs/bin/genieacs-cwmp:2:120254)\n at Bn (/opt/genieacs/bin/genieacs-cwmp:2:117008)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)”
feb 03 10:27:44 GenieACS genieacs-cwmp[387]: 2022-02-03T13:27:44.395Z [ERROR] Worker died; pid=771 exitCode=0
feb 03 10:27:44 GenieACS genieacs-cwmp[387]: 2022-02-03T13:27:44.997Z [INFO] Worker listening; pid=1556 address=“::” port=7547

Do you know where i can start to look, since this output dont tell me much to understand for me?

thanks and best regards

Follow the solution:

  1. Access the MongoDB;
  • in linux cli: mongo

2 ) Access the GenieACS DB;

  • use genieacs;
  1. Find de CPE ID on “cache” table;
  • db.cache.find({“_id”: /454545-MY_CPE_FICT-121212121.*/});

if return results, alter command “find” to “remove”

  • db.cache.remove({“_id”: /454545-MY_CPE_FICT-121212121.*/});

It’s generate response: “WriteResult({ “nRemoved” : 1 })”

Reboot your CPE.

Version 1.2.9 running under docker, configuring MikroTik device, getting “CPE already in session” when calling an ext javascript that called the “devices” API to download a configuration file. Took 30 seconds, dropped connection to CPE, finally did the download with status 202 ACCEPTED. (It would download okay later when connection reestablished.)

Replaced the ext call with the following provision code

declare(“Downloads.[FileType:1 Firmware Upgrade Image]”, {path: 1}, {path: 1});
declare(“Downloads.[FileType:1 Firmware Upgrade Image].FileName”, {value: 1}, {value: “my-config.rsc”});
declare(“Downloads.[FileType:1 Firmware Upgrade Image].Download”, {value: 1}, {value: Date.now()});

Worked seamlessly and instantly, no connection problems, no timeouts - device configured.

Do NOT use ext calls unless you have to.