# CWMP Cookie problem

**URL:** https://forum.genieacs.com/t/cwmp-cookie-problem/1118
**Category:** Uncategorized
**Created:** [October 12, 2020, 8:16am UTC](https://forum.genieacs.com/t/cwmp-cookie-problem/1118 "2020-10-12T08:16:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bajojoba](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@bajojoba](https://forum.genieacs.com/u/bajojoba)
#### Post date: [October 12, 2020, 8:16am UTC](https://forum.genieacs.com/t/cwmp-cookie-problem/1118/1 "2020-10-12T08:16:21Z")

</div>

Hello,

It seems that after InformResponse CWMP doesn’t send cookie anymore in the TCP session. Below is the detailed description. It can than result in 400 invalid session. This doesn’t seem as a CPE issue as CPE sends the Cookie in order of Session.

> 1. CPE sends inform
> 2. ACS replys with infrom response with cookie
> 3. CPE reply with with cookie and content length 0
> 4. ACS replys with GPV and no cookie
> 5. CPE replys with result and cookie
> 6. ACS replys with GPV and no cookie
> 7. CPE replys with result and cookie
> 8. ACS replys with no content and no cookie

This kind of behaviour will/might/should always result in invalid session. It is not vendor related. I also have a .pcap trace file recorded directly on the ACS server which I can share.

**// CPE REQUEST**  
POST / HTTP/1.1  
Host: 1.1.1.1:7547  
User-Agent: BCM3383wvg–0813.1  
Connection: keep-alive  
SOAPAction:  
Content-Type: text/xml  
Content-Length: 2372

\<SOAP-ENV:Envelope  
xmlns:SOAP-ENV=“[http://schemas.xmlsoap.org/soap/envelope/”](http://schemas.xmlsoap.org/soap/envelope/%E2%80%9D)  
xmlns:SOAP-ENC=“[http://schemas.xmlsoap.org/soap/encoding/”](http://schemas.xmlsoap.org/soap/encoding/%E2%80%9D)  
xmlns:xsd=“[http://www.w3.org/2001/XMLSchema”](http://www.w3.org/2001/XMLSchema%E2%80%9D)  
xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%E2%80%9D)  
xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”\>  
SOAP-ENV:Header  
\<cwmp:ID SOAP-ENV:mustUnderstand=“1”\>300933305\</cwmp:ID\>  
\</SOAP-ENV:Header\>  
SOAP-ENV:Body  
cwmp:Inform

Technicolor  
28BE9B  
CGA2121  
383FB36280B6

6 CONNECTION REQUEST

1  
2020-10-08T12:48:45  
0

Device.DeviceInfo.HardwareVersion  
1.0

Device.DeviceInfo.SoftwareVersion  
CGA2121E-ES-13-E113C5-c7410r5714-190513

Device.DeviceInfo.ProvisioningCode

Device.ManagementServer.ConnectionRequestURL  
[http://1.1.1.1:7547/](http://1.1.1.1:7547/)

Device.ManagementServer.ParameterKey

Device.ManagementServer.AliasBasedAddressing  
false

\</cwmp:Inform\>  
\</SOAP-ENV:Body\>  
\</SOAP-ENV:Envelope\>

**// GENIEACS REPLY WITH COOKIE**

HTTP/1.1 200 OK  
Content-Length: 529  
Server: GenieACS/1.2.2+20201008104452  
SOAPServer: GenieACS/1.2.2+20201008104452  
Content-Type: text/xml; charset=“utf-8”  
Set-Cookie: session=6cc1828b629278c8  
Date: Thu, 08 Oct 2020 10:48:55 GMT  
Connection: keep-alive

\<?xml version="1.0" encoding="UTF-8"?\>

\<soap-env:Envelope xmlns:soap-enc=“[http://schemas.xmlsoap.org/soap/encoding/”](http://schemas.xmlsoap.org/soap/encoding/%E2%80%9D) xmlns:soap-env=“[http://schemas.xmlsoap.org/soap/envelope/”](http://schemas.xmlsoap.org/soap/envelope/%E2%80%9D) xmlns:xsd=“[http://www.w3.org/2001/XMLSchema”](http://www.w3.org/2001/XMLSchema%E2%80%9D) xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%E2%80%9D) xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”\>soap-env:Header\<cwmp:ID soap-env:mustUnderstand=“1”\>300933305\</cwmp:ID\>\</soap-env:Header\>soap-env:Bodycwmp:InformResponse1\</cwmp:InformResponse\>\</soap-env:Body\>\</soap-env:Envelope\>

**// CPE REPLY WITH COOKIE**

POST / HTTP/1.1  
Host: 1.1.1.1:7547  
User-Agent: BCM3383wvg–0813.1  
Connection: keep-alive  
Cookie: session=6cc1828b629278c8  
Content-Length: 0

**// GENIEACS REPLY WITH NO COOKIE**

HTTP/1.1 200 OK  
Content-Length: 643  
Server: GenieACS/1.2.2+20201008104452  
SOAPServer: GenieACS/1.2.2+20201008104452  
Content-Type: text/xml; charset=“utf-8”  
Date: Thu, 08 Oct 2020 10:48:55 GMT  
Connection: keep-alive

\<?xml version="1.0" encoding="UTF-8"?\>

\<soap-env:Envelope xmlns:soap-enc=“[http://schemas.xmlsoap.org/soap/encoding/”](http://schemas.xmlsoap.org/soap/encoding/%E2%80%9D) xmlns:soap-env=“[http://schemas.xmlsoap.org/soap/envelope/”](http://schemas.xmlsoap.org/soap/envelope/%E2%80%9D) xmlns:xsd=“[http://www.w3.org/2001/XMLSchema”](http://www.w3.org/2001/XMLSchema%E2%80%9D) xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%E2%80%9D) xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”\>soap-env:Header\<cwmp:ID soap-env:mustUnderstand=“1”\>17507d3ff8b0000\</cwmp:ID\>\</soap-env:Header\>soap-env:Bodycwmp:GetParameterValuesDevice.IP.Interface.1.IPv4Address.1.IPAddress\</cwmp:GetParameterValues\>\</soap-env:Body\>\</soap-env:Envelope\>

**// CPE REPLY WITH COOKIE**

POST / HTTP/1.1  
Host: 1.1.1.1:7547  
User-Agent: BCM3383wvg–0813.1  
Connection: keep-alive  
SOAPAction:  
Cookie: session=6cc1828b629278c8  
Content-Type: text/xml  
Content-Length: 758

\<SOAP-ENV:Envelope  
xmlns:SOAP-ENV=“[http://schemas.xmlsoap.org/soap/envelope/”](http://schemas.xmlsoap.org/soap/envelope/%E2%80%9D)  
xmlns:SOAP-ENC=“[http://schemas.xmlsoap.org/soap/encoding/”](http://schemas.xmlsoap.org/soap/encoding/%E2%80%9D)  
xmlns:xsd=“[http://www.w3.org/2001/XMLSchema”](http://www.w3.org/2001/XMLSchema%E2%80%9D)  
xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%E2%80%9D)  
xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”\>  
SOAP-ENV:Header  
\<cwmp:ID SOAP-ENV:mustUnderstand=“1”\>17507d3ff8b0000\</cwmp:ID\>  
\</SOAP-ENV:Header\>  
SOAP-ENV:Body  
cwmp:GetParameterValuesResponse

Device.IP.Interface.1.IPv4Address.1.IPAddress  
1.1.1.1

\</cwmp:GetParameterValuesResponse\>  
\</SOAP-ENV:Body\>  
\</SOAP-ENV:Envelope\>

**// GENIEACS REPLY WITH NO COOKIE**

HTTP/1.1 200 OK  
Content-Length: 801  
Server: GenieACS/1.2.2+20201008104452  
SOAPServer: GenieACS/1.2.2+20201008104452  
Content-Type: text/xml; charset=“utf-8”  
Date: Thu, 08 Oct 2020 10:48:55 GMT  
Connection: keep-alive

\<?xml version="1.0" encoding="UTF-8"?\>

\<soap-env:Envelope xmlns:soap-enc=“[http://schemas.xmlsoap.org/soap/encoding/”](http://schemas.xmlsoap.org/soap/encoding/%E2%80%9D) xmlns:soap-env=“[http://schemas.xmlsoap.org/soap/envelope/”](http://schemas.xmlsoap.org/soap/envelope/%E2%80%9D) xmlns:xsd=“[http://www.w3.org/2001/XMLSchema”](http://www.w3.org/2001/XMLSchema%E2%80%9D) xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%E2%80%9D) xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”\>soap-env:Header\<cwmp:ID soap-env:mustUnderstand=“1”\>17507d3ff8b0100\</cwmp:ID\>\</soap-env:Header\>soap-env:Bodycwmp:GetParameterValuesDevice.NAT.PortMapping.11.ExternalPortDevice.NAT.PortMapping.12.ExternalPortDevice.NAT.PortMapping.13.ExternalPortDevice.NAT.PortMapping.14.ExternalPort\</cwmp:GetParameterValues\>\</soap-env:Body\>\</soap-env:Envelope\>

**// CPE REPLY WITH COOKIE**

POST / HTTP/1.1  
Host: 1.1.1.1:7547  
User-Agent: BCM3383wvg–0813.1  
Connection: keep-alive  
SOAPAction:  
Cookie: session=6cc1828b629278c8  
Content-Type: text/xml  
Content-Length: 1185

\<SOAP-ENV:Envelope  
xmlns:SOAP-ENV=“[http://schemas.xmlsoap.org/soap/envelope/”](http://schemas.xmlsoap.org/soap/envelope/%E2%80%9D)  
xmlns:SOAP-ENC=“[http://schemas.xmlsoap.org/soap/encoding/”](http://schemas.xmlsoap.org/soap/encoding/%E2%80%9D)  
xmlns:xsd=“[http://www.w3.org/2001/XMLSchema”](http://www.w3.org/2001/XMLSchema%E2%80%9D)  
xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%E2%80%9D)  
xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”\>  
SOAP-ENV:Header  
\<cwmp:ID SOAP-ENV:mustUnderstand=“1”\>17507d3ff8b0100\</cwmp:ID\>  
\</SOAP-ENV:Header\>  
SOAP-ENV:Body  
cwmp:GetParameterValuesResponse

Device.NAT.PortMapping.14.ExternalPort  
8080

Device.NAT.PortMapping.13.ExternalPort  
7547

Device.NAT.PortMapping.12.ExternalPort  
7547

Device.NAT.PortMapping.11.ExternalPort  
161

\</cwmp:GetParameterValuesResponse\>  
\</SOAP-ENV:Body\>  
\</SOAP-ENV:Envelope\>

**// GENIEACS REPLY WITH NO COOKIE**

HTTP/1.1 204 No Content  
Content-Length: 0  
Server: GenieACS/1.2.2+20201008104452  
SOAPServer: GenieACS/1.2.2+20201008104452  
Connection: close  
Date: Thu, 08 Oct 2020 10:48:55 GMT

---

<div class="post-metadata">

### Author: ![westspeed](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/westspeed/32/636_2.png) [@westspeed](https://forum.genieacs.com/u/westspeed)
#### Post date: [August 16, 2021, 9:04am UTC](https://forum.genieacs.com/t/cwmp-cookie-problem/1118/2 "2021-08-16T09:04:11Z")

</div>

do you know how to solve this problem

---

<div class="post-metadata">

### Author: ![bajojoba](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@bajojoba](https://forum.genieacs.com/u/bajojoba)
#### Post date: [September 7, 2021, 1:04pm UTC](https://forum.genieacs.com/t/cwmp-cookie-problem/1118/3 "2021-09-07T13:04:53Z")

</div>

sticky table was used with loadbalancer.

---

<div class="post-metadata">

### Author: ![zaidka](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/zaidka/32/9_2.png) [@zaidka](https://forum.genieacs.com/u/zaidka)
#### Post date: [September 14, 2021, 11:52pm UTC](https://forum.genieacs.com/t/cwmp-cookie-problem/1118/4 "2021-09-14T23:52:52Z")

</div>

The session flow you shared looks correct so I don’t see what the issue is.
