ユーザーが理由もなく断続的にログアウトされたり、ログインできなかったりする

症状

ユーザーが断続的にログインに失敗し、ログイン ボタンをクリックしても同じページにとどまるか、エラー メッセージなしで突然ログアウトされる。 

atlassian-jira.log when the user try to login に次のメッセージが表示される。

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.

原因

同じサーバーに異なる IP アドレスにバインドされた 2 つのネットワーク カードが取り付けられている可能性があります。既定の設定では、Tomcat は「*.*.*.*」で起動します。これは、すべての IP アドレスをリッスンしていることを意味します。しかし、各ログイン ユーザー用に生成されたトークンはクライアントとサーバーの両方の IP アドレスに基づいており、サーバーがネットワーク カードを切り替えるとトークンは無効になります。その結果、ユーザーはログインできなくなるか、セッションの有効期限が切れます。 

回避策

Tomcat のパラメーターを使用できます:

address :
複数の IP アドレスを持つサーバーの場合、この属性が指定されたポートでのリッスンに使用するアドレスを指定します。既定では、このポートはサーバーに関連付けられているすべての IP アドレスで使用されます。 

たとえば、server.xml ファイルに address="127.0.0.1" を追加することで、Tomcat は 1 つのアドレスだけにバインドされて起動し、このような問題が発生するのを回避することができます。

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.