skip to Main Content

Iam using LIferay 7.1.1 CE Bundled with Tomcat-9.0.10

After getting logged into the Control Panel, when I do any actions like saving a page, publishing a web content, adding template…etc, Iam getting 400 Bad request error Intermittently. Some times the same action is working without any issue.
When I access the same site using localhost:8080, this issue is not happening, all the actions are working fine.
I am also having https encryption URL for my site.

Server setup looks like below,

NGINX -> Apache(2.0) -> Tomcat(9.0.10)

Don’t know why Iam getting 400 Bad request error frequently, any help to solve this issue is greatly appreciated. Struggling with this issue for a long time.

Thanks.

2

Answers


  1. So you have 3 pieces of software that can return 400 code: NGINX, Apache and Liferay Portal (Tomcat). From the information you’ve provided it’s impossible to tell which one is doing it. IMHO it’s very unlikely that it’s Liferay Portal.

    The error could be related to how sessions are configured, how proxy and/or redirects are configured, due to some custom headers, switching protocols or million other things.

    The only thing I can recommend is to inspect the access/error log files of NGINX and Apache for those requests. There should be some more information what was wrong.

    Login or Signup to reply.
  2. I suppose that by using localhost:8080 you mean contacting Liferay directly without nginx and apache, which work. After knowing that, the issue is probably in either apache or nginx. You could do the same test by contacting apache directly to isolate which one is giving you trouble.

    One issue I found that often give bad request, particularly in the control panel, is the URL long. As you have probably found out, Liferay can generate pretty long URL but some web server or proxy limit that URL length and make the request fail.

    If that is your issue, you would have to configure the offending web server to accept longer URL. Looking at https://issues.liferay.com/browse/LPS-71820, you should accept at least 4000 char.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search