Getting Started – Ubuntu
3 Set up the AVHS portal
Server Watchdog
bin/server_watchdog.php
Checks that the servers (web server, ST server and media server)
are up and running.
To determine if a server is available or not, an HTTP request
is sent to the server. The database is updated according to
whether the server responds to the request or not. The database
is updated during each test to set the time when the server
was last tested.
Run the script on every server in the system. One instance of
the script will never test the same server at the same time on
a multi portal system.
Alarm Closer
bin/alarm_closer.php
Checks for recently stopped JPEG and edge storage alarms,
updates the corresponding events and sends WebSocket
notifications. This service is needed for JPEG alarms because
devices such as cameras do not explicitly report when alarms
end. For the edge storage alarms, this service is needed because
cameras do not report when edge storage alarms end. Make
sure that at least one instance of this script runs at any given
time otherwise JPEG alarms and edge storage alarms will not
be handled properly.
Copy the startup script to
/etc/init.d/
and link it to your system’s default run level:
# cd /etc/init.d/
# cp /home/sts/current/setup/sthelpers .
# update-rc.d sthelpers defaults 90
To start the ST helpers:
# service sthelpers start
3.3.3 Start the Websocket server
Copy the websocket server startup script to
/etc/init.d/
and link it to the system’s default run level:
# cd /etc/init.d/
# cp /home/sts/current/setup/wssd_websocketserver1 .
# update-rc.d wssd_websocketserver1 defaults 90
To start the websocket server:
# service wssd_websocketserver1 start
Note
The Web GUI will show an error message and auto-logout if the communication with the WebSocket server fails.
This may be due to certificate or connection errors. Verify connectivity through the web browser by going to
https://<websocketserver_address>:<websocketserver_ssl_port>/socket.io/
3.3.4 Start the ST server
The ST server will usually be started at boot time. The ST server setup script automatically creates a script that can be used to do
this. Copy the scripts to
/etc/init.d/
if you are using an SysV style init system and link it to the correct run level. The scripts
should be started after all network services are configured.
# cd /etc/init.d/
# cp /home/sts/current/setup/stsd_stserver1 .
# update-rc.d stsd_stserver1 defaults 90
To start the ST servers:
# service stsd_stserver1 start
15