Contents

  • Jive HTTPD
  • 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 operating system commands and concepts. You'll find the application management commands mentioned here documented in Application Management Commands.

    The Jive SBS Solaris platform includes three services. Each service is installed as an SMF-managed (Solaris Management Facility) service. The following table describes the service title, name and role within the Jive SBS architecture.
    Service SMF Name Purpose
    Jive HTTPD application/jive/httpd HTTP server for static resources, reverse proxy for cache control and compression.
    Jive Application application/jive/application Aggregation of one or more managed applications on a Jive SBS-managed host.
    Jive Database application/jive/database Optional local database for use in exploratory or trial environments.

    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:

    bash-3.00# svcadm -v start application/jive/httpd
    Action start set for svc:/application/jive/httpd:default.

    Stop Jive HTTPD

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

    bash-3.00# svcadm -v stop application/jive/httpd
    Action stop set for svc:/application/jive/httpd:default.

    Restart Jive HTTPD

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

    bash-3.00# svcadm -v restart application/jive/httpd
    Action restart set for svc:/application/jive/httpd:default.

    Monitoring Jive HTTPD

    You can check the status of the jive-httpd service. Here's an example:

    bash-3.00# svcs -l application/jive/httpd     
    fmri         svc:/application/jive/httpd:default
    name         Jive SBS HTTPD Service
    enabled      true
    state        online
    next_state   none
    state_time   Thu Jun 11 11:08:58 2009
    logfile      /var/svc/log/application-jive-httpd:default.log
    restarter    svc:/system/svc/restarter:default
    contract_id  31205 
    dependency   optional_all/none svc:/milestone/multi-user-server (online)
    dependency   optional_all/none svc:/application/jive/application (online)

    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:

    bash-3.00# 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.

    bash-3.00# 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.

    bash-3.00# 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 system-level scripts that are invoked at system startup and shutdown. The following operations are available for managing and monitoring managed applications.

    Start Jive-Managed Applications

    To start all Jive-managed applications, use the following command. This script is invoked at system boot to start all managed applications.

    bash-3.00# svcadm -v enable -st application/jive/application
    svc:/application/jive/application:default temporarily enabled.

    Stop Jive-Managed Applications

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

    bash-3.00# svcadm -v disable -st application/jive/application
    svc:/application/jive/application:default temporarily disabled.

    Restart Jive-Managed Applications

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

    bash-3.00# svcadm -v restart application/jive/application
    Action restart set for svc:/application/jive/application:default.

    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.

    bash-3.00# 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.

    bash-3.00# 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.

    bash-3.00# 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.

    bash-3.00# 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.

    bash-3.00# 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.

    bash-3.00# svcadm -v start -s application/jive/database
    svc:/application/jive/database:default started.

    Stop Jive Database Server

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

    bash-3.00# svcadm -v stop -s application/jive/database
    svc:/application/jive/database:default 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.

    bash-3.00# svcs -l application/jive/database

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

    bash-3.00# 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.

    bash-3.00# 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".