Warning Livedoc is no longer being updated and will be deprecated shortly. Please refer to https://documentation.tjhsst.edu.

Difference between revisions of "Www/Scripts"

From Livedoc - The Documentation Repository
Jump to: navigation, search
(Created page with "== What do do if the webserver goes down == * Log in to remote.tjhsst.edu (or if you're already on the internal network, that's fine too) * If you're on remote, <code>kinit us...")
 
(What do do if the webserver goes down)
Line 8: Line 8:
  
 
If this doesn't work, there are a few things you can try:
 
If this doesn't work, there are a few things you can try:
* pkill k5start
+
 
* pkill -9 k5start
+
<pre>
* pkill apache2
+
pkill k5start
* pkill -9 apache2
+
pkill -9 k5start
* pkill nginx
+
pkill apache2
* pkill -9 nginx
+
pkill -9 apache2
* service apache2 zap
+
pkill nginx
* service nginx zap
+
pkill -9 nginx
* service apache2 start
+
service apache2 zap
* service nginx start
+
service nginx zap
 +
service apache2 start
 +
service nginx start
 +
</pre>
  
 
This will make sure k5start/nginx/apache have actually been stopped (although possibly not cleanly) before restarting them. If this doesn't work, it's probably an issue with Kerberos / AFS -- make sure <code>/etc/krb5.keytab.www-data</code> exists and has the correct keys (<code>ktlist -K -k /etc/krb5.keytab.www-data</code>, you should see <code>www-data@CSL.TJHSST.EDU</code> listed at least once).
 
This will make sure k5start/nginx/apache have actually been stopped (although possibly not cleanly) before restarting them. If this doesn't work, it's probably an issue with Kerberos / AFS -- make sure <code>/etc/krb5.keytab.www-data</code> exists and has the correct keys (<code>ktlist -K -k /etc/krb5.keytab.www-data</code>, you should see <code>www-data@CSL.TJHSST.EDU</code> listed at least once).
  
 
If all of that doesn't work, it's most likely not a problem with the web server -- perhaps check AFS or Kerberos for issues that might be causing a web problem.
 
If all of that doesn't work, it's most likely not a problem with the web server -- perhaps check AFS or Kerberos for issues that might be causing a web problem.

Revision as of 10:06, 12 December 2016

What do do if the webserver goes down

  • Log in to remote.tjhsst.edu (or if you're already on the internal network, that's fine too)
  • If you're on remote, kinit username/root
  • ssh root@www
  • reload-webserver

This restarts nginx/Apache and ensures that the service manager is still in a consistent state. The website should work after this (if not, try clearing cache/etc, it's possible a redirect to an error page might've been cached, although it shouldn't be).

If this doesn't work, there are a few things you can try:

pkill k5start
pkill -9 k5start
pkill apache2
pkill -9 apache2
pkill nginx
pkill -9 nginx
service apache2 zap
service nginx zap
service apache2 start
service nginx start

This will make sure k5start/nginx/apache have actually been stopped (although possibly not cleanly) before restarting them. If this doesn't work, it's probably an issue with Kerberos / AFS -- make sure /etc/krb5.keytab.www-data exists and has the correct keys (ktlist -K -k /etc/krb5.keytab.www-data, you should see www-data@CSL.TJHSST.EDU listed at least once).

If all of that doesn't work, it's most likely not a problem with the web server -- perhaps check AFS or Kerberos for issues that might be causing a web problem.