UIT The arctic university of Norway > Giellatekno


In case of emergencies...

This document deals with restarting httpd services on gtoahpa.uit.no, 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.

The list of Oahpas on gtoahpa as of 07.06.2016:

Oahpa name Language URL
crk_oahpa Plains Cree oahpa.no/nehiyawetan
fkv_oahpa Kven oahpa.no/kveeni
hdn_oahpa Northern Haida oahpa.no/hdn_oahpa
kpv_oahpa Komi Zyrian oahpa.no/kpvoahpa
myv_oahpa Erzya oahpa.no/erzya
rup_oahpa Aromanian oahpa.no/armaneshte
sjd_oahpa Kildin Saami oahpa.no/kiilt
smaoahpa South Saami oahpa.no/aarjel
smn_oahpa Inari Saami oahpa.no/aanaar
sms_oahpa Skolt Saami oahpa.no/nuorti
univ_oahpa North Saami oahpa.no/davvi
yrk_oahpa Tundra Nenets oahpa.no/yrkoahpa

In addition, rus_oahpa and udm_oahpa are here as folders, but they are still not operative on gtoahpa. The operative versions are on gtlab, http://testing.oahpa.no/rus_oahpa and http://testing.oahpa.no/rus_oahpa.

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 oahpa.no/konteaksta 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 ./run_fastcgi.sh

The system may return an error message, along the lines of run_fastcgi.sh:line 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 run_fstcgi.sh, you are fine.

If running of the script results in error:

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

then the process id saved in the file fastcgi.pid 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 fastcgi.pid and run the script run_fastcgi.sh 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