Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-16043

[MavenUtils] Failed to get Maven version, command timed out

      Replicate issue

      1. Download and Install CentOS 7.1 1503 x86_64
      2. under "/etc/yum.repos.d/" you should have the following .repo files by default (repos.zip)
      3. install Maven and check version
        [root@localhost service]# yum -y install maven-local apache-parent maven-plugin-bundle
        
        [root@localhost service]# which mvn
        /usr/bin/mvn
        
        [root@localhost service]# ls -l /usr/bin/mvn
        -rwxr-xr-x. 1 root root 219 Jun  9  2014 /usr/bin/mvn
        
        [root@localhost service]# ls -l /usr/share/maven
        total 4
        drwxr-xr-x. 2 root root   58 Jun 17 17:56 bin
        drwxr-xr-x. 2 root root   35 Jun 17 17:56 boot
        drwxr-xr-x. 2 root root   25 Jun 17 17:56 conf
        drwxr-xr-x. 3 root root 4096 Jun 17 17:56 lib
        
        [root@localhost ~]# /usr/bin/mvn --version
        Apache Maven 3.0.5 (Red Hat 3.0.5-16)
        Maven home: /usr/share/maven
        Java version: 1.8.0_45, vendor: Oracle Corporation
        Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-30.b13.el7_1.x86_64/jre
        Default locale: en_US, platform encoding: ANSI_X3.4-1968
        OS name: "linux", version: "3.10.0-229.el7.x86_64", arch: "amd64", family: "unix"
        
      4. configure Java to 1.8
        [root@localhost ~]# alternatives --config java
        
        [root@localhost ~]# java -version
        openjdk version "1.8.0_45"
        OpenJDK Runtime Environment (build 1.8.0_45-b13)
        OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
        
      5. open Bamboo connector port (8085)
        [root@localhost ~]# firewall-cmd --add-port=8085/tcp
        [root@localhost ~]# firewall-cmd --permanent --add-port=8090/tcp
        
        [root@localhost ~]# iptables -n -L
        ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8085 ctstate NEW
        
      6. install wget
        [root@localhost ~]# yum -y install wget
        
      7. download Bamboo and install Bamboo
        [root@localhost ~]# cd /opt
        
        # create directory to Bamboo service
        [root@localhost ~]# mkdir /opt/service
        
        # create directory to Bamboo home
        [root@localhost ~]# mkdir /opt/home
        
        [root@localhost ~]# cd /opt/service
        [root@localhost service]# wget https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-5.8.1.tar.gz
        
        # extract Bamboo
        [root@localhost service]# tar -zxvf atlassian-bamboo-5.8.1.tar.gz
        
        # set up Bamboo home directory
        [root@localhost service]# vi atlassian-bamboo-5.8.1/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties
        bamboo.home=/opt/home/bamboo-5.8.1
        
        # start Bamboo
        [root@localhost service]# cd atlassian-bamboo-5.8.1
        [root@localhost atlassian-bamboo-5.8.1]# ./bin/start-bamboo.sh
        
      8. logs from Bamboo while installation running catalina.out
        # in my example, I was not thrown with original issue raised as my Virtual Machine ran out of space before it happened.
        # however, you could be experiencing the following entry in the logs:
        
        2015-06-10 15:52:30,386 WARN [localhost-startStop-1] [MavenUtils] Failed to get Maven version, command timed out
        2015-06-10 15:52:30,390 WARN [localhost-startStop-1] [MavenUtils] Unable to get Maven version from /usr/bin/mvn
        
      9. extra information:
        [bamboo@localhost atlassian-bamboo-5.8.1]$ ps -AF | grep mvn | wc -l
        2117
        [bamboo@localhost atlassian-bamboo-5.8.1]$ px aux | grep bamboo
        ...
        bamboo    8902  0.0  0.0 113248   324 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8905  0.0  0.0 113248   328 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8908  0.0  0.0 113248   328 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8911  0.0  0.0 113248   328 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8914  0.0  0.0 113248   324 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8917  0.0  0.0 113248   324 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8920  0.0  0.0 113248   280 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8923  0.0  0.0 113248   324 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8926  0.0  0.0 113248   316 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8929  0.0  0.0 113248   324 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8932  0.0  0.0 113248   320 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8935  0.0  0.0 113248   292 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8938  0.0  0.0 113248   328 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8941  0.0  0.0 113248   320 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8944  0.0  0.0 113248   304 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8947  0.0  0.0 113248   316 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8950  0.0  0.0 113248   328 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8953  0.0  0.0 113248   316 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8956  0.0  0.0 113248   328 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        bamboo    8959  0.0  0.0 113248   324 pts/1    S    19:05   0:00 /bin/sh /usr/bin/mvn --version
        ...
        

      Workaround

      1. please, download Apache Maven 3.0.5
        # download Maven
        wget ftp://mirror.reverse.net/pub/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
        
      2. please, extract it under a directory (i.e.: /opt/maven)
        cd /opt/maven
        
        # extract Maven
        tar -zxvf apache-maven-3.0.5-bin.tar.gz
        
      3. please, set up M2_HOME environment variable
        export M2_HOME=/opt/maven/apache-maven-3.0.5
        
      4. please, add environment variable above to PATH
        export PATH=$M2_HOME/bin:$PATH
        
      5. please, run the following:
        mvn -version
        
        # command
        which mvn
        
        # response
        /opt/maven/apache-maven-3.0.5/bin/mvn
        

        1. catalina.out
          179 kB
        2. repos.zip
          4 kB

            [BAM-16043] [MavenUtils] Failed to get Maven version, command timed out

            No work has yet been logged on this issue.

              mgardias Marcin Gardias
              rsperafico Rafael Sperafico (Inactive)
              Affected customers:
              11 This affects my team
              Watchers:
              25 Start watching this issue

                Created:
                Updated:
                Resolved: