Bamboo Server 6.4.0 Task "Deploy Tomcat Application" deploying to Tomcat 9.0.10 fails
Asked by Michael Benz:

When trying to deploy a WAR file to a Tomcat 9.0.10 instance using the "Deploy Tomcat Application" task this fails because it seems the paths for specific endpoints have changed.

```
Trying?to?retrieve?Tomcat?details?from?http://tomcat.host:3237/manager//text/serverinfoServer?info?returned?status?code:?403Try?likely?variations?of?Tomcat?manager?location.Trying?to?retrieve?Tomcat?details?from?http://tomcat-host:3237/manager//serverinfoServer?info?returned?status?code:?404Could?not?detect?Tomcat?version?from?server?info,?trusting?configuration?of?Tomcat?7?or?greater
Could not deploy application: Daten?bergabe unterbrochen (broken pipe) (Write failed)
java.net.SocketException: Daten?bergabe unterbrochen (broken pipe) (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
(... rest of stacktrace ...)
```

Since the Bamboo Server instance has not been upgraded it might be as simple as upgrading to a newer version - but I have not seen any announcements in the release notes up to 6.10 (without browsing through all the collapsed issue lists).

If I directly open the links e.g. /manager//serverinfo with the reported 404 Tomcat itself gives the explanation that the links have changed:

```
The page you tried to access (/manager//serverinfo) does not exist.

The Manager application has been re-structured for Tomcat 7 onwards and some of URLs have changed. All URLs used to access the Manager application should now start with one of the following options:

/manager/html for the HTML GUI
/manager/text for the text interface
/manager/jmxproxy for the JMX proxy
/manager/status for the status pages

Note that the URL for the text interface has changed from "/manager" to "/manager/text".
```


Answers:
author: Michael Benz
body: The missing Tomcat role "manager-script" in the tomcat-users.xml file that was also not assigned to the user was the problem. Not a problem with the Bamboo task "Deploy Tomcat Application"  

Also the manager URL should be entered without the trailing slashes as the placeholder / help next to the field indicates. But that is just cosmetics and makes the logs look wierd with the duplicate slashes //.


author: Gonchik Tsymzhitov
body: Hi!

Why do you want to install on Tomcat 9?

I have upgraded to 6.10 everything works well to me. Just curious, what kind of opportunity I can earn if I use the war installation.

comments: author: Michael Benz
body: I want to DEPLOY a war file to a Tomcat 9.0.10 application server from my Bamboo Server 6.4.0 installation which currently fails.

Since this is a fairly old version of Bamboo Server (from 21 February 2018) I was wondering if I just missed something in the releasenotes up until the newest version 6.10 which would explain this behaviour. I have opened a ticket and Atlassian support is already investigating. Maybe cranking up the debug level shows the real problem ... currently the only indicators that I get from the deploy log is that outdated URLs are queried for information. (and that last time this happened the URL scheme might have been changed when Tomcat 7 came around:

```
Could?not?detect?Tomcat?version?from?server?info,?trusting?configuration?of?Tomcat?7?or?greater
```


Tags: deployment

tomcat