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.
STARTUP: first Solr, then PostgreSQL, last NDEx (Tomcat).
SHUTDOWN: first NDEx (Tomcat), then Solr and/or PostgreSQL
In case it is necessary to restart (bounce) the NDEx service you can do so by following these instructions.
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
If the Tomcat process didn't shutdown properly, kill it manually by specifying its process ID.
Restart the NDEx service (Tomcat server) as user "ndex":
sudo su – ndex –s /bin/bash
cd /opt/ndex/tomcat/bin
./startup.sh
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).
sudo service httpd restart
sudo su - postgres pg_ctl -D /var/lib/pgsql95/data -l logfile restart
sudo su - qengine
kill
cd /opt/ndex/query_engine/ndex-server2-query
nohup python -m app.api 8282 &
If you need to migrate the database from an old NDEx v1.3 to the newer NDEx v2.0, please CONTACT US!
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.
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
Shutdown the SOLR server:
/opt/ndex/solr/bin/solr stop
To cleanup the old SOLR indexes, go to directory:
/opt/ndex/solr/server/solr
Go to the directory where NDEx web service was deployed by Tomcat using this command:
cd /opt/ndex/tomcat/webapps/ndexbio-rest/WEB-INF/
Define the ndex environment variable using:
export ndexConfigurationPath=/opt/ndex/conf/ndex.properties
Rebuild the SOLR index using NDEx
java -classpath lib/*:../../../lib/* org.ndexbio.common.solr.ReIndexer all >/tmp/log
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