# \[error\] Bad session state . HTTP/1.1 400 Bad Request

**URL:** <https://forum.genieacs.com/t/error-bad-session-state-http-1-1-400-bad-request/1343>\
**Category:** Uncategorized\
**Created:** [January 9, 2021, 4:23pm UTC](https://forum.genieacs.com/t/error-bad-session-state-http-1-1-400-bad-request/1343 "2021-01-09T16:23:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajingithub](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/rajingithub/32/373_2.png) [@rajingithub](https://forum.genieacs.com/u/rajingithub)\
**Post date:** [January 9, 2021, 4:23pm UTC](https://forum.genieacs.com/t/error-bad-session-state-http-1-1-400-bad-request/1343/1 "2021-01-09T16:23:06Z")

</div>

hi ,  
I am running CPE instance on my laptop(CPE instance is netcwmp opensource tr-069 client) .I am trying to connect that client to our genieacs server . I am getting BAD SESSION STATE RESPONSE(HTTP/1.1 400 Bad Request)

here i am attaching logs of both server and client

**genieacs-server logs**

2021-01-09T14:05:52.823Z [INFO] genieacs-cwmp starting; pid=26486 version=“1.2.3+20201027064135”  
2021-01-09T14:05:57.617Z [INFO] Worker listening; pid=26544 address=“0.0.0.0” port=7547  
2021-01-09T14:05:57.669Z [INFO] Worker listening; pid=26543 address=“0.0.0.0” port=7547  
2021-01-09T14:36:12.742Z [INFO] 127.0.0.1 A00001-OT2800-12345: Inform; cpeRequestId=“1” informEvent=“0 BOOTSTRAP” informRetryCount=0  
2021-01-09T14:36:12.762Z [ERROR] 127.0.0.1 A00001-OT2800-12345: Bad session state

for CPE logs , as there are many logs ,i am attaching logs screenshots. you can find error in “screenshot\_9”.

 ![screenshot_9](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/2504aeaeebea4bf0d5e70cc2bf2d9fa5ee1102e0.png)

why is this error coming? is there a way to solve it?  
thank you,

---

<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:** [January 12, 2021, 1:54am UTC](https://forum.genieacs.com/t/error-bad-session-state-http-1-1-400-bad-request/1343/3 "2021-01-12T01:54:58Z")

</div>

This error means that the request coming from the client isn’t what the ACS expected. For example, the CPE sending an empty HTTP request message as a response to GetParameterNames message from the ACS (typically empty request should only come after InformResponse). Run a packet capture and look at the request/response flow between the ACS and the CPE.

---

<div class="post-metadata">

**Author:** ![rajingithub](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/rajingithub/32/373_2.png) [@rajingithub](https://forum.genieacs.com/u/rajingithub)\
**Post date:** [January 13, 2021, 4:55am UTC](https://forum.genieacs.com/t/error-bad-session-state-http-1-1-400-bad-request/1343/4 "2021-01-13T04:55:44Z")

</div>

in my case, client is sending another 1 inform message without closing (terminating)the previous inform message session.is that what causing error??and also does client need to send keep-alive request every time after time after receiving inform response message?? as this flow is followed by genie-sim(genie-simulator) i have observed it in wireshark.

---

<div class="post-metadata">

**Author:** ![markaldo](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@markaldo](https://forum.genieacs.com/u/markaldo)\
**Post date:** [March 3, 2022, 11:44pm UTC](https://forum.genieacs.com/t/error-bad-session-state-http-1-1-400-bad-request/1343/5 "2022-03-03T23:44:17Z")

</div>

The 400 (Bad Request) status code indicates that the server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process. It means that the request itself has somehow incorrect or corrupted and the server couldn’t understand it. The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method . Therefore, it prevents the website from being properly displayed. The main thing to understand is that the [400 Bad Request error](http://net-informations.com/q/mis/400.html) is a client-side error.

The cause of a 400 error can be a wrongly written URL or a URL that contains unrecognizable characters. Another cause of the error might be an invalid or expired cookie. Also, if you try to upload a file that’s too large. If the server is programmed with a file size limit, then you might encounter a 400 error.
