In case of emergencies...

This document deals with restarting httpd services on, i.e. the oahpa versions and NDS dictionaries on gtoahpa.

For the other virtual machines, see Restarting gtweb and Restarting gtlab

On gtoahpa, gtweb and gtlab, we use nginx for serving HTML and other applications. See how to restart nginx itself if needed (after an ordinary update it is not needed).

Restarting the dictionaries on gtoahpa

Log in to gtoahpa, log in as neahtta, go to /home/neahtta/neahtta and issue:

fab sanit restart_service
fab baakoeh restart_service

Restarting Oahpa versions on gtoahpa

Log in to gtoahpa.

Some Oahpa versions are on gtoahpa, others are on gtlab. To find which versions are on gtoahpa, write ls /home/|grep oahpa.

NOTE:We are now in the process of moving most of these to gtoahpa-01. Contact Cip or Chiara on issues concerning these.

Oahpas on gtoahpa:

The following is the list of Oahpas on gtoahpa as of 28.11.2018:

Oahpa name Language URL Comments
crk_oahpa Plains Cree  
fkv_oahpa Kven  
hdn_oahpa Northern Haida  
kpv_oahpa Komi Zyrian  
myv_oahpa Erzya   Should be online 3.-8.12.
univ_oahpa North Saami  
yrk_oahpa Tundra Nenets  
rus_oahpa Russian  
udm_oahpa Udmurt   Restarted (note address)

Oahpas on gtoahpa-01:

The folowing is the list of oahpas already moved to gtoahpa-01:

Oahpa name Language URL
sjd_oahpa Kildin Saami
sma_oahpa South Saami
smn_oahpa Inari Saami
sms_oahpa Skolt Saami

Restarting on the old gtoahpa:

Once an Oahpa version is down, it must be restarted. Write (anywhere on the system)

 sudo service OAHPANAME restart

where OAHPANAME is the relevant Oahpa version (crk_oahpa, fkv_oahpa etc).

If only an Oahpa version has been down, this is enough. If the server has been totally down, you may need to start more. Here is the full list of services that should be started, in this order (there are dependencies between them):

  1. mysqld
  2. nginx
  3. php-fpm
  4. lookupserv

For each of the processes listed, issue (anywhere on the system) the command

    sudo service NAME restart

Thus, sudo service mysqld restart, etc.

After that, run all the Oahpa restarting commands:

sudo service crk_oahpa restart


Restarting Konteaksta

Konteaksta is running on the Tomcat web server. After upgrade of gtoahpa, as well as adding new components to Konteaksta, it is always recommended to restart Konteaksta (the script compiles the Konteaksta source code, redeploys it on Tomcat and restarts Tomcat). Restarting Konteaksta is also the first thing to try if the url gives "server error", e.g. "The page you are looking for is temporarily unavailable. Please try again later.".

To restart Konteaksta:

Log in to gtoahpa and issue the command:

    sudo service konteaksta restart 

Restarting oahpas the hard way, without the service script

There is an init.d script for restarting each oahpa instance, with a reference to the respective oahpa home catalogue, so they may thus be restarted via the service command, with the usual subcommands: restart, stop, start.

In case the sudo service etc. does not work, here is another option (we recommend you try the sudo service etc. first):

Go to the catalogue /home/fkv_oahpa/fkv_oahpa (and correspondingly for the other oahpa versions). Each Oahpa instance has a script in its root directory,

, which stores a PID to a file to halt old fastcgi processes related to this Oahpa and start new ones. Write:

 sudo ./

The system may return an error message, along the lines of 1:#!/bin/bash:Ingen slik fil eller filkatalog, but that is not relevant. As long as you are in the right catalogue and the system finds the file, you are fine.

If running of the script results in error:

    ./ line 10: kill: (332) - Ingen slik prosess

then the process id saved in the file is wrong. In such a case you need to change the file. The command

    ps -ef | grep 'fkv_oahpa'

gives you a list of all fastcgi processes related to fkv_oahpa. There should be 6 processes for each oahpa. Check the time when the first process was started (the process that generates the remaining 5 processes). Write the PID of the process into the file and run the script again.

PHP applications, Wordpress in our case, are managed by a global server process, php-fpm. To restart this process:

	sudo service php-fpm restart