Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Restart Tomcat and Troubleshooting Tomcat Applications

Adam Wead edited this page Nov 14, 2018 · 1 revision

To restart tomcat:

sudo service tomcat restart

If the restart fails look for existing pid and lock files

ps -ef | grep catalina
ll /var/run/tomcat.pid
ll /var/lock/subsys/tomcat

Remove files and restart

sudo rm /var/run/tomcat.pid /var/lock/subsys/tomcat
sudo service tomcat restart

If solr still will not restart because of a org.apache.solr.common.SolrException: Index locked for write for core

   cd /opt/heracles/solr
   find . -name \*lock
   sudo rm ./SSqaSolr4/collection1/data/index/write.lock
   sudo /etc/init.d/tomcat restart

If Fedora 4 will not start and /var/log/tomcat/catalina.out shows: Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: lock /opt/heracles/fedora/SSdemoFedora4/fcrepo.ispn.repo.CacheDirPath/dataFedoraRepository/LOCK: Resource temporarily unavailable Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: lock /opt/heracles/fedora/SSdemoFedora4/fcrepo.ispn.repo.CacheDirPath/dataFedoraRepository/LOCK: Resource temporarily unavailable

#Find these lock files
cd /opt/heracles/fedora/
find . -name \*LOCK
find . -name \*lock

# Remove these lock files:
find /opt/heracles/fedora/ -name \*lock -exec rm {} \;
find /opt/heracles/fedora/ -name \*LOCK -exec rm {} \;
Clone this wiki locally