NDEx Server Update and Maintenance

Overview

This document provides instructions to perform NDEx server updates and maintenance. All the following instructions assume that NDEx was installed in the default directory. If you have customized your local server installation, you will need to modify these instructions to match your operating environment.

Dependencies

STARTUP: first Solr, then PostgreSQL, last NDEx (Tomcat).

SHUTDOWN: first NDEx (Tomcat), then Solr and/or PostgreSQL




Bouncing an NDEx Server

In case it is necessary to restart (bounce) the NDEx service you can do so by following these instructions.

  • Please note that by NDEx service we mean the Tomcat server.
  • When bouncing the Tomcat server, it is not necessary to also bounce the Solr server. Instructions to bounce the Solr Server are described later int this document.
STEP 1.

Shutdown your old NDEx service (Tomcat server):

sudo su – ndex –s /bin/bash
cd /opt/ndex/tomcat/bin
./shutdown.sh

*** Note: verify that the NDEx server has actually stopped before proceeding with the next step. To verify that the Tomcat process is shutdown, use the following command:

ps –ef | grep tomcat
STEP 2.

If the Tomcat process didn't shutdown properly, kill it manually by specifying its process ID.

STEP 3.

Restart the NDEx service (Tomcat server) as user "ndex":

sudo su – ndex –s /bin/bash
cd /opt/ndex/tomcat/bin
./startup.sh

Bouncing the Solr Server

If you need to bounce the Solr server, please use the following commands:

sudo su - ndex
cd /opt/ndex/solr
bin/solr stop
bin/solr start

Wait about 10 min so that the Solr server can load all the indexes. Once all the Solr collections have been loaded, you can start the NDEx service (Tomcat server).

Bouncing the Apache Server

sudo service httpd restart
            

Bouncing the PostgreSQL Server

 sudo su - postgres 
            pg_ctl -D /var/lib/pgsql95/data -l logfile restart
            

Bouncing the Query Engine

 sudo su - qengine
kill 
cd /opt/ndex/query_engine/ndex-server2-query
nohup python -m app.api 8282 &

Database migration

If you need to migrate the database from an old NDEx v1.3 to the newer NDEx v2.0, please CONTACT US!

Rebuilding the SOLR index

The following procedure is used to rebuild the SOLR index. This procedure can be used if the SOLR index gets corrupted or if the indexing schema is changed. This procedure is NOT necessary after a database migration as the migration process also takes care of rebuilding the index.

STEP 1.

Shutdown the NDEx service (Tomcat server):

sudo su – ndex –s /bin/bash
cd /opt/ndex/tomcat/bin
./shutdown.sh

Note: verify that the NDEx server has actually stopped before proceeding with the next step.

To verify that the Tomcat process is shutdown, use the following command:

ps –ef | grep tomcat
STEP 2.

Shutdown the SOLR server:

/opt/ndex/solr/bin/solr stop
STEP 3.

To cleanup the old SOLR indexes, go to directory:

/opt/ndex/solr/server/solr
  1. Remove all directories that looks like a UUID (for example: "53b0602f-6194-11e5-8ac5-06603eb7f303").
  2. Remove the the directory called "index-networks".
STEP 4.

Go to the directory where NDEx web service was deployed by Tomcat using this command:

cd /opt/ndex/tomcat/webapps/ndexbio-rest/WEB-INF/
STEP 5.

Define the ndex environment variable using:

export ndexConfigurationPath=/opt/ndex/conf/ndex.properties
STEP 6.

Rebuild the SOLR index using NDEx

java -classpath lib/*:../../../lib/* org.ndexbio.common.solr.ReIndexer all >/tmp/log
STEP 7.

Once STEP 6 above is complete, you can start the NDEx service (Tomcat server):

sudo su – ndex –s /bin/bash
cd /opt/ndex/tomcat/bin
./startup.sh