Contents

  • Jive HTTPD
  • Jive HTTPD Networking
  • Jive HTTPD Log Files
  • Jive-Managed Applications
  • Jive Database Server
  • This document covers basic system-administration commands for managing the platform.

    Use the information here for tasks that an average system administrator would need to perform without familiarity of the actual functionality of the system. This guide assumes a basic understanding of common Unix or Linux commands and concepts. You'll find the application management commands mentioned here documented in Application Management Commands.

    For a higher-level look at the platform, be sure to see the Platform Overview.

    Jive HTTPD

    The Jive HTTPD service is the main access point for HTTP and HTTPS access to the Jive SBS system by web browser.

    Start Jive HTTPD

    To start the jive-httpd service, execute the following command as root:

    [root@biodome:~]$ /etc/init.d/jive-httpd start
    Starting jive-httpd:
    OK

    If the command completes successfully, an OK message will be printed to the console and the exit code of the command will be zero.

    Stop Jive HTTPD

    To stop the jive-httpd service, execute the following command as root:

    [root@biodome:~]$ /etc/init.d/jive-httpd stop
    Stopping jive-httpd: 
    OK

    If the command completes successfully, an OK message will be printed to the console and the exit code of the command will be zero.

    Monitoring Jive HTTPD

    The jive-httpd service supports a "status" command issued to the standard init script located at "/etc/init.d/jive-httpd". An example of checking the serivce status as the root user:

    [root@biodome:~]$ /etc/init.d/jive-httpd status
    JIVE_HOME set to /usr/local/jive
    Running: 2393 (2396, 2397)

    In the above example, the parent process of the jive-httpd system daemon is 2393, with child processes of 2396 and 2397.

    In addition to the status script, it is possible to check the status of the jive-httpd daemon using standard Unix commands. For example, the following ps command will list all jive-httpd processes running on the host:

    [root@biodome:~]$ ps -ef | grep jive-httpd | grep -v grep
    root      2393     1  0 14:41 ?        00:00:00 /usr/local/jive/httpd/bin/jive-httpd -f /usr/local/jive/etc/httpd/conf/httpd.conf -k start
    jive      2395  2393  0 14:41 ?        00:00:00 /usr/local/jive/httpd/bin/jive-httpd -f /usr/local/jive/etc/httpd/conf/httpd.conf -k start
    jive      2396  2393  0 14:41 ?        00:00:00 /usr/local/jive/httpd/bin/jive-httpd -f /usr/local/jive/etc/httpd/conf/httpd.conf -k start
    jive      2397  2393  0 14:41 ?        00:00:00 /usr/local/jive/httpd/bin/jive-httpd -f /usr/local/jive/etc/httpd/conf/httpd.conf -k start
    jive      2398  2393  0 14:41 ?        00:00:00 /usr/local/jive/httpd/bin/jive-httpd -f /usr/local/jive/etc/httpd/conf/httpd.conf -k start
    jive      2399  2393  0 14:41 ?        00:00:00 /usr/local/jive/httpd/bin/jive-httpd -f /usr/local/jive/etc/httpd/conf/httpd.conf -k start

    Jive HTTPD Networking

    The jive-httpd server by default listens for connections on port 80, on all available network interfaces. If configured for SSL (see the Operations Cookbook), the server will also listen for connections on port 443. The following commands will show if the jive-httpd service is listening on the designated ports.

    [root@melina ~]# lsof -n -i TCP:80 -i TCP:443
    COMMAND    PID USER   FD   TYPE DEVICE SIZE NODE NAME
    jive-http 3094 root    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3098 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3099 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3100 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3101 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3102 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3104 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3105 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3273 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3274 jive    3u  IPv6  30661       TCP *:http (LISTEN)
    jive-http 3275 jive    3u  IPv6  30661       TCP *:http (LISTEN)

    In the above example, multiple jive-httpd processes are providing the "http" service. If listening for SSL or TLS connections, the "https" service will also be present.

    Jive HTTPD Log Files

    All log files for jive-httpd are stored in the standard platform log directory - /usr/local/jive/var/logs. The following command illustrates how to view the available logs.

    [root@melina logs]# ls -l /usr/local/jive/var/logs/*http*
    -rw-r--r-- 1 root root   224 Feb 23 16:12 /usr/local/jive/var/logs/httpd-error.log
    -rw-r--r-- 1 root root 19454 Feb 26 08:25 /usr/local/jive/var/logs/jive-httpd-access.log
    -rw-r--r-- 1 root root   854 Feb 23 16:13 /usr/local/jive/var/logs/jive-httpd-error.log
    -rw-r--r-- 1 root root   854 Feb 23 16:13 /usr/local/jive/var/logs/jive-httpd-ssl-access.log
    -rw-r--r-- 1 root root   854 Feb 23 16:13 /usr/local/jive/var/logs/jive-httpd-ssl-error.log

    In the above example, startup logs are captured to the "httpd-error.log" file. Requests handled by the standard jive-httpd server are maintained in "jive-httpd-access.log" file while errors during normal runtime are captured to "jive-httpd-error.log". Likewise, SSL or TLS encrypted requests are captured to the corresponding log files with "ssl" appended to the name of the file.

    Jive-Managed Applications

    An installation of the Jive SBS platform will host one or more distinct applications. All managed applications have both system-level scripts that are invoked at system startup and shutdown, as well as scripts locally available to the "jive" system user created when the platform is installed. The following operations are available for managing and monitoring managed applications.

    Start Jive-Managed Applications

    To start all Jive-managed applications, a standard "init" script is avialable for use by the root user. This script is invoked at system boot to start all managed applications.

    [root@biodome:~]$ /etc/init.d/jive-application start
    JIVE_HOME set to /usr/local/jive
    Starting jive-application: 
    All applications started successfully (1 total).

    In addition to the system scripts, the jive user may start any individual application or all managed applications using the appstart command. The appstart command is automatically added to the jive user's interactive shell path and may be run after becoming the jive user (commonly via the "su" command). The following example demonstrates the root user using the "su" command to become the jive user and then the use of the appstart command to start the "sbs" application.

    [root@biodome:~]$ su - jive
    [1456][jive@biodome:~]$ appstart --verbose sbs
    Handling applications ['sbs']
    Starting sbs...
    Executing /usr/local/jive/applications/sbs/bin/manage start
    sbs started successfully.

    Stop Jive-Managed Applications

    To stop all Jive-managed applications, execute the system stop script.

    [root@biodome:~]$ /etc/init.d/jive-application stop
    JIVE_HOME set to /usr/local/jive
    Stopping jive-application: 
    All applications stopped successfully (1 total).

    Similar to the appstart command, the appstop command may be executed to stop managed applications as the jive user.

    [1457][jive@biodome:~]$ appstop --verbose
    Stopping sbs...
    Executing /usr/local/jive/applications/sbs/bin/manage stop
    sbs stopped successfully.
    Cleaning sbs application work directory at /usr/local/jive/var/work/sbs.
    All applications stopped successfully (1 total).

    Monitoring Jive-Managed Applications

    To show all running Jive-managed applications, execute the appls command with the "--running" flag as the jive user as in the following example.

    [1507][jive@biodome:~]$ appls --running
                   stage    running (pid=2799)

    In this example, the "stage" application is currently running with a process ID of 2799. To monitor the individual process, standard tools like the "ps" command can be used with the process ID from appls output as in the following example.

    [1542][jive@biodome:~]$ ps -ef | grep 2799 | grep -v grep
    jive      2799     1  0 15:06 pts/0    00:00:16 /usr/local/jive/java/bin/java -XX:+PrintClassHistogram -XX:+PrintTenuringDistribution -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xloggc:/usr/local/jive/var/logs/stage-gc.log -Xmx2048m -Xms2048m -XX:MaxPermSize=512m -Djive.home=/usr/local/jive -Djive.instance.home=/usr/local/jive/applications/stage/home -Djive.name=stage -Djive.context=/stage -Djive.logs=/usr/local/jive/var/logs -Djive.application=/usr/local/jive/applications/stage/application -Djive.work=/usr/local/jive/var/work/stage -Djive.app.cache.ttl=10000 -Djive.app.cache.size=10240 -Dserver.port=9500 -Dhttp.addr='127.0.0.1' -Dhttp.port=9502 -Dajp.addr=127.0.0.1 -Dajp.port=9501 -Dajp.buffer.size=4096 -Dajp.max.threads=50 -Dlog4j.configuration=file:///usr/local/jive/applications/stage/conf/log4j.properties -Dtangosol.coherence.clusteraddress='224.224.224.224' -Dtangosol.coherence.clusterport=9503 -Dcatalina.base=/usr/local/jive/applications/stage -Dcatalina.home=/usr/local/jive/tomcat -Djava.io.tmpdir=/usr/local/jive/var/work/stage -classpath /usr/local/jive/applications/stage/bin//bootstrap.jar:/usr/local/jive/applications/stage/bin/tomcat-juli.jar::/usr/local/jive/java/lib/tool.jar org.apache.catalina.startup.Bootstrap start

    Alternatively, the following example combines both operations into a single command.

    [1539][jive@biodome:~]$ ps -ef | grep  'appls --running | awk -F'=' '{print $2}' | tr -cd '[:digit:]''
    jive      2799     1  0 15:06 pts/0    00:00:16 /usr/local/jive/java/bin/java -XX:+PrintClassHistogram -XX:+PrintTenuringDistribution -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xloggc:/usr/local/jive/var/logs/stage-gc.log -Xmx2048m -Xms2048m -XX:MaxPermSize=512m -Djive.home=/usr/local/jive -Djive.instance.home=/usr/local/jive/applications/stage/home -Djive.name=stage -Djive.context=/stage -Djive.logs=/usr/local/jive/var/logs -Djive.application=/usr/local/jive/applications/stage/application -Djive.work=/usr/local/jive/var/work/stage -Djive.app.cache.ttl=10000 -Djive.app.cache.size=10240 -Dserver.port=9500 -Dhttp.addr='127.0.0.1' -Dhttp.port=9502 -Dajp.addr=127.0.0.1 -Dajp.port=9501 -Dajp.buffer.size=4096 -Dajp.max.threads=50 -Dlog4j.configuration=file:///usr/local/jive/applications/stage/conf/log4j.properties -Dtangosol.coherence.clusteraddress='224.224.224.224' -Dtangosol.coherence.clusterport=9503 -Dcatalina.base=/usr/local/jive/applications/stage -Dcatalina.home=/usr/local/jive/tomcat -Djava.io.tmpdir=/usr/local/jive/var/work/stage -classpath /usr/local/jive/applications/stage/bin//bootstrap.jar:/usr/local/jive/applications/stage/bin/tomcat-juli.jar::/usr/local/jive/java/lib/tool.jar org.apache.catalina.startup.Bootstrap start

    List Jive-Managed Applications

    A list of all managed applications can be obtained by executing the appls command as the jive user as shown in the following example.

    [1507][jive@biodome:~]$ appls
                   stage    running (pid=2799)
             development    stopped (pid=None)

    In the output above, the "stage" application is running with process ID 2799, the "development" application is not running.

    Jive-Managed Application Networking

    The network ports and addresses used by a managed Jive application will vary depending on usage. The default Jive SBS application will work on the following addresses and ports.

    Service Protocol Address
    Application server management TCP 127.0.0.1:9000
    HTTP TCP

    127.0.0.1:9001

    AJP TCP 127.0.0.1:9002
    Multicast Cluster UDP/Multicast 224.224.224.224:9003

    Note that managed applications should not be accessed directly via the HTTP 9001 port and it is recommended that a firewall prevent access to that port. Its existence is for troubleshooting and support purposes only and is not intended for production use.

    To validate that the TCP services are present for a default install, execute the following command.

    [root@melina ~]# lsof -n -P | grep jive | grep java | grep LISTEN
    java      3204      jive   30u     IPv6      31631                 TCP 127.0.0.1:9001 (LISTEN)
    java      3204      jive   31u     IPv4      31632                 TCP 127.0.0.1:9002 (LISTEN)
    java      3204      jive   39u     IPv4      38046                 TCP 127.0.0.1:9000 (LISTEN)

    Jive-Managed Application Logs

    Log files for Jive-managed applications are located in the var/logs directory of the jive user's home directory (/usr/local/jive/var/logs). The following log files can be consulted for further information on the status of individual applications. Each file will be prefixed with the name of the corresponding application. For example, for the "stage" application, the container log file will be named "stage-container.log".

    • <name>.log - Primary log file for a managed application; most log entries will be located here.
    • <name>-container.log - Early bootstrap log file for the application server container hosting the web application.
    • <name>-session.log - Log file capturing creation and eviction of user session data.
    • <name>.out - Redirection of standard out and standard error for the application process; may contain data not in the main log file.
    • <name>-gc.log - Java garbage collection logs for the application.

    Jive Database Server

    The Jive SBS platform ships with a local PostgreSQL database server. The following operations are available for the database server.

    Start Jive Database Server

    To start the database server, execute the following system command as the root user.

    [root@biodome:~]$ /etc/init.d/jive-database start
    JIVE_HOME set to /usr/local/jive
    Starting jive-database: 
    server starting

    Stop Jive Database Server

    To stop the database server, execute the following system command as the root user.

    [root@biodome:~]$ /etc/init.d/jive-database stop
    JIVE_HOME set to /usr/local/jive
    Stopping jive-database: 
    waiting for server to shut down.... done
    server stopped

    Note that stopping the database while managed applications are using the database will result in applications that cannot service requests. Additionally, stopping the database while applications are connected may result in a lengthy shutdown time or a failed shutdown.

    Monitoring Jive Database Server

    Monitoring the database server can be done as the root user with system scripts, or with traditional Unix commands.

    To check the status of the jive database, execute the following command as the root user.

    [root@biodome:~]$ /etc/init.d/jive-database status
    pg_ctl: server is running (PID: 3211)
    /usr/local/jive/postgres/bin/postgres "-D" "/usr/local/jive/var/data/postgres-8.3"

    The output of the above command lists the parent process of the database system (3211 in this example) and shows the command used to start the database.

    A healthy, running database system will have multiple processes. The following command will show all running database processes on the system:

    [root@biodome:~]$ ps -ef | grep post | grep -v grep
    jive      3211     1  0 17:13 ?        00:00:00 /usr/local/jive/postgres/bin/postgres -D /usr/local/jive/var/data/postgres-8.3
    jive      3214  3211  0 17:13 ?        00:00:00 postgres: writer process                                                      
    jive      3215  3211  0 17:13 ?        00:00:00 postgres: wal writer process                                                  
    jive      3216  3211  0 17:13 ?        00:00:00 postgres: autovacuum launcher process                                         
    jive      3217  3211  0 17:13 ?        00:00:00 postgres: archiver process                                                    
    jive      3218  3211  0 17:13 ?        00:00:00 postgres: stats collector process

    Jive Database Server Networking

    In the default configuration, the included database service listens for connections on TCP address 127.0.0.1 port 5432. To verify that the database is listening for connections, execute the following command.

    [root@melina ~]# lsof -n -P | grep jive | grep postgres | grep LISTEN
                    postgres   2990      jive    3u     IPv4      21499                 TCP 127.0.0.1:5432 (LISTEN)

    Jive Database Server Logs

    Logs for the database server are maintained in the platform log directory at "/usr/local/jive/var/logs/postgres.log".