Categories
Knowledge Support Support exacqVision Enterprise Categories Products

EM Camera Permission in Postgres DB Causing High CPU usage for the Importers

Description 

Some customers might have High CPU usage on their EM servers. In which the CPU runs at 100%.

Product 

EM- Version 23.0.3 and older.

Steps to Identify the Cause 

Log into the EM server and validate that the importers are running hard. Normally there will be several importer services opened and being used. You will have one that is taxed more than other as it is the brain importer.

Go to the User Role Section and see if there are any user roles with the Trash Can icon next to it. If so this could be an indicator that there is NO User attached to the User Role. In this case there are three options that can be performed.
1. Add at least 1 user to the user role.
2. Unpromote the user role.
3. Delete the user role if it is not needed.


Once we have identified this is the case for the UserRole we NEED to make sure the Postgres DB is in fact growing.

  1. First we need to stop the EM services.
  2. Open up windows and search for PGadmin and launch the application.
  3. Use the tree to open up the Enterprise folder and log in using the password of postgres .
  4. In the upper portion there is a Tools menu you can select to open a Query.
  5. Run the following query.
    select count(*) from camera_camerapermission
  • NOTE* Each Time you run the new Query make sure you do not have the last statement in the query box. Run a new Query.
    In the query box copy and paste the following in and execute the query. This will take a few minutes if there are a lot of table counts.

If the table shows millions of entry’s we need to run the following script in pgadmin and execute the query.

delete from camera_camerapermission
where id in (
select id from (
select id, row_number() OVER w as rnum
from camera_camerapermission
window w as ( partition by device_id, permission_id
order by id
)
) t
where t.rnum > 1);

select count(*) from camera_camerapermission;

When the query is done executing the count will show up with a certain number depending on the tables.
Take note to the count number.
Then start the EM services, and wait a few minutes and execute the query again.
select count (*) from camera_camerapermissions
The table will grow for about 24 hours.

This should stop the table from growing at an extremely fast rate which taxes the system CPU.

Expected Results 

The table should not be growing.

Actual Results 

In Fact when there is a UserRole with no user- the table will bloat.

Solution

Engineering has identified the potential cause. This might not be the actual table responsible in all situations. However they have began a new ticket in Jira to investigate this and make sure we put a fail safe into prohibit the creation of an Empty User Role.

Original Issue seen in:
Jira- AES-16
Trac 19900
Current Ticket AES-465

Categories
Knowledge Support Support exacqVision Enterprise exacqVision Client exacqVision Server Categories exacqVision Webservice exacqVision Hardware

exacqVision Default Ports

Description 

The following is a list of default port numbers used by exacqVision software.

NOTE: Many ports listed below may only used with certain configurations or by optional services and integrations.

Products

  • exacqVision Client
  • exacqVision Enterprise Manager
  • exacqVision Integrator Service Portal
  • exacqVision Server
  • exacqVision Web Service
  • LSI Storage Authority
  • MegaRAID Storage Manager
  • PostgreSQL
  • SQL Server

Port List

PortDescription
25Simple Mail Transfer Protocol (SMTP)
80exacqVision Web Server/exacqVision Enterprise Manager (HTTP)
How to change Web Service ports
How to change EM web ports
389LDAP (Lightweight Directory Access Protocol)
443exacqVision Web Service/exacqVision Enterprise Manager/ exacqVision Relay (HTTPS )
How to change Web Service ports
How to change EM web ports
445SMB Archiving and Microsoft-DS (Directory Services)
465Secure SMTP (Legacy)
587SMTP (TLS/SSL)
636LDAPS (Lightweight Directory Access Protocol over TLS/SSL)
1433exacqVision Enterprise Manager (SQL Server)
2463LSI Storage Authority (Webserver)
3071MegaRAID Storage Manager
3260exacqVision Server S-Series Extended Storage (iSCSI)
3702exacqVision Server – Web Services Dynamic Discovery (WS-Discovery)
5432exacqVision Enterprise Manager (PostgreSQL)
5571MegaRAID Storage Manager
8082exacqVision Web Service (Web Socket) – Web Sockets only used in Web Service 7.2 to 9.4
How to change Web Service ports
8083exacqVision Web Service (Web Socket Secure) – Web Sockets only used in Web Service 7.2 to 9.4
How to change Web Service ports
8443Server connections from exacqVision Mobile 24.09 and above.
How to change exacqVision Mobile listening port
8554exacqVision RTSP Server
9000LSI Storage Authority (LSA Server)
22609exacqVision Client
How to change exacqVision Server port
22610exacqVision Server Interprocess Communication [RESERVED – DO NOT USE]
22717exacqVision Web Service NVRG Gateway
28744exacqVision Enterprise Manager (Failback – vfba)
35111Integrator Service Portal (ExacqCloud Outbound Connections)

Related Articles

<br>

Categories
Knowledge Support Support exacqVision Enterprise Categories Products

Setup Postgres with SSL

Description

After Postgres is installed and an SSL certificate is acquired:

  • 1. Open the postgresql.conf for editing as an administrator:
    • Windows: C:\exacqVisionEsm\PostgreSQL\9.2\data\postgresql.conf
    • Linux: /usr/local/exacq/esm/PostgreSQL/9.2/data/postgresql.conf
  • 2. Locate the “# – Security and Authentication -” section:
    • Replace it with:

      # – Security and Authentication – #authentication_timeout = 1min # 1s-600s ssl = on # (change requires restart) #ssl_ciphers = ‘DEFAULT:!LOW:!EXP:!MD5:@STRENGTH’ # allowed SSL ciphers # (change requires restart) ssl_renegotiation_limit = 0 # amount of data between renegotiations ssl_cert_file = ‘server.crt’ # (change requires restart) ssl_key_file = ‘server.key’ # (change requires restart) #ssl_ca_file = ” # (change requires restart) #ssl_crl_file = ” # (change requires restart) #password_encryption = on #db_user_namespace = off # Kerberos and GSSAPI #krb_server_keyfile = ” #krb_srvname = ‘postgres’ # (Kerberos only) #krb_caseins_users = off
  • 3. Copy your SSL cert as server.crt to:
    • Windows: C:\exacqVisionEsm\PostgreSQL\9.2\data\server.crt
    • Linux: /usr/local/exacq/esm/PostgreSQL/9.2/data/server.crt
  • 4. Copy your SSL key as server.key to:
    • Windows: C:\exacqVisionEsm\PostgreSQL\9.2\data\server.key
    • Linux: /usr/local/exacq/esm/PostgreSQL/9.2/data/server.key