Aled Sage created BROOKLYN-159:
----------------------------------

             Summary: RabbitMQ install fails (due to EPEL, and installing 
erlang)
                 Key: BROOKLYN-159
                 URL: https://issues.apache.org/jira/browse/BROOKLYN-159
             Project: Brooklyn
          Issue Type: Bug
    Affects Versions: 0.8.0-SNAPSHOT
            Reporter: Aled Sage


I am having problems installing RabbitMQ, getting different errors in different 
environments.

I'm guessing the fundamental reason is our EPEL install code no longer works 
with the artifacts being returned at 
http://download.fedoraproject.org/pub/epel/%s/%s/epel-release-%s.noarch.rpm

Running RabbitEc2LiveTest.test_CentOS_6_3 fails at launch (process not 
running), those the log shows a worrying error being logged during the install 
phase about epel (and thus erlang not being installed):

{noformat}
2015-07-31 17:20:18,842 DEBUG brooklyn.SSH [brooklyn-execmanager-eKbcLsct-9]: 
installing RabbitBrokerImpl{id=w8YMHVgl, amqpPort=5672}, initiating ssh on 
machine 
SshMachineLocation[ec2-54-161-158-113.compute-1.amazonaws.com:ec2-54-161-158-113.compute-1.amazonaws.com/
54.161.158.113:22@cArKA4GZ]: #!/bin/bash -e
 ; export 
INSTALL_DIR="/home/users/aled/brooklyn-managed-processes/installs/RabbitBroker_2.8.7"
 ; mkdir -p $INSTALL_DIR ; cd $INSTALL_DIR ; test -f BROOKLYN && exit 0 ; { 
which yum && ( if test "$UID" -eq 0; then ( yum -y update ca-certificates ); 
else sudo -E -n -S
 -- yum -y update ca-certificates; fi ) && ( if test "$UID" -eq 0; then ( rpm 
-Uvh 
http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
); else sudo -E -n -S -- rpm -Uvh 
http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.
noarch.rpm; fi ) ; } ; { { test -z `which zypper` && true ; } || { (( if test 
"$UID" -eq 0; then ( zypper --non-interactive addrepo 
http://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_11_SP3 
erlang_sles_11 ); else sudo -E -n -S -- zypper --non-int
eractive addrepo 
http://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_11_SP3 
erlang_sles_11; fi ) || true) && (( if test "$UID" -eq 0; then ( zypper 
--non-interactive addrepo 
http://download.opensuse.org/repositories/devel:/languages:/erlang/openSU
SE_11.4 erlang_suse_11 ); else sudo -E -n -S -- zypper --non-interactive 
addrepo 
http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_11.4
 erlang_suse_11; fi ) || true) && (( if test "$UID" -eq 0; then ( zypper 
--non-interactive addrepo http:/
/download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_12.3 
erlang_suse_12 ); else sudo -E -n -S -- zypper --non-interactive addrepo 
http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_12.3
 erlang_suse_12; fi ) || true) && (( i
f test "$UID" -eq 0; then ( zypper --non-interactive addrepo 
http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_13.1
 erlang_suse_13 ); else sudo -E -n -S -- zypper --non-interactive addrepo 
http://download.opensuse.org/repositories/devel:/la
nguages:/erlang/openSUSE_13.1 erlang_suse_13; fi ) || true) ; } ; } ; ( { which 
zypper && { echo zypper exists, doing refresh && (( if test "$UID" -eq 0; then 
( zypper --non-interactive --no-gpg-checks refresh ); else sudo -E -n -S -- 
zypper --non-interactive --no-g
pg-checks refresh; fi ) || true) && ( if test "$UID" -eq 0; then ( zypper 
--non-interactive --no-gpg-checks install erlang ); else sudo -E -n -S -- 
zypper --non-interactive --no-gpg-checks install erlang; fi ) ; } ; } || { 
which apt-get && { echo apt-get exists, doi
ng update && export DEBIAN_FRONTEND=noninteractive && (( if test "$UID" -eq 0; 
then ( apt-get update ); else sudo -E -n -S -- apt-get update; fi ) || true) && 
( if test "$UID" -eq 0; then ( apt-get install -y --allow-unauthenticated 
erlang-nox erlang-dev ); else sud
o -E -n -S -- apt-get install -y --allow-unauthenticated erlang-nox erlang-dev; 
fi ) ; } ; } || { which yum && { echo yum exists, doing update && (( if test 
"$UID" -eq 0; then ( yum check-update ); else sudo -E -n -S -- yum 
check-update; fi ) || true) && (( if test 
"$UID" -eq 0; then ( yum -y install epel-release ); else sudo -E -n -S -- yum 
-y install epel-release; fi ) || true) && ( if test "$UID" -eq 0; then ( yum -y 
--nogpgcheck install erlang ); else sudo -E -n -S -- yum -y --nogpgcheck 
install erlang; fi ) ; } ; } || { w
hich brew && brew install erlang ; } || { which port && ( if test "$UID" -eq 0; 
then ( port install erlang@R15B+ssl ); else sudo -E -n -S -- port install 
erlang@R15B+ssl; fi ) ; } || (( echo "WARNING: no known/successful package 
manager to install erlang, may fail s
ubsequently" | tee /dev/stderr ) || true) ) ; { which curl || ( { which zypper 
&& { echo zypper exists, doing refresh && (( if test "$UID" -eq 0; then ( 
zypper --non-interactive --no-gpg-checks refresh ); else sudo -E -n -S -- 
zypper --non-interactive --no-gpg-check
s refresh; fi ) || true) && ( if test "$UID" -eq 0; then ( zypper 
--non-interactive --no-gpg-checks install curl ); else sudo -E -n -S -- zypper 
--non-interactive --no-gpg-checks install curl; fi ) ; } ; } || { which apt-get 
&& { echo apt-get exists, doing update &&
 export DEBIAN_FRONTEND=noninteractive && (( if test "$UID" -eq 0; then ( 
apt-get update ); else sudo -E -n -S -- apt-get update; fi ) || true) && ( if 
test "$UID" -eq 0; then ( apt-get install -y --allow-unauthenticated curl ); 
else sudo -E -n -S -- apt-get install
 -y --allow-unauthenticated curl; fi ) ; } ; } || { which yum && { echo yum 
exists, doing update && (( if test "$UID" -eq 0; then ( yum check-update ); 
else sudo -E -n -S -- yum check-update; fi ) || true) && (( if test "$UID" -eq 
0; then ( yum -y install epel-relea
se ); else sudo -E -n -S -- yum -y install epel-release; fi ) || true) && ( if 
test "$UID" -eq 0; then ( yum -y --nogpgcheck install curl ); else sudo -E -n 
-S -- yum -y --nogpgcheck install curl; fi ) ; } ; } || { which brew && brew 
install curl ; } || { which port
 && ( if test "$UID" -eq 0; then ( port install curl ); else sudo -E -n -S -- 
port install curl; fi ) ; } || (( echo "WARNING: no known/successful package 
manager to install curl, may fail subsequently" | tee /dev/stderr ) || true) ) 
; } ; { ( curl -f -L -k --retry 
10 --keepalive-time 30 --speed-time 30 
"file://$HOME/.brooklyn/repository/RabbitBroker/2.8.7/rabbitmq-server-generic-unix-2.8.7.tar.gz"
 -o rabbitmq-server-generic-unix-2.8.7.tar.gz || curl -f -L -k --retry 10 
--keepalive-time 30 --speed-time 30 "http://www.rabbitmq.
com/releases/rabbitmq-server/v2.8.7/rabbitmq-server-generic-unix-2.8.7.tar.gz" 
-o rabbitmq-server-generic-unix-2.8.7.tar.gz || curl -f -L -k --retry 10 
--keepalive-time 30 --speed-time 30 
"http://downloads.cloudsoftcorp.com/brooklyn/repository/RabbitBroker/2.8.7/rab
bitmq-server-generic-unix-2.8.7.tar.gz" -o 
rabbitmq-server-generic-unix-2.8.7.tar.gz ) || { ( echo "Could not retrieve 
rabbitmq-server-generic-unix-2.8.7.tar.gz. Tried: 
file://\$HOME/.brooklyn/repository/RabbitBroker/2.8.7/rabbitmq-server-generic-unix-2.8.7.tar.gz,
 
http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.7/rabbitmq-server-generic-unix-2.8.7.tar.gz,
 
http://downloads.cloudsoftcorp.com/brooklyn/repository/RabbitBroker/2.8.7/rabbitmq-server-generic-unix-2.8.7.tar.gz";
 | tee /dev/stderr ) && exit 9 ; } ; } ; { which ta
r || ( { which zypper && { echo zypper exists, doing refresh && (( if test 
"$UID" -eq 0; then ( zypper --non-interactive --no-gpg-checks refresh ); else 
sudo -E -n -S -- zypper --non-interactive --no-gpg-checks refresh; fi ) || 
true) && ( if test "$UID" -eq 0; then 
( zypper --non-interactive --no-gpg-checks install tar ); else sudo -E -n -S -- 
zypper --non-interactive --no-gpg-checks install tar; fi ) ; } ; } || { which 
apt-get && { echo apt-get exists, doing update && export 
DEBIAN_FRONTEND=noninteractive && (( if test "$UID"
 -eq 0; then ( apt-get update ); else sudo -E -n -S -- apt-get update; fi ) || 
true) && ( if test "$UID" -eq 0; then ( apt-get install -y 
--allow-unauthenticated tar ); else sudo -E -n -S -- apt-get install -y 
--allow-unauthenticated tar; fi ) ; } ; } || { which yum
 && { echo yum exists, doing update && (( if test "$UID" -eq 0; then ( yum 
check-update ); else sudo -E -n -S -- yum check-update; fi ) || true) && (( if 
test "$UID" -eq 0; then ( yum -y install epel-release ); else sudo -E -n -S -- 
yum -y install epel-release; fi )
 || true) && ( if test "$UID" -eq 0; then ( yum -y --nogpgcheck install tar ); 
else sudo -E -n -S -- yum -y --nogpgcheck install tar; fi ) ; } ; } || { which 
brew && brew install tar ; } || { which port && ( if test "$UID" -eq 0; then ( 
port install tar ); else sudo
 -E -n -S -- port install tar; fi ) ; } || (( echo "WARNING: no 
known/successful package manager to install tar, may fail subsequently" | tee 
/dev/stderr ) || true) ) ; } ; tar xvzf 
rabbitmq-server-generic-unix-2.8.7.tar.gz ; date > $INSTALL_DIR/BROOKLYN
2015-07-31 17:20:18,843 DEBUG b.l.basic.SshMachineLocation 
[brooklyn-execmanager-eKbcLsct-9]: 
brooklyn.location.basic.SshMachineLocation$5@cfa3b82 building ssh pool for 
ec2-54-161-158-113.compute-1.amazonaws.com:22 with properties: {port=22, env={}}
2015-07-31 17:20:18,845 WARN  net.schmizz.sshj.DefaultConfig 
[brooklyn-execmanager-eKbcLsct-9]: Disabling high-strength ciphers: cipher 
strengths apparently limited by JCE policy
2015-07-31 17:20:19,721 DEBUG brooklyn.util.pool.BasicPool 
[brooklyn-execmanager-eKbcLsct-9]: 
BasicPool{name=Pool(ec2-54-161-158-113.compute-1.amazonaws....@ec2-54-161-158-113.compute-1.amazonaws.com/54.161.158.113:22:hash5823094)}
 acquired and returning new entry a
[email protected]:22 (currentLeased=1; 
totalLeased=1; totalCreated=1; totalClosed=0)
2015-07-31 17:20:21,850 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] /usr/bin/yum
2015-07-31 17:20:21,850 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loaded plugins: 
fastestmirror, presto
2015-07-31 17:20:21,850 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loading mirror 
speeds from cached hostfile
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] /usr/bin/yum
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] Error: Cannot 
retrieve metalink for repository: epel. Please verify its path and try again
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] yum exists, doing 
update
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] which: no zypper 
in 
(/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/users/aled/bin)
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loaded plugins: 
fastestmirror, presto
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] which: no zypper 
in 
(/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/users/aled/bin)
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loading mirror 
speeds from cached hostfile
2015-07-31 17:20:22,854 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] which: no apt-get 
in 
(/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/users/aled/bin)
2015-07-31 17:20:23,857 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] Error: Cannot 
retrieve metalink for repository: epel. Please verify its path and try again
2015-07-31 17:20:23,857 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loaded plugins: 
fastestmirror, presto
2015-07-31 17:20:23,858 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] Error: Cannot 
retrieve metalink for repository: epel. Please verify its path and try again
2015-07-31 17:20:23,858 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loading mirror 
speeds from cached hostfile
2015-07-31 17:20:24,861 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] Error: Cannot 
retrieve metalink for repository: epel. Please verify its path and try again
2015-07-31 17:20:24,861 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loaded plugins: 
fastestmirror, presto
2015-07-31 17:20:24,862 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] which: no brew in 
(/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/users/aled/bin)
2015-07-31 17:20:24,862 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] Loading mirror 
speeds from cached hostfile
2015-07-31 17:20:24,862 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] which: no port in 
(/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/users/aled/bin)
2015-07-31 17:20:24,862 DEBUG brooklyn.SSH [Thread-44]: 
[[email protected]:stdout] WARNING: no 
known/successful package manager to install erlang, may fail subsequently
2015-07-31 17:20:24,862 DEBUG brooklyn.SSH [Thread-45]: 
[[email protected]:stderr] WARNING: no 
known/successful package manager to install erlang, may fail subsequently
{noformat}

Running in Numergy, the install phase fails for epel reasons:

{noformat}
STDERR
warning: /var/tmp/rpm-tmp.5NAY9I: Header V3 DSA/SHA1 Signature, key ID 
217521f6: NOKEY
        package epel-release-6-8.noarch (which is newer than 
epel-release-5-4.noarch) is already installed


STDOUT
/usr/bin/yum
Loaded plugins: fastestmirror
Determining fastest mirrors
 * epel: mirrors.ircam.fr
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package ca-certificates.noarch 0:2014.1.98-65.0.el6_5 will be updated
---> Package ca-certificates.noarch 0:2015.2.4-65.0.1.el6_6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package              Arch        Version                    Repository    Size
================================================================================
Updating:
 ca-certificates      noarch      2015.2.4-65.0.1.el6_6      updates      1.3 M
Transaction Summary
================================================================================
Upgrade       1 Package(s)
Total download size: 1.3 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : ca-certificates-2015.2.4-65.0.1.el6_6.noarch                 1/2
  Cleanup    : ca-certificates-2014.1.98-65.0.el6_5.noarch                  2/2
  Verifying  : ca-certificates-2015.2.4-65.0.1.el6_6.noarch                 1/2
  Verifying  : ca-certificates-2014.1.98-65.0.el6_5.noarch                  2/2
Updated:
  ca-certificates.noarch 0:2015.2.4-65.0.1.el6_6
Complete!
Retrieving 
http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
Preparing...                ##################################################
Executed 
/tmp/brooklyn-20150731-164343525-gbkT-installing_RabbitBrokerImpl_id.sh, result 
1: Execution failed, invalid result 1 for installing 
RabbitBrokerImpl{id=i8agrLDk, amqpPort=5672}
{noformat}

Running in EC2 gives a similar error with ap-northeast-1/ami-d97a10d8 
(RightImage_CentOS_6.5_x64_v13.5.2.2_EBS):

{noformat}
STDERR
Repository epel is listed more than once in the configuration
        package epel-release-6-8.noarch is already installed


STDOUT
/usr/bin/yum
Loaded plugins: security
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package ca-certificates.noarch 0:2013.1.94-65.0.el6 will be updated
---> Package ca-certificates.noarch 0:2015.2.4-65.0.1.el6_6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package              Arch        Version                    Repository    Size
================================================================================
Updating:
 ca-certificates      noarch      2015.2.4-65.0.1.el6_6      updates      1.3 M
Transaction Summary
================================================================================
Upgrade       1 Package(s)
Total download size: 1.3 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : ca-certificates-2015.2.4-65.0.1.el6_6.noarch                 1/2
  Cleanup    : ca-certificates-2013.1.94-65.0.el6.noarch                    2/2
  Verifying  : ca-certificates-2015.2.4-65.0.1.el6_6.noarch                 1/2
  Verifying  : ca-certificates-2013.1.94-65.0.el6.noarch                    2/2
Updated:
  ca-certificates.noarch 0:2015.2.4-65.0.1.el6_6
Complete!
Retrieving 
http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Preparing...                ##################################################
Executed 
/tmp/brooklyn-20150731-170955483-HRr3-installing_RabbitBrokerImpl_id.sh, result 
1: Execution failed, invalid result 1 for installing 
RabbitBrokerImpl{id=SoHOvr9l, amqpPort=5672}
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to