LON-CAPA Network Processes Documentation

Scott Harrison

Last updated: 10/26/2000

Introduction

This file describes issues associated with the basic network layer of the LON-CAPA system. When upgrading, installing, or reconfiguring a LON-CAPA system, it is often necessary to stop and start the network processes so that the code they are running with is up-to-date.

There are also secondary network layers associated with the LON-CAPA system which are discussed elsewhere in the documentation. These include NFS, Appleshare, and Samba (Windows Network Neighborhood).

There are two basic levels of client-server processes associated with implementing the LON-CAPA network.

  1. Web level: LON-CAPA users communicate with the system through their web browser
  2. Server-to-server level: LON-CAPA machines communicate with other LON-CAPA machines

Description

The web level is implemented through a web server. LON-CAPA uses the Apache web server. The apache web server forks off daemon children (httpd) which handle client requests (http requests from web browsers on the internet). The more http requests, the more daemon children are made available.

LON-CAPA functionality is enabled in the web level through the use of mod_perl. mod_perl allows perl modules to be compiled once, and reside in memory in order to coordinate the interaction of http requests with services and resources provided by the LON-CAPA server machine.

The server-to-server level is implemented through forked system processes which communicate with the TCP/IP protocol. There are two types of children processes that LON-CAPA server machines maintain.

  1. lonc- proxy server processes, these allow a LON-CAPA machine to act as a client toward another machine
  2. lond- remote command interpreter, these respond to the proxy server processes to allow a LON-CAPA machine to act as a server toward another machine

Of course, it becomes exciting when information passed through the web level requires the server to retrieve data through the server-to-server (TCP/IP) level. This is handled by a perl module (loaded with mod_perl) that interfaces to lonc. This perl module is lonnet.pm.

Managing Network Processes the Normal Way (/etc/rc.d/init.d)


Log in as root.
To stop the web level: /etc/rc.d/init.d/httpd stop
To start the web level: /etc/rc.d/init.d/httpd start
To restart the web level: /etc/rc.d/init.d/httpd restart
To look at the status of the web level: /etc/rc.d/init.d/httpd status
To stop the server-to-server and web level: /etc/rc.d/init.d/loncontrol stop
To start the server-to-server and web level: /etc/rc.d/init.d/loncontrol start
To restart the server-to-server and web level: /etc/rc.d/init.d/loncontrol restart
To look at the status of the server-to-server and web level: /etc/rc.d/init.d/loncontrol status

Managing Network Processes the Dirty Way (killing pids directly)

Log in as www. Do not enter these commands as root.
To stop the server-to-server level: kill `cat /home/httpd/perl/logs/*.pid`
To start the server-to-server level: /home/httpd/perl/loncron
To restart the server-to-server level: kill `cat /home/httpd/perl/logs/*.pid`; /home/httpd/perl/loncron
To look at the status of the server-to-server level: ps auxwww | grep lonc; ps auxwww | grep lond