Blank login screen after upgrade - Error: Method default for action userlogin is not allowed
Problem
After a successful upgrade, users get a blank screen when trying to login.
The following appears in the atlassian-bamboo.log
2016-09-20 08:22:32,990 INFO [http-apr-8085-exec-12] [AccessLogFilter] x.x.x.x GET http://<Bamboo_Server_URL>/userlogin!default.action?os_destination=/start.action 71654kb
2016-09-20 08:22:42,100 WARN [http-apr-8085-exec-12] [Dispatcher] Could not find action or result: /userlogin!default.action?os_destination=/start.action
Method default for action userlogin is not allowed! - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)
at org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
at org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
They may also get a 404 error when logging out of Bamboo:
2017-06-13 10:28:03,973 WARN [http-apr-8085-exec-12] [Dispatcher] Could not find action or result: /404.action?os_destination=/start.action
Method default for action userlogin is not allowed! - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)
at org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
at org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
Diagnosis
Cause 1: seraph-config.xml incompatibilities
- Login or Logout link from Bamboo show a blank page or 404 is received.
- Bamboo was recently upgrade from a version prior to 5.13.0.1 to a version above of that.
- New seraph-config.xml file was manually overwritten by one from an old Bamboo installation during the upgrade.
Cause 2: Incorrect URL
- seraph-config.xml is correct.
- Login and Logout links from Bamboo.
- The logs still report the error.
Cause
Cause 1: seraph-config.xml incompatibilities
There is a recent change in <bamboo-install>/atlassian-bamboo/WEB-INF/classes/seraph-config.xml
attributes, due to this change any customization in this file needs to be merged/migrated to the new file without overwriting the whole file. This problem happens when the seraph-config.xml is overwritten by an older version.
Cause 2: Incorrect URL
The error occurs when manually visiting <bamboo-url>/userlogin!default.action
by design. It's likely that a user (or an automated script / service) has a hardcoded link to the incorrect URL /userlogin!default.action
.
Resolution
Cause 1: seraph-config.xml incompatibilities
- Edit
<bamboo-install>/atlassian-bamboo/WEB-INF/classes/seraph-config.xml
Change all references of:
<param-value>/userlogin!default.action?os_destination=${originalurl}</param-value>
to:
<param-value>/userlogin!doDefault.action?os_destination=${originalurl}</param-value>
Restart Bamboo
For future upgrades, best practice is to re-apply customizations of the seraph-config.xml to the version of the file that comes with the new Bamboo version rather than replacing the entire file with the previous version.
Cause 2: Incorrect URL
Please ensure all bookmarks or automations are using the correct action: /userlogin!doDefault.action