Categories
Knowledge Support Cloudvue Cloudvue Gateway Support Categories

Dropping and Creating the smartvuedb Database

Description 

At times it may be necessary to drop (delete) and create the smartvuedb database.  WARNING VIDEO LOSS is expected, and except for rare occasions this should only be performed on newly deployed NVRs.

Product 

Cloudvue Gateway

Prerequisite

  • ssh access to the Cloudvue Gateway
  • see KB #13051 “Cloudvue SSH Tunneling” or KB #13667 “Tunneling to a Cloudvue Gateway From a Local Windows Machine”

Solution

Issue the following commands from terminal

** WARNING ** WILL RESULT IN VIDEO LOSS

<code>sudo service cron stop <br>mysqldump -u root -p smartvuedb camera camera_setting camera_view nvr_setting schedule user user_setting user_Status User_view view > /home/smartvue/smartvuedb_backup.sql <br>sudo mysql smartvuedb -s -e “drop database smartvuedb;”<br>sudo mysql -s -e “create database smartvuedb;”<br>sudo -i <br> bash /opt/smartvue/services/nvr-database-migrate/installer.sh<br>bash /smartvue/updater.sh<br>mysql -u root smartvuedb -p < /smartvue/mysql/multi-tables_smartvuedb_backup_file.sql<br>exit<br>sudo service cron start</code>


Command Explanation

cron stop – Stops scripts from being launched by cron during this process

msyqldump – (Optional) can be used to create a backup of specified tables within the existing smartvuedb database

drop database smartvuedb – Removes the existing smartvuedb database

create database smartvuedb – creates an empty smartvuedb database

sudo -i – switch to root user

installer.sh – runs the installer script which sets permissions for smartvuedb and will return the following lines if successful

++ pwd -P <br>+ SERVICE_DIR=/root <br>SERVICE_DIR=/root <br>SMV_NVR_DB_USER=root <br>/root/node_modules/db-migrate/bin/db-migrate up <br> /opt/smartvue/services/nvr-database-migrate/installer.sh: line 4: /root/node_modules/db-migrate/bin/db-migrate: No such file or directory <br>exit 127

updater.sh – runs the updater script which populates default values in certain tables within smartvuedb database and takes several minutes to complete.

mysql -u root smartvuedb -p – (Optional) can be used to import tables previously backed up with the mysqldump

cron start – Starts cron service

Categories
Knowledge Support Support exacqVision Server Categories Products

Artificial Intelligence Object Classification Event Triggers Filling OS Drive

Description 

We have found that event links based on triggers from AI Object Classification events flood the eventPI database resulting in the OS drive being filled in a short amount of time. Periodic unexpected crashes, system reboots and increased memory usage have resulted. This happens when the amount of AI metadata captured in the eventPI database in a single day exceeds the available free space on the drive.

The following exacqVision Server log entries confirm when this issue is occurring.

Product 

  • AXIS Object Analytics
  • Hanwha AI-based object detection
  • Illustra AI Object Classification
  • exacqVision Server [All versions]

Solution

Update the exacqVision Server and Client to version 23.09 or higher.

Once updated, utilize the ‘Maximum Days to Keep Bounding Box Metadata’ control. Details on this feature may be found in Maximum Days to Keep Bounding Box Metadata Explained

Related Articles

AES-392

Categories
Knowledge Support Cloudvue Cloudvue Gateway Support Categories Products

Cloudvue Gateway Camera Already Exists

Description 

When attempting to add a camera to the Cloudvue Gateway an error message appears “Camera Already Exists”. Typically, this happens when the local database is out of sync with the cloud database. Removing the camera from the local database then re-adding triggers a new sync which resolve the issue. Below are instructions for removing the camera from the local Cloudvue database.

Product 

  • Cloudvue Gateway

Solution

Overview

The following steps should be used to remove the duplicate camera from the Cloudvue Gateways database.

  • SSH to the Cloudvue Gateway
  • Launch MariaDB Monitor
  • Display Camera Table Contents
    • Use the MAC address to Identify the Camera
  • Delete the Camera
  • Display Camera Table Contents
    • Check the changes
  • Delete associated Camera Settings
  • Close MariaDB Monitor

SSH to the Cloudvue Gateway

  • sudo ssh -p 7627 smartvue@[IPADDRS]
    • Where [IPADDRS] is the IP address of the Cloudvue Gateway

Launch MariaDB monitor and Access The Smartvue Database

  • mysql -u root smartvuedb

Display Camera Table Contents

  • select * from camera;

Identify The Camera

  • Use the MAC to find the camera which needs to be deleted
    • Make note of the id and deleted_at fields
    • NULL in deleted_at indicates that camera is active

Delete The Camera

  • update camera set deleted_at =  created_at  where id = [id];
    • Where [id] is the cameras id

Check Your Work

  • List the cameras 
    • select * from camera;
  • Verify that the  deleted_at field is no longer NULL but is the same as the created_at field

Delete the Cameras Settings

  • delete from camera_setting where camera_id = [id];
    • Where [id] is the cameras id

Close MariaDB monitor

  • \q

Pro Tip:  To restore a camera change the deleted_at field  to NULL

update camera set deleted_at = NULL where id = [id];

  • Where [id] is the cameras id
Categories
exacqVision Enterprise

Invalid column error after updating Enterprise Manager using MSSQL database from 21.12 or lower to 22.06 or higher

Description 

If you are using mssql database with EM and updating from 21.12 or lower to 22.06 you will get the crying stickman when trying to log into the web gui. When checking the webservice logs you will get invalid column errors such as..

][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name ‘lastSaveOrUpdate’. (207) (SQLExecDirectW);

Product 

EM version 21.12 or lower

EM version 22.06 or higher

Steps to Reproduce 

Download Enterprise Manager 22.06 (or higher) installer package

Install the package

Try to reach EM via web Gui

Log in using known credentials

Expected Results 

Logs in successfully and able to see configuration

Actual Results 

You will get the crying stickman page

Solution

WORKAROUND: AES 2868
Which contains the workaround and backpatch

Categories
Knowledge Support Support exacqVision Client exacqVision Server Categories

Search for Serial Data unexpectedly fails to return results

Description

When set to record, exacqVision Server stores serial data in a database called pospi.db

Default locations are:

  • Windows
    C:\Program Files\exacqVision\Server\pospi.db
  • Linux
    /usr/local/exacq/server/pospi.db

After verifying that serial data is configured correctly and data is being received if searches fail to return results for serial events check the exacqVision Server logs for entries similar to the following.

POSPI    Warning    Failed to insert new record into posdb. Statement step failed: 11 database disk image is malformed
POSPI    Warning    statement reset failed: database disk image is malformed

These messages are indicating the database is corrupted.

Solution

  1. Stop the exacqVision Server Service
  2. Rename or remove the file pospi.db
  3. Restart the exacqVision Server Service
    Note: The service will detect the missing pospi.db and create a new empty one.
  4. Generate serial data
  5. Verify searches are now returning results.

Related articles:

<br>