Invalid session between GenieACS and easycwmp


It’s my first touch to GenieACS and easycwmp. I see invalid session shown in GenieACS side when easycwmp tried to connect GenieACS, and I am very confused.

2019-11-26T07:20:48.253Z [INFO] Worker listening; pid=32488 address=“” port=7547
2019-11-26T07:20:48.255Z [INFO] Worker listening; pid=32493 address=“” port=7547
2019-11-26T07:20:48.257Z [INFO] Worker listening; pid=32508 address=“” port=7547
2019-11-26T07:20:49.899Z [INFO] FFFFFF-easycwmp-FFFFFF123456: Inform; cpeRequestId=“1” informEvent=“1 BOOT” informRetryCount=0
2019-11-26T07:20:49.915Z [ERROR] FFFFFF-easycwmp-FFFFFF123456: Invalid session
2019-11-26T07:20:58.427Z [INFO] FFFFFF-easycwmp-FFFFFF123456: Inform; cpeRequestId=“2” informEvent="" informRetryCount=1
2019-11-26T07:20:58.644Z [ERROR] FFFFFF-easycwmp-FFFFFF123456: Invalid session

These are my settings,
Easycwmp (/etc/config/easycwmp)
config local
option enable ‘1’
option interface eth0
option port 7547
option ubus_socket /var/run/ubus.sock
option date_format %FT%T%z
option username easycwmp
option password easycwmp
option provisioning_code ‘’
#basic authentication = ‘Basic’, Digest authentication = ‘Digest’, Default value = ‘Digest’
option authentication ‘Digest’
#Logging levels: Critic=0, Warning=1, Notice=2, Info=3, Debug=4
option logging_level ‘3’

config acs
option url
option parameter_key ‘1’
option periodic_enable ‘true’
option periodic_interval ‘100’
option periodic_time ‘0001-01-01T00:00:00Z’

GenieACS (config.json)
“MONGODB_CONNECTION_URL” : “mongodb://”,
“CWMP_PORT” : 7547,
“CWMP_SSL” : false,
“NBI_PORT” : 7557,
“FS_PORT” : 7567,
“DEBUG” : false

Please share information if you know how to solve. Very Thanks.

@jammer1019, what version of the easycwmp are you using?. This bug has been fixed -

CPE must accept cookies, otherwise there will be an error about which you write… IMHO.

@visual, I tried your link to modify http.c in libcurl, but the result was the same.
The easycwmp version is “1.8.3” , and libcurl version is 7.44.
I had no idea how to do advanced modification (easycwmp or GenieACS) for this weird issue. (:

@jammer1019, file ‘/tmp/easycwmp_cookies’ is created? Does easycwmp have sufficient permissions to write to the file? Are any traffic redirects used (reverse proxy, port forwardind and etc)? What is written to the log file if you set the debug logging level (option logging_level ‘4’)?

@visual, /tmp/easycwmp_cookies was not created. I had flushed all iptables rule and also modified log level from ‘3’ to ‘4’, They shows “LibCurl Error: The requested URL returned error: 400 Bad Request”

  • The requested URL returned error: 400 Bad Request
  • Closing connection 0
    2019-11-29 09:20:27 [easycwmp] NOTICE - LibCurl Error: The requested URL returned error: 400 Bad Request

@jammer1019, can you analyze dump of traffic in wireshark?

@visual, I capture a packet,


ACS returned 400 Bad Request finally, and the log message from easycwmp side,

2019-11-29 13:59:32 [easycwmp] NOTICE - receive InformResponse from the ACS
2019-11-29 13:59:32 [easycwmp] NOTICE - send empty message to the ACS

Does “send empty message to the ACS” make sense? Thanks.

File not found

It is very likely that this is the reason.

@visual, You can download the packet file.
BTW, Could you suggest me how to check the install procedure, configuration or something else to fix HTTP 400 Bad Request from ACS? Easycwmp or GenieACS.


@jammer1019, could you try to run easycwmp under root? Something like this…
sudo /usr/sbin/easycwmpd -f -b

BTW you should disable Digest authentification in easycwmp config if GenieACS does not authenticate remote CPE.

P.S. I have’t easycwmp in my environment.

@visual, I turn on “enable-cookies” of libcurl and try again, the problem seems to be resolved. Thanks for sharing these days. :slight_smile:

1 Like

@jammer1019, I am very glad to hear that. Could you show a configuration example for libcurl? This can be useful for other system administrators who have easycwmp in their environment :slightly_smiling_face:

@visual, In Libcurl build, “./configure --enable-cookies …” will generate Makefile, For your reference. :slight_smile:

1 Like