tranSMART-Foundation / transmart

tranSMART is a knowledge management platform that enables scientists to develop and refine research hypotheses by investigating correlations between genetic and phenotypic data, and assessing their analytical results in the context of published literature and other work. http://transmartfoundation.org/
5 stars 3 forks source link

Issue installing Release 19.0 #22

Open christianhuth opened 3 years ago

christianhuth commented 3 years ago

When installing transmart from the artifacts of the release 19.0 i receive the following error when installing groovy:

make: Entering directory '/home/transmart/transmart/transmart-data/env'
unzip -q groovy-binary-2.4.3.zip
[groovy-binary-2.4.3.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of groovy-binary-2.4.3.zip or
        groovy-binary-2.4.3.zip.zip, and cannot find groovy-binary-2.4.3.zip.ZIP, period.
make: *** [Makefile:75: groovy-2.4.3/bin/groovy] Error 9

Minimum Steps to reproduce:

curl http://library.transmartfoundation.org/release/release19_0_0_artifacts/Scripts-release-19.0.zip -o Scripts-release-19.0.zip
unzip Scripts-release-19.0.zip
./Scripts/install-ubuntu18/InstallTransmart.sh 2>&1 | tee ~/install.log

Reason: Download-Path for groovy-binary as defined in transmart-data/env/Makefile (Line 21)

GROOVY_URL=http://dl.bintray.com/groovy/maven/$(GROOVY_ZIP)

which gives http://dl.bintray.com/groovy/maven/groovy-binary-2.4.3.zip is forbidden.

christianhuth commented 3 years ago

Solution:

  1. Use new GROOVY_URL as given in https://github.com/tranSMART-Foundation/transmart/blob/master/transmart-data/env/Makefile#L32

    GROOVY_URL=https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/$(GROOVY_ZIP)

    or the Central Maven Repository under https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-binary/

    GROOVY_URL=https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-binary/2.4.3/$(GROOVY_ZIP)
  2. delete corrupted groovy-binary

    rm transmart-data/env/groovy-binary-2.4.3.zip
  3. Rerun install-script:

    ./Scripts/install-ubuntu18/InstallTransmart.sh 2>&1 | tee ~/install.log
christianhuth commented 3 years ago

A new issue appeared during the execution of the install script:

Check on loading and setup of postgres
---------------------------------------
|  Checking for PostgreSQL basics:
|    are PostgreSQL and psql installed;
|    is PostgreSQL running.
---------------------------------------
checking to see if PostgreSQL has been installed
psql ok
PostgreSQL appears to be installed
checking to see if PostgreSQL is running
PostgreSQL does not appear to be running; start it
  with the command: sudo /etc/init.d/postgresql restart

But the PostgreSQL service is up and running:

sudo service postgresql status
● postgresql.service - PostgreSQL RDBMS
     Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
     Active: active (exited) since Mon 2021-07-26 17:48:45 CEST; 6min ago
    Process: 181372 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 181372 (code=exited, status=0/SUCCESS)

Jul 26 17:48:45 svm-ap-dizc41p systemd[1]: Starting PostgreSQL RDBMS...
Jul 26 17:48:45 svm-ap-dizc41p systemd[1]: Finished PostgreSQL RDBMS.
christianhuth commented 3 years ago

I did some deep-dive into the scripts and found the issue. The root of the problem lies in the way the following two scripts try to detect if postgres is up and running.

The two scripts when installing on ubuntu 18.04 - you might need other scripts if installing on other platforms:

The way they detect if PostgreSQL is up and running:

postgresRunning=$(ps aux | grep postgres | grep -v "grep" | grep "stats collector process")

Correct for my version of PostgreSQL (12.7) is:

postgresRunning=$(ps aux | grep postgres | grep -v "grep" | grep "stats collector")

After changing the line in both files the installation script passed.