Test instance on the same host¶
Important
Beta version 2.1. What is described here exists only in beta version 2.1: it is installed from the beta repository and only with a licence; the stable version 2.0.2 and the demo edition do not have it. The beta version comes without warranty, and support is best effort (Beta testing programme).
Starting with version 2.1.2.612, on a host where the production service pss is running, you can start a second, test instance of the streamer — for example, to check a new build on the same sources without stopping the production node. The test instance works with its own settings directory and differs from the production one by three command-line switches. These switches do not get into the settings file, so settings copied from the production node will not include them. Without these switches the streamer starts as before.
Start-up switches¶
--instance-tag=<tag>Instance tag: 1 to 16 characters, lowercase Latin letters, digits and hyphens. It separates the exchange channels with the transcoders: without it, two instances with the same stream and output numbers interfere with each other’s transcoders.
--bind-address=<IPv4 address>The web interface, the OTT server (HTTP, HTTPS, HTTP/3) and the EPG server listen only on this address. The inputs and outputs of streams work with their own addresses from the stream settings. This switch does not affect the RTMP server (step 3 below).
--isolatedThe instance makes no outside connections: Meshwork and links with neighbours, reserve, external alert recipients (Telegram, email, webhook, running a program) and the webhook check, ACME certificate retrieval, CAP emergency alerts (Automatic CAP alerts), LDAP, PMS and DVB are disabled; licence operations (update, unbinding, transfer) are refused. External billing servers (viewer authorisation through billing) are disabled too. The settings themselves do not change: all of this is disabled only while the instance is running. The instance’s own streams work as configured.
With the --bind-address or --isolated switch, a port of the web interface, the OTT server or the EPG server that is already taken by another process is not shared with it by the instance: the instance is refused it, with the Address already in use error in the log, at startup and at every application of the settings. Without them (only --instance-tag), such a port is shared with the production node, and some of the connections go to the test instance.
An invalid switch value stops the start-up with an error message.
How to start¶
Create a settings directory for the test instance, for example
/opt/pss-test/config, and copy the production node’spss.propertiesinto it.In this copy of
pss.properties, set paths of its own: at least the log directorylog-dir, and also every data path set there. Otherwise both instances write to the same log and the same statistics database.Give the test instance its own ports in its settings: the web interface ports (Web server & accounts), the OTT server ports, including HTTPS and HTTP/3 (Streaming HTTP server), and the EPG server ports (EPG server). A port that the production node already listens on will not go to the test instance if the instance is started with the
--bind-addressor--isolatedswitch. If the RTMP server is enabled in the settings (RTMP server), give it other ports or turn it off (RTMP port 0, RTMPS off): the--bind-addressand--isolatedswitches do not act on it.Start the instance with the settings directory and the switches:
$ sudo /usr/local/bin/pss -c /opt/pss-test/config --instance-tag=test --bind-address=192.0.2.10 --isolated -C
The
-Cswitch prints the log to the console. For permanent operation, write a separate systemd service file — a copy ofpss.servicewith its ownExecStartline; the package does not install a second service file.
Whether the instance runs with these switches is visible in /data/server: the instance-tag, isolated="1" and bind-address fields are present only for an instance started with the corresponding switch (Managing the node over the HTTP API).
Warning
--isolated does not stop streams. The test instance’s outputs — UDP and multicast, SRT and RTMP publications and others — really go out to the network. Do not repeat the production node’s groups, ports and publication addresses in them. Inputs read whatever they point to: receiving the same multicast as the production node is fine.
Licence¶
The test instance uses the same protection key as the production node. Each instance checks the licence limits against its own streams, without adding them to the other’s. A network key with a limit on the number of simultaneous connections may refuse the second instance; a local key on this host usually does not refuse. With --isolated the test instance does not change the host’s licence: it cannot be updated or transferred from it.