Stopping and Starting the FOSSology job scheduler

It is sometimes necessary to stop or restart the FOSSology job scheduler. Although the FOSSology system is fairly robust and can handle an "emergency" stop, it is much better to shutdown the system in an orderly manner to avoid problems.

Stopping a running FOSSology Scheduler

  • To stop the scheduler issue this command
sudo /etc/init.d/fossology stop

On some systems you may also be able to use the command

sudo service fossology stop

To see if the scheduler is running use this command

ps -ef | grep fo_scheduler
  • If you are running a cluster of FOSSology agents, it is necessary to stop the scheduler first, as described above, before shutting down any agent systems. This allows all scheduled jobs to stop on the agents, and prevents FOSSology from scheduling any new jobs while the systems are shutting down.
  • It is also helpful to unmount all of the agent systems from the scheduler system before shutting down the scheduler system. To unmount all your filesystems
sudo umount -a

This will avoid any missing NFS mount problems.

  • Generally it is not necessary to stop the Postgres database, but if needed the PostgreSQL database can be stopped too
sudo /etc/init.d/postgresql stop

Note: this command may vary depending on the version of PostgreSQL installed

  • At this point, the FOSSology scheduler should be completely stopped. You can also check the scheduler log, typically in ''/var/log/fossology/fossology.log'' and look for a log message such as this:
2013-05-07 15:23:20 scheduler [22225] :: NOTE: *****************************************************************
2013-05-07 15:23:20 scheduler [22225] :: NOTE: ***                FOSSology scheduler closed                 ***
2013-05-07 15:23:20 scheduler [22225] :: NOTE: ***        pid:     22226                                     ***
2013-05-07 15:23:20 scheduler [22225] :: NOTE: *****************************************************************

Restarting the scheduler

The process for restarting the scheduler is generally the reverse of the process for stopping it.

  • On multi-system clusters, first make sure that all agent systems are running, and all of the NFS cross-mounts are present on all agents and the scheduler.
  • If the PostgreSQL database server was stopped, be sure to re-start it. Typically this can be done with
sudo /etc/init.d/postgresql start

You can also check that the postgresql server process is running with

ps -ef | grep postgres
  • Start the scheduler. This is typically accomplished with
sudo /etc/init.d/fossology start
  • Check the FOSSology scheduler log (/var/log/fossology/fossology.log) to ensure that all agents started successfully. Errors have the word ERROR in the message, like
    2013-05-07 15:27:11 scheduler [13586] :: JOB[-3].copyright[13603.localhost]: "ERROR main.c.643: Could not alter pfile_
    fk in copyright table."

Verifying Basic Operations

The simplest way to verify that your FOSSology system is running properly is to navigate to the web UI, upload a small file, and run an analysis on it. If the analysis completes and you see results, then everything is probably working OK.