User got randomly being logout or not able to login without any reason

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

The user randomly not able to login and just stay in the same page after clicking on the login button or suddenly logout without any error message.

The following appears in the atlassian-jira.log when the user try to login:

1 2 3 WARNING: A servlet POST request, to the URI http://atlassian.test.com/rest/gadget/1.0/login, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected. Oct 30, 2012 5:55:36 PM com.sun.jersey.spi.container.servlet.WebComponent filterFormParameters WARNING: A servlet POST request, to the URI http://atlassian.test.com/rest/gadget/1.0/login, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.

Cause

There are probably two network cards installed on the same server bind to different IP address. As a default setting, Tomcat start at the "*.*.*.*" which mean that it is listening to all IP address. But the token generated for each login user is base on the IP addresses on both client and server, the token will become invalide when the server is switching the network card. As consequence the user will not be able to login or session expired.

Workaround

We can use the Tomcat parameter:

address :

For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server.

like adding address="127.0.0.1" in the server.xml file, so that Tomcat will startup and bind with only one address to avoid such kind of issue from happening.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.