Starting and Stopping RealServer


Before starting or stopping RealServer, you may want to ascertain whether RealServer is running.

Determining Whether RealServer Is Running

Windows

Windows NT: If RealServer is running, it will be listed on the Applications tab of the Windows NT Task Manager.

Windows 95: If RealServer is running, it will be listed on the Taskbar.

UNIX

Determine whether RealServer is running by typing a ps command and a grep command that searches for pnserver. For example,

ps -ef | grep pnserver

If the server is running, the ps and grep command return two lines for the pnserver processes that look similar to this:

username 25851 25850 0 16:51:11 0:00 bin/pnserver server.cfg
username 25850 1 0 16:51:11 0:00 bin/pnserver server.cfg

The lines above indicate that the pnserver process and the pnserver resolver process (which is a child process of the pnserver process) are running. The PIDs for the two processes should be sequential. In the example above, the pnserver process has a PID of 25850, and the pnserver resolver process has a PID of 25851.


Starting RealServer

When you start the RealServer, it asks you to register online. RealServer will not start unless you register.

When you first install RealServer, it is configured to start automatically each time you start your computer. The instructions below describe how to disable this.

Starting RealServer Automatically

Windows

RealServer is installed as a service under Windows NT, where it can be controlled from the Services Control Panel.

If you want to remove RealServer as a service, first stop RealServer, then run the delsvc.exe program in the bin directory.

To restore automatic starting, run crtsvc.exe, which is also located in the bin directory.

When you run RealServer as a Service, errors are written to the Windows NT error logs rather than the Error Log specified in the RealServer configuration file. You can view them just like any other Windows NT errors.

UNIX

If you want to disable automatic starting, remove the RealServer command from the boot-time scripts of your UNIX system.

To restore automatic starting, add the pnserver command to start RealServer to the boot-time scripts of your UNIX system. The boot-time scripts generally reside in files or directories beneath the /etc subdirectory. Be sure to use complete path names in your script.

If you do not have permission to change the boot-time scripts on your computer, you may need to have your system administrator do this for you.

Starting RealServer Manually

Windows

To start RealServer manually using the Control Center:

  1. On the Start menu, point to Programs.
  2. Point to RealSystem and select RealServer Control Center. The RealServer Control Center dialog box appears. The default configuration file, server.cfg, is automatically loaded. The status bar displays the status of the server.

    Control Center screen shot
  3. To select a different configuration file, click Open on the File menu. Select a configuration file. Click Open.
  4. On the Server menu, click Start.

To start RealServer manually from the command line:

  1. At a command line, change to the directory where you installed RealServer.
  2. Start RealServer by typing:
    bin\pnserver server.cfg
  3. RealServer does not return any messages to indicate that it has started, and there is no prompt on the screen for as long as it is running.

If RealServer does not start, review the error messages in the RealServer Error Log.

UNIX

Because RealServer runs on a high-numbered, unprivileged port, you do not need super-user privileges to start it unless you have configured for PNAviaHTTP by setting HTTPPort 80. However, if you do start it while you are logged on as super-user, then RealServer can configure itself to use additional system resources, such as file descriptors, that it needs to support a large number of users connected simultaneously.

After you start RealServer with super-user privileges and it adjusts its resource limits, RealServer assumes the user and group IDs entered into the configuration file.

To start RealServer manually from the command line:

  1. At a command line, change to the directory where you installed RealServer.
  2. Type the following:
    bin/pnserver server.cfg
  3. RealServer returns the command prompt and runs in the background. It does not return any messages to indicate that it has started.

If RealServer does not start, review the error messages in the RealServer log files.


Stopping RealServer

If you stop RealServer while users are connected, they may receive error messages. To prevent users from receiving error messages, first prevent new users from connecting, then stop the server. If no users are connected, you can skip directly to the instructions listed in "Stopping RealServer."

Preventing New Users From Connecting

By shutting down RealServer gracefully, you can prevent new connections without disconnecting current users. After your current users have disconnected, stop the RealServer. Be sure to change the PnaPort back to its normal value before restarting RealServer.

Java Performance Monitor:

  1. In the Java Performance Monitor, double-click Configuration.
  2. In the Config Variable Groups list, double-click General.
  3. In the Config Variables list, double-click PnaPort.
  4. Change the PnaPort configuration setting to an unused value such as 9999.

System Manager:

  1. On the Server menu, click Configuration.
  2. Change the PnaPort setting to an unused value such as 9999.
  3. Click OK.

UNIX command line:

  1. Change the PnaPort configuration setting in server.cfg to an unused value such as 9999.
  2. Issue the SIGHUP signal.

After the currently connected users stop playing clips, stop the server.

Stopping RealServer

Use either the Administration Web Page or the Control Center to stop RealServer.

To stop RealServer using Control Center, follow the platform-specific directions below.

Windows

If you started RealServer with the pnserver utility, press Ctrl+C at the command line. If you started RealServer from the Control Center, click Stop on the Server menu.

UNIX

  1. Log on either as super-user or by using the same user ID as RealServer.
  2. If you know the process ID, type:
    kill <processid>
  3. If you don't know the process ID, change to the pnserver directory and type:
    kill 'cat logs/pnserver.pid'

© 1997 RealNetworks, Inc.