Skip to content

Maintenance and troubleshooting

Version

The installed version is written to C:\Program Files\RAVAS\Central Server\server\installed-version.txt. The server also logs it at startup (RAVAS Central Server <version>) and returns it from GET /api/v1/version. The web interface does not show it.

Logs

The server writes its logs to C:\Program Files\RAVAS\Central Server\server\logs, one file per day named app<yyyyMMdd>.log. The last 31 files are kept, each up to 256 MB.

The same messages can be viewed on the Application logs page of the web interface, for as long as the logs retention time keeps them in the database. Logs related to a scale are shown on its Logs tab.

The installers write their logs to C:\ProgramData\RAVAS\install-<yyyyMMdd-HHmmss>.log.

Backing up the database

All data of the server is in the PostgreSQL database ravas_rcs: accounts, scales, settings, saved weights and collected data. Every update makes a backup of it in C:\ProgramData\RAVAS\backups (see Updating). These backups are not deleted automatically and stay on the same disk, so copy the ones you need elsewhere and remove old ones.

To make a backup at any time, run from an elevated Command Prompt; the server can keep running:

cd "C:\Program Files\RAVAS\Central Server\database\pgsql\bin"
pg_dump -h localhost -U postgres -Fc -f C:\Backups\ravas_rcs.dump ravas_rcs

pg_dump asks for the password of the postgres user. It is in the LocalDocker connection string in server\appsettings.Production.json, or in server\appsettings.json on installations made with an installer older than version 1.0.

Besides the database, keep:

  • server\appsettings.Production.json, if you changed settings in it;
  • the license key you activated the server with. The license.key file cannot be used on another computer or after reinstalling Windows, see Activation.

Restoring a backup

From an elevated Command Prompt in C:\Program Files\RAVAS\Central Server\database\pgsql\bin, replacing <backup> with the path of the dump file:

sc.exe stop Ravas.CentralServer
psql -h localhost -U postgres -c "DROP DATABASE ravas_rcs WITH (FORCE)" -c "CREATE DATABASE ravas_rcs"
psql -h localhost -U postgres -d ravas_rcs -c "CREATE EXTENSION timescaledb" -c "SELECT timescaledb_pre_restore()"
pg_restore -h localhost -U postgres -d ravas_rcs <backup>
psql -h localhost -U postgres -d ravas_rcs -c "SELECT timescaledb_post_restore()"
sc.exe start Ravas.CentralServer

Each command asks for the postgres password, as above. pg_restore reports that the timescaledb extension already exists; that error is expected.

Warning

DROP DATABASE deletes the current database. Make a backup of it first if it may still be needed.

To move the server to another computer, install it there with RCS-Setup.exe, restore the backup as above and activate the license again. TimescaleDB restores a backup only into the same TimescaleDB version it was made with, so restore into an installation made with the same installer version.

Troubleshooting

The server does not start or cannot be reached

  • In services.msc, check that the services RAVAS Central Server and PostgreSQL are running. The server depends on PostgreSQL and stops if it cannot reach the database within about 20 seconds of starting; Windows then restarts it.
  • Read the latest file in server\logs. If no log was written, look in the Windows Event Viewer under Windows Logs → Application.
  • If another program already uses port 7080, the server cannot start. Stop that program or change the port.
  • From another computer, use the server's address instead of localhost, and check that no firewall on the way blocks the port (see Network ports).

The installation failed

The installer log in C:\ProgramData\RAVAS names the step that failed and why. Resolve the issue and run the installer again. If the log says that a PostgreSQL service that is not part of this installation exists, another PostgreSQL installation uses the same service name; remove it first.

An update was rolled back

When the new version does not start, the installer restores and starts the previous version and exits with code 1. The installer log contains the reason, the path of the database backup made before the update and the commands to restore it. Restore the backup only if the previous version does not work with the database (see Restoring a backup).

The license is not active

The Product activation page shows why:

  • "has expired" or "cannot be activated until": the license is outside its validity period. Activate a valid license.
  • "was activated on a different machine or installation and must be activated again": the server was moved, restored on another computer, or Windows was reinstalled. Activate the license again with the original license key.

Activating a license while none is active resets the application settings to their defaults, so check them afterwards.

Locked out

After 5 failed login attempts an account is locked for 5 minutes. Wait until the time shown on the login page.

Forgotten passwords

An administrator can set a new password for any other account: on the Accounts page select Edit next to the account, enter a New password and select Save.

If no administrator can log in any more, reset the accounts from the server computer. This deletes all user accounts; scales, weights and settings are kept.

  1. Stop the Ravas.CentralServer service.
  2. Open a command prompt as administrator in the server folder and run the server once with --reset-accounts:

    cd "C:\Program Files\RAVAS\Central Server\server"
    RCS.Server.exe --reset-accounts
    

    It prints how many accounts were deleted and exits.

  3. Start the Ravas.CentralServer service again and open the web interface: it asks to create the first administrator account, as after the installation. Then recreate the other accounts.

Scales are not discovered

  • Check that Discover RedBox scales and Discover ASCII scales are enabled in Settings.
  • Discovery uses UDP broadcasts on ports 49111 (RedBox) and 30718 (ASCII), which reach only the networks the server is directly connected to and must not be blocked by a firewall. Scales in other networks have to be added with Add scale.
  • An address that was checked recently is checked again only after 10 minutes. Add scale with Test connection connects to it right away.
  • A scale that was deleted stays in Deleted scales when it is found again. Restore it from there.

RDC weights do not arrive

  • Check that the RDC server is enabled in Settings with the port the indicators send to, and that the license includes the RDC feature.
  • Check that the scale exists in the server with a Custom ID equal to the identifier configured on the indicator.
  • The Application logs page and the log files show each received message and why it was answered with NACK.

Legacy clients receive 401

The Require authentication for legacy routes setting is enabled, see Security.