<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Managing the database</title>
    <link>/en/admin/managing-db/</link>
    <description>Recent content in Managing the database on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/managing-db/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Managing nodes</title>
      <link>/en/admin/managing-db/managing-nodes/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/managing-nodes/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database provides the ability to &lt;a href=&#34;../../../en/admin/managing-db/managing-nodes/adding-nodes/&#34;&gt;add&lt;/a&gt;, &lt;a href=&#34;../../../en/admin/managing-db/managing-nodes/removing-nodes/&#34;&gt;remove&lt;/a&gt;, and &lt;a href=&#34;../../../en/admin/managing-db/managing-nodes/replacing-nodes/&#34;&gt;replace&lt;/a&gt; nodes on a live cluster that is actively processing queries. This ability lets you scale the database without interrupting users.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Managing disk space</title>
      <link>/en/admin/managing-db/managing-disk-space/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/managing-disk-space/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database detects and reports low disk space conditions in the log file so you can address the issue before serious problems occur. It also detects and reports low disk space conditions via &lt;a href=&#34;../../../en/admin/monitoring/monitoring-events/configuring-event-reporting/configuring-reporting-snmp/&#34;&gt;SNMP traps&lt;/a&gt; if enabled.&lt;/p&gt;
&lt;p&gt;Critical disk space issues are reported sooner than other issues. For example, running out of catalog space is fatal; therefore, the database reports the condition earlier than less critical conditions. To avoid database corruption when the disk space falls beyond a certain threshold, the database begins to reject transactions that update the catalog or data.

&lt;div class=&#34;admonition caution&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Caution&lt;/h4&gt;

A low disk space report indicates one or more hosts are running low on disk space or have a failing disk. It is imperative to add more disk space (or replace a failing disk) as soon as possible.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;When the database reports a low disk space condition, use the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/disk-resource-rejections/#&#34;&gt;DISK_RESOURCE_REJECTIONS&lt;/a&gt; system table to determine the types of disk space requests that are being rejected and the hosts on which they are being rejected.&lt;/p&gt;
&lt;p&gt;To add disk space, see &lt;a href=&#34;../../../en/admin/managing-db/managing-disk-space/adding-disk-space-to-node/#&#34;&gt;Adding disk space to a node&lt;/a&gt;. To replace a failed disk, see &lt;a href=&#34;../../../en/admin/managing-db/managing-disk-space/replacing-failed-disks/#&#34;&gt;Replacing failed disks&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;monitoring-disk-space-usage&#34;&gt;Monitoring disk space usage&lt;/h2&gt;
&lt;p&gt;You can use these system tables to monitor disk space usage on your cluster:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
System table&lt;/th&gt; 

&lt;th &gt;
Description&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;



&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/disk-storage/#&#34;&gt;DISK_STORAGE&lt;/a&gt;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;


Monitors the amount of disk storage used by the database on each node.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;



&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/column-storage/#&#34;&gt;COLUMN_STORAGE&lt;/a&gt;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;


Monitors the amount of disk storage used by each column of each projection on each node.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;



&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/projection-storage/#&#34;&gt;PROJECTION_STORAGE&lt;/a&gt;&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;


Monitors the amount of disk storage used by each projection on each node.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;


      </description>
    </item>
    
    <item>
      <title>Admin: Memory usage reporting</title>
      <link>/en/admin/managing-db/memory-usage-reporting/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/memory-usage-reporting/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database periodically polls its own memory usage to determine whether it is below the threshold that is set by configuration parameter 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/config-parameters/memory-management-parameters/#&#34;&gt;MemoryPollerReportThreshold&lt;/a&gt;&lt;/code&gt;.Polling occurs at regular intervals—by default, every 2 seconds—as set by configuration parameter 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/config-parameters/memory-management-parameters/#&#34;&gt;MemoryPollerIntervalSec&lt;/a&gt;&lt;/code&gt;.
&lt;p&gt;The memory poller compares &lt;code&gt;MemoryPollerReportThreshold&lt;/code&gt; with the following expression:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;RSS&lt;/span&gt; / &lt;span class=&#34;code-variable&#34;&gt;available-memory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When this expression evaluates to a value higher than &lt;code&gt;MemoryPollerReportThreshold&lt;/code&gt;—by default, set to 0.93, then the memory poller writes a report to &lt;code&gt;MemoryReport.log&lt;/code&gt;, in the database working directory. This report includes information about memory pools, how much memory is consumed by individual queries and session, and so on. The memory poller also logs the report as an event in system table 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/memory-events/#&#34;&gt;MEMORY_EVENTS&lt;/a&gt;&lt;/code&gt;, where it sets &lt;code&gt;EVENT_TYPE&lt;/code&gt; to &lt;code&gt;MEMORY_REPORT&lt;/code&gt;.&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;The memory poller also checks for excessive glibc allocation of free memory (glibc memory bloat). For details, see &lt;a href=&#34;../../../en/admin/managing-db/memory-trimming/#&#34;&gt;Memory trimming&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Memory trimming</title>
      <link>/en/admin/managing-db/memory-trimming/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/memory-trimming/</guid>
      <description>
        
        
        &lt;p&gt;Under certain workloads, &lt;a href=&#34;https://www.gnu.org/software/libc/&#34;&gt;glibc&lt;/a&gt; can accumulate a significant amount of free memory in its allocation arena. This memory consumes physical memory as indicated by its usage of resident set size (RSS), which glibc does not always return to the operating system. High retention of physical memory by glibc—&lt;em&gt;glibc memory bloat&lt;/em&gt;—can adversely affect other processes, and, under high workloads, can sometimes cause the database to run out of memory.&lt;/p&gt;
&lt;p&gt;OpenText™ Analytics Database provides two configuration parameters that let you control how frequently the database detects and consolidates much of the glibc-allocated free memory, and then returns it to the operating system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/config-parameters/memory-management-parameters/#&#34;&gt;MemoryPollerTrimThreshold&lt;/a&gt;&lt;/code&gt;: Sets the threshold for the memory poller to start checking whether to trim &lt;code&gt;glibc&lt;/code&gt;-allocated memory.  &lt;p&gt;The memory poller compares &lt;code&gt;MemoryPollerTrimThreshold&lt;/code&gt;—by default, set to 0.83— with the following expression:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;RSS&lt;/span&gt; / &lt;span class=&#34;code-variable&#34;&gt;available-memory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If this expression evaluates to a value higher than &lt;code&gt;MemoryPollerTrimThreshold&lt;/code&gt;, then the memory poller starts checking the next threshold—set in &lt;code&gt;MemoryPollerMallocBloatThreshold&lt;/code&gt;—for glibc memory bloat.&lt;/p&gt;
&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

On high-memory machines where very large database RSS values are atypical, consider a higher setting for &lt;code&gt;MemoryPollerTrimThreshold&lt;/code&gt;. To turn off auto-trimming, set this parameter to 0.

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/config-parameters/memory-management-parameters/#&#34;&gt;MemoryPollerMallocBloatThreshold&lt;/a&gt;&lt;/code&gt;: Sets the threshold of glibc memory bloat.  &lt;p&gt;The memory poller calls glibc function &lt;code&gt;malloc_info()&lt;/code&gt; to obtain the amount of free memory in malloc. It then compares &lt;code&gt;MemoryPollerMallocBloatThreshold&lt;/code&gt;—by default, set to 0.3—with the following expression:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;free-memory-in-malloc&lt;/span&gt; / &lt;span class=&#34;code-variable&#34;&gt;RSS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If this expression evaluates to a value higher than &lt;code&gt;MemoryPollerMallocBloatThreshold&lt;/code&gt;, the memory poller calls glibc function 
&lt;code&gt;&lt;a href=&#34;http://man7.org/linux/man-pages/man3/malloc_trim.3.html&#34;&gt;malloc_trim()&lt;/a&gt;&lt;/code&gt;. This function reclaims free memory from malloc and returns it to the operating system. Details on calls to &lt;code&gt;malloc_trim()&lt;/code&gt; are written to system table 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/memory-events/#&#34;&gt;MEMORY_EVENTS&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;For example, the memory poller calls &lt;code&gt;malloc_trim()&lt;/code&gt; when the following conditions are true:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;MemoryPollerMallocBloatThreshold&lt;/code&gt; is set to 0.5.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;malloc_info()&lt;/code&gt; returns 15GB memory in malloc free.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;RSS is 30GB.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

This parameter is ignored if &lt;code&gt;MemoryPollerTrimThreshold&lt;/code&gt; is set to 0 (disabled).

&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;trimming-memory-manually&#34;&gt;Trimming memory manually&lt;/h2&gt;
&lt;p&gt;If auto-trimming is disabled, you can manually reduce glibc-allocated memory by calling function 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/management-functions/db-functions/memory-trim/#&#34;&gt;MEMORY_TRIM&lt;/a&gt;&lt;/code&gt;. This function calls &lt;code&gt;malloc_trim()&lt;/code&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Tuple mover</title>
      <link>/en/admin/managing-db/tuple-mover/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/</guid>
      <description>
        
        
        &lt;p&gt;The Tuple Mover manages ROS data storage. On &lt;a href=&#34;../../../en/admin/managing-db/tuple-mover/mergeout/&#34;&gt;mergeout&lt;/a&gt;, it combines small ROS containers into larger ones and purges deleted data. The Tuple Mover automatically performs these tasks in the background.&lt;/p&gt;
&lt;p&gt;The database mode affects which nodes perform Tuple Mover operations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;In an Enterprise Mode database, all nodes run the Tuple Mover to perform mergeout operations on the data they store.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In Eon Mode, the &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/primary-subscriber/&#34; title=&#34;In an Eon Mode database, each shard has a primary subscriber node.&#34;&gt;primary subscriber&lt;/a&gt; to each &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/shard/&#34; title=&#34;A subset of the data and associated metadata stored in an Eon Mode database.&#34;&gt;shard&lt;/a&gt; plans Tuple Mover mergeout operations on the ROS containers in the shard. It can delegate the execution of this plan to another node in the cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tuple Mover operations typically require no intervention. However, Vertica provides various ways to adjust Tuple Mover behavior. For details, see &lt;a href=&#34;../../../en/admin/managing-db/tuple-mover/managing-tuple-mover/#&#34;&gt;Managing the tuple mover&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;The&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;the-tuple-mover-in-eon-mode-databases&#34;&gt;The tuple mover in Eon Mode databases&lt;/h2&gt;
&lt;p&gt;In Eon Mode, the Tuple Mover&#39;s operations are broken into two parts: mergeout planning and mergeout execution. Mergeout planning is always carried out by the &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/primary-subscriber/&#34; title=&#34;In an Eon Mode database, each shard has a primary subscriber node.&#34;&gt;primary subscribers&lt;/a&gt; of the shards involved in the mergeout. These primary subscribers are part of same the primary subcluster. As part of its mergeout planning, the primary subscriber chooses a node to execute the mergeout plan. It uses two criteria to decide which node should execute the mergeout:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Only nodes that have memory allocated to their TM resource pool are eligible to perform a mergeout. The primary subscriber ignores all nodes in subclusters whose TM pool&#39;s &lt;span class=&#34;sql&#34;&gt;MEMORYSIZE&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;MAXMEMORYSIZE&lt;/span&gt; settings are 0.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From the group of nodes able to execute a mergeout, the primary subscriber chooses the node that has the most ROS containers in its depot that are involved in the mergeout.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Limiting&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;limiting-which-subclusters-perform-mergeout-tasks&#34;&gt;Limiting which subclusters perform mergeout tasks&lt;/h3&gt;
&lt;p&gt;You can prevent a secondary subcluster from being assigned mergeout tasks by changing the &lt;span class=&#34;sql&#34;&gt;MEMORYSIZE&lt;/span&gt; and &lt;span class=&#34;sql&#34;&gt;MAXMEMORYSIZE&lt;/span&gt; settings of the its TM pool to 0. These settings prevent the primary subscribers from assigning mergeout tasks to nodes in the subcluster.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Primary subclusters must always be able to execute mergeout tasks. Only change these settings on secondary subclusters.
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;For example, this statement prevents the subcluster named dashboard from running mergeout tasks.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER RESOURCE POOL TM FOR SUBCLUSTER dashboard MEMORYSIZE &amp;#39;0%&amp;#39;
   MAXMEMORYSIZE &amp;#39;0%&amp;#39;;
&lt;/code&gt;&lt;/pre&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Managing workloads</title>
      <link>/en/admin/managing-db/managing-workloads/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/managing-workloads/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database&#39;s resource management scheme allows diverse, concurrent workloads to run efficiently on the database. For basic operations, the database pre-configures the built-in &lt;a href=&#34;../../../en/admin/managing-db/managing-workloads/resource-pool-architecture/built-pools/&#34;&gt;GENERAL pool&lt;/a&gt; based on RAM and machine cores. You can customize the General pool to handle specific concurrency requirements.&lt;/p&gt;
&lt;p&gt;You can also define new resource pools that you configure to limit memory usage, concurrency, and query priority. You can then optionally assign each database user to use a specific resource pool, which controls memory resources used by their requests.&lt;/p&gt;
&lt;p&gt;User-defined pools are useful if you have competing resource requirements across different classes of workloads. Example scenarios include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A large batch job takes up all server resources, leaving small jobs that update a web page without enough resources. This can degrade user experience.&lt;/p&gt;
&lt;p&gt;In this scenario, create a resource pool to handle web page requests and ensure users get resources they need. Another option is to create a limited resource pool for the batch job, so the job cannot use up all system resources.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An application has lower priority than other applications and you want to limit the amount of memory and number of concurrent users for the low-priority application.&lt;/p&gt;
&lt;p&gt;In this scenario, create a resource pool with an upper limit on the query&#39;s memory and associate the pool with users of the low-priority application.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also use resource pools to manage resources assigned to running queries. You can assign a run-time priority to a resource pool, as well as a threshold to assign different priorities to queries with different durations. See &lt;a href=&#34;../../../en/admin/managing-db/managing-workloads/managing-resources-query-run-time/#&#34;&gt;Managing resources at query run time&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h2 id=&#34;enterprise-mode-and-eon-mode&#34;&gt;Enterprise Mode and Eon Mode&lt;/h2&gt;
&lt;p&gt;In Enterprise Mode, there is one global set of resource pools for the entire database. In Eon Mode, you can allocate resources globally or per subcluster. See &lt;a href=&#34;../../../en/admin/managing-db/managing-workloads/workload-best-practices/managing-workload-resources-an-eon-db/#&#34;&gt;Managing workload resources in an Eon Mode database&lt;/a&gt; for more information.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Node Management Agent</title>
      <link>/en/admin/managing-db/node-management-agent/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/node-management-agent/</guid>
      <description>
        
        
        &lt;p&gt;The Node Management Agent (NMA) lets you administer your cluster with a REST API. The NMA listens on port 5554 and runs on all nodes.&lt;/p&gt;
&lt;h2 id=&#34;start-the-nma&#34;&gt;Start the NMA&lt;/h2&gt;
&lt;p&gt;To start the NMA, run the following on any Vertica node. In addition, if you want to use the recommended &lt;a href=&#34;../../../en/admin/vcluster/&#34;&gt;&lt;code&gt;vcluster&lt;/code&gt;&lt;/a&gt; utility to interact with NMA and the &lt;a href=&#34;../../../en/admin/managing-db/https-service/#&#34;&gt;HTTPS service&lt;/a&gt;, you must run it on all nodes:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ /opt/vertica/bin/manage_node_agent.sh start node_management_agent
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To verify that the NMA is running, you can send a GET request to &lt;code&gt;/v1/health&lt;/code&gt;, which returns &lt;code&gt;{&amp;quot;healthy&amp;quot;:&amp;quot;true&amp;quot;}&lt;/code&gt; if the NMA is running.&lt;/p&gt;
&lt;p&gt;When you first start the NMA, Vertica recommends that you perform this verification from inside the cluster. While you can and should still verify that the NMA is reachable from outside the cluster, doing it first from inside the cluster removes possible network and environmental interference:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ curl https://localhost:5554/v1/health -k
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;healthy&amp;#34;&lt;/span&gt;:&lt;span class=&#34;s2&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To send this and other requests from outside the cluster, see &lt;a href=&#34;../../../en/admin/managing-db/node-management-agent/nma-endpoints/#&#34;&gt;Endpoints&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If the request to &lt;code&gt;/v1/health&lt;/code&gt; hangs or otherwise fails, perform the following troubleshooting steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify that port 5554 is not being used by any other process on the target node.&lt;/li&gt;
&lt;li&gt;Verify that the host and port 5554 are accessible by the client.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;/opt/vertica/log/node_management_agent.log&lt;/code&gt; and verify that the endpoint can reach the NMA service.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;stop-the-nma&#34;&gt;Stop the NMA&lt;/h2&gt;
&lt;p&gt;To stop the NMA, send a PUT request to &lt;code&gt;/v1/nma/shutdown&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;For simplicity, the following command is run from a Vertica node and specifies paths for certificates generated by the &lt;a href=&#34;../../../en/setup/set-up-on-premises/install-using-command-line/install-with-installation-script/&#34;&gt;install_vertica script&lt;/a&gt;. To send this and other requests from outside the cluster, see &lt;a href=&#34;../../../en/admin/managing-db/node-management-agent/nma-endpoints/#&#34;&gt;Endpoints&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ curl -X PUT https://localhost:5554/v1/nma/shutdown -k &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;    --key /opt/vertica/config/https_certs/dbadmin.key &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;    --cert /opt/vertica/config/https_certs/dbadmin.pem &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;    --cacert /opt/vertica/config/https_certs/rootca.pem
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;shutdown_error&amp;#34;&lt;/span&gt;:&lt;span class=&#34;s2&#34;&gt;&amp;#34;Null&amp;#34;&lt;/span&gt;,&lt;span class=&#34;s2&#34;&gt;&amp;#34;shutdown_message&amp;#34;&lt;/span&gt;:&lt;span class=&#34;s2&#34;&gt;&amp;#34;NMA server stopped&amp;#34;&lt;/span&gt;,&lt;span class=&#34;s2&#34;&gt;&amp;#34;shutdown_scheduled&amp;#34;&lt;/span&gt;:&lt;span class=&#34;s2&#34;&gt;&amp;#34;NMA server shutdown scheduled&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
    </item>
    
    <item>
      <title>Admin: HTTPS service</title>
      <link>/en/admin/managing-db/https-service/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/https-service/</guid>
      <description>
        
        
        &lt;p&gt;The HTTPS service lets clients securely access and manage an OpenText™ Analytics Database with a REST API. This service listens on &lt;a href=&#34;../../../en/setup/set-up-on-premises/before-you-install/configure-network/ensure-ports-are-available/&#34;&gt;port 8443&lt;/a&gt; and runs on all nodes.&lt;/p&gt;
&lt;p&gt;Most &lt;a href=&#34;../../../en/admin/managing-db/https-service/https-endpoints/&#34;&gt;HTTPS service endpoints&lt;/a&gt; require authentication, and only the &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-users/types-of-db-users/db-admin-user/&#34;&gt;dbadmin&lt;/a&gt; user can authenticate to the HTTPS service. The following endpoints serve documentation on the endpoints and do not require authentication (&lt;a href=&#34;#alter-the-tls-configuration&#34;&gt;unless your &lt;code&gt;TLSMODE&lt;/code&gt; is &lt;code&gt;VERIFY_CA&lt;/code&gt;&lt;/a&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/swagger/ui&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/swagger/{RESOURCE}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/api-docs/oas-3.0.0.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This service encrypts communications with &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/mutual-mode/&#34; title=&#34;When a database is configured for TLS/SSL security in mutual mode, incoming client requests verify the certificate of the server, and the server also requires that each client present a certificate and private key so that the server can verify the client.&#34;&gt;mutual TLS (mTLS)&lt;/a&gt;. To configure mTLS, you must alter the &lt;code&gt;server&lt;/code&gt; TLS configuration with a &lt;code&gt;server&lt;/code&gt; certificate and a trusted Certificate Authority (CA). For mTLS authentication, each client request must include a certificate that is signed by the CA in the &lt;code&gt;server&lt;/code&gt; TLS configuration and specifies the dbadmin user in the Common Name (CN). For additional details about these TLS components, see &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/#&#34;&gt;TLS protocol&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
During installation, the &lt;a href=&#34;../../../en/setup/set-up-on-premises/install-using-command-line/install-with-installation-script/&#34;&gt;install_vertica script&lt;/a&gt; generates self-signed certificates in the &lt;code&gt;/opt/vertica/config/https_certs&lt;/code&gt; directory. Vertica uses these certificates to bootstrap the HTTPS service on a new cluster—they are not suitable for production. Certificates in the TLS configuration supersede those in the &lt;code&gt;/opt/vertica/config/https_certs&lt;/code&gt; directory.
&lt;/div&gt;
&lt;h2 id=&#34;password-authentication&#34;&gt;Password authentication&lt;/h2&gt;
&lt;p&gt;The following command connects to the HTTPS service from outside the cluster with the username and password:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ curl --insecure --user dbadmin:&lt;span class=&#34;code-variable&#34;&gt;db-password&lt;/span&gt; https://10.20.30.40:8443/&lt;span class=&#34;code-variable&#34;&gt;endpoint&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Due to security concerns, this request method is not recommended. For example, the command history can save the dbadmin password.
&lt;/div&gt;
&lt;h2 id=&#34;certificate-authentication&#34;&gt;Certificate authentication&lt;/h2&gt;
&lt;p&gt;Client requests authenticate to the HTTPS service with a private key and certificate:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ curl https://10.20.30.40:8443/&lt;span class=&#34;code-variable&#34;&gt;endpoint&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;    --key &lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;/&lt;span class=&#34;code-variable&#34;&gt;to&lt;/span&gt;/client_key.key &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;    --cert &lt;span class=&#34;code-variable&#34;&gt;path&lt;/span&gt;/&lt;span class=&#34;code-variable&#34;&gt;to&lt;/span&gt;/client_cert.pem &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When the database server receives the request, it verifies that the client certificate is signed by a trusted CA and specifies the dbadmin user. To establish this workflow, you must complete the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alter the &lt;code&gt;server&lt;/code&gt; TLS configuration with a server certificate and a CA.&lt;/li&gt;
&lt;li&gt;Generate a client certificate that is signed by the CA in the &lt;code&gt;server&lt;/code&gt; TLS configuration. The client certificate &lt;code&gt;SUBJECT&lt;/code&gt; must specify the dbadmin user.&lt;/li&gt;
&lt;li&gt;Grant TLS access to the database.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

&lt;p&gt;To demonstrate a comprehensive setup, the following sections use a self-signed CA certificate that signs both the client and server certificates. In a production environment, you should replace the self-signed CA with a trusted CA.&lt;/p&gt;
&lt;p&gt;For details about importing a CA certificate, see &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/tls-overview/generating-tls-certificates-and-keys/#&#34;&gt;Generating TLS certificates and keys&lt;/a&gt;.&lt;/p&gt;


&lt;/div&gt;
&lt;h3 id=&#34;create-a-ca-certificate&#34;&gt;Create a CA certificate&lt;/h3&gt;

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
A self-signed CA certificate is convenient for development purposes, but you should always use a proper certificate authority in a production environment.
&lt;/div&gt;

&lt;p&gt;A CA is a trusted entity that signs and validates other certificates with its own certificate. The following example generates a self-signed root CA certificate:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Generate or import a private key. The following command generates a new private key:


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE KEY &lt;span class=&#34;code-variable&#34;&gt;ca_private_key&lt;/span&gt; TYPE &#39;RSA&#39; LENGTH 4096;
CREATE KEY
&lt;/code&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generate the certificate with the following format. Sign the certificate with the private key that you generated or imported in the previous step:


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE CA CERTIFICATE &lt;span class=&#34;code-variable&#34;&gt;ca_certificate&lt;/span&gt;
SUBJECT &#39;/C=&lt;span class=&#34;code-variable&#34;&gt;country_code&lt;/span&gt;/ST=&lt;span class=&#34;code-variable&#34;&gt;state_or_province&lt;/span&gt;/L=&lt;span class=&#34;code-variable&#34;&gt;locality&lt;/span&gt;/O=&lt;span class=&#34;code-variable&#34;&gt;organization&lt;/span&gt;/OU=&lt;span class=&#34;code-variable&#34;&gt;org_unit&lt;/span&gt;/CN=Vertica Root CA&#39;
VALID FOR &lt;span class=&#34;code-variable&#34;&gt;days_valid&lt;/span&gt;
EXTENSIONS &#39;authorityKeyIdentifier&#39; = &#39;keyid:always,issuer&#39;, &#39;nsComment&#39; = &#39;Vertica generated root CA cert&#39;
KEY &lt;span class=&#34;code-variable&#34;&gt;ca_private_key&lt;/span&gt;;
&lt;/code&gt;
&lt;/pre&gt;&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The CA certificate &lt;code&gt;SUBJECT&lt;/code&gt; must be different from the &lt;code&gt;SUBJECT&lt;/code&gt; of any certificate that it signs.

&lt;/div&gt;
&lt;p&gt;For example:    

&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE CA CERTIFICATE SSCA_cert
SUBJECT &#39;/C=US/ST=Massachusetts/L=Cambridge/O=OpenText/OU=Vertica/CN=Vertica Root CA&#39;
VALID FOR 3650
EXTENSIONS &#39;nsComment&#39; = &#39;Self-signed root CA cert&#39;
KEY SSCA_key;
&lt;/code&gt;
&lt;/pre&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&#34;create-the-server-certificate&#34;&gt;Create the server certificate&lt;/h3&gt;
&lt;p&gt;The server private key and certificate verify the database server&#39;s identity for clients:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Generate the server private key:&lt;/p&gt;


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE KEY &lt;span class=&#34;code-variable&#34;&gt;server_private_key&lt;/span&gt; TYPE &#39;RSA&#39; LENGTH 2048;
CREATE KEY
    &lt;/code&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generate the server certificate with the following format. Include the &lt;span class=&#34;code-variable&#34;&gt;server_private_key&lt;/span&gt;, and sign it with the CA certificate:&lt;/p&gt;


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE CERTIFICATE &lt;span class=&#34;code-variable&#34;&gt;server_certificate&lt;/span&gt;
SUBJECT &#39;/C=&lt;span class=&#34;code-variable&#34;&gt;country_code&lt;/span&gt;/ST=&lt;span class=&#34;code-variable&#34;&gt;state_or_province&lt;/span&gt;/L=&lt;span class=&#34;code-variable&#34;&gt;locality&lt;/span&gt;/O=&lt;span class=&#34;code-variable&#34;&gt;organization&lt;/span&gt;/OU=&lt;span class=&#34;code-variable&#34;&gt;org_unit&lt;/span&gt;/CN=Vertica server certificate&#39;
SIGNED BY &lt;span class=&#34;code-variable&#34;&gt;ca_certificate&lt;/span&gt;
KEY &lt;span class=&#34;code-variable&#34;&gt;server_private_key&lt;/span&gt;;
CREATE CERTIFICATE
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;For example:&lt;/p&gt;


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; CREATE CERTIFICATE &lt;span class=&#34;code-variable&#34;&gt;server_certificate&lt;/span&gt;
SUBJECT &#39;/C=US/ST=Massachusetts/L=Burlington/O=OpenText/OU=Vertica/CN=Vertica server certificate&#39;
SIGNED BY &lt;span class=&#34;code-variable&#34;&gt;ca_certificate&lt;/span&gt;
KEY &lt;span class=&#34;code-variable&#34;&gt;server_private_key&lt;/span&gt;;
CREATE CERTIFICATE
&lt;/code&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;alter-the-tls-configuration&#34;&gt;Alter the TLS configuration&lt;/h3&gt;
&lt;p&gt;After you generate the server certificate, you must alter the server&#39;s default &lt;a href=&#34;../../../en/security-and-authentication/tls-protocol/tls-overview/tls-configs/&#34;&gt;TLS configuration&lt;/a&gt; with the server certificate and its CA. When you change the &lt;code&gt;server&lt;/code&gt; TLS configuration, the HTTPS service restarts, and the new keys and certificates are added to the catalog and distributed to the nodes in the cluster:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-tls-config/&#34;&gt;Alter the default server configuration&lt;/a&gt;. Mutual TLS requires that you set &lt;code&gt;TLSMODE&lt;/code&gt; to &lt;code&gt;TRY_VERIFY&lt;/code&gt; or &lt;code&gt;VERIFY_CA&lt;/code&gt;. If you use &lt;code&gt;VERIFY_CA&lt;/code&gt;, all endpoints (including the documentation-related endpoints &lt;code&gt;/swagger/ui&lt;/code&gt;, &lt;code&gt;/swagger/{RESOURCE}&lt;/code&gt;, and &lt;code&gt;/api-docs/oas-3.0.0.json&lt;/code&gt;) require authentication:&lt;/p&gt;


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
=&gt; ALTER TLS CONFIGURATION server CERTIFICATE &lt;span class=&#34;code-variable&#34;&gt;server_certificate&lt;/span&gt; ADD CA CERTIFICATES &lt;span class=&#34;code-variable&#34;&gt;ca_certificate&lt;/span&gt; TLSMODE &#39;VERIFY_CA&#39;;
ALTER TLS CONFIGURATION&lt;/code&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify the changes on the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/tls-configs/&#34;&gt;TLS configuration object&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;certificate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ca_certificate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;mode&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TLS_CONFIGURATIONS&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WHERE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;server&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;certificate&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;     &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ca_certificate&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;mode&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;--------+--------------------+----------------+------------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;server&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;server_certificate&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ca_certificate&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VERIFY_CA&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;row&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;create-the-client-certificate&#34;&gt;Create the client certificate&lt;/h3&gt;
&lt;p&gt;The client private key and certificate verify the client&#39;s identity for requests. Generate a client private key and a client certificate that specifies the dbadmin user and sign the client certificate with the same CA that signed the server certificate.&lt;/p&gt;
&lt;p&gt;The following steps generate a client key and certificate, and then make them available to the client:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Generate the client key:


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
   =&gt; CREATE KEY &lt;span class=&#34;code-variable&#34;&gt;client_private_key&lt;/span&gt; TYPE &#39;RSA&#39; LENGTH 2048;
   CREATE KEY
   &lt;/code&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generate the client certificate. Mutual TLS requires that the Common Name (&lt;code&gt;CN&lt;/code&gt;) in the &lt;code&gt;SUBJECT&lt;/code&gt; specifies a database username:


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
   =&gt; CREATE CERTIFICATE &lt;span class=&#34;code-variable&#34;&gt;client_certificate&lt;/span&gt;
   SUBJECT &#39;/C=US/ST=Massachusetts/L=Cambridge/O=OpenText/OU=Vertica/CN=dbadmin/emailAddress=&lt;span class=&#34;code-variable&#34;&gt;example&lt;/span&gt;@example.com&#39;
   SIGNED BY &lt;span class=&#34;code-variable&#34;&gt;ca_certificate&lt;/span&gt;
   EXTENSIONS &#39;nsComment&#39; = &#39;Vertica client cert&#39;, &#39;extendedKeyUsage&#39; = &#39;clientAuth&#39;
   KEY &lt;span class=&#34;code-variable&#34;&gt;client_private_key&lt;/span&gt;;
   CREATE CERTIFICATE
   &lt;/code&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the client machine, export the client key and client certificate to the client filesystem. The following commands use the &lt;a href=&#34;../../../en/connecting-to/using-vsql/installing-vsql-client/&#34;&gt;vsql client&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ vsql -At -c &lt;span class=&#34;s2&#34;&gt;&amp;#34;SELECT key FROM cryptographic_keys WHERE name = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;client_private_key&lt;/span&gt;&amp;#39;;&amp;#34;&lt;/span&gt; -o &lt;span class=&#34;code-variable&#34;&gt;client_private_key&lt;/span&gt;.key
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ vsql -At -c &lt;span class=&#34;s2&#34;&gt;&amp;#34;SELECT certificate_text FROM certificates WHERE name = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;client_certificate&lt;/span&gt;&amp;#39;;&amp;#34;&lt;/span&gt; -o &lt;span class=&#34;code-variable&#34;&gt;client_cert&lt;/span&gt;.pem
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the preceding command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-A&lt;/code&gt;: enables unaligned output.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-t&lt;/code&gt;: prevents the command from outputting metadata, such as column names.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-c&lt;/code&gt;: instructs the shell to run one command and then exit.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-o&lt;/code&gt;: writes the query output to the specified filename.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details about all vsql command line options, see &lt;a href=&#34;../../../en/connecting-to/using-vsql/connecting-from-command-line/command-line-options/#&#34;&gt;Command-line options&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy or move the client key and certificate to a location that your client recognizes.&lt;/p&gt;
&lt;p&gt;The following commands move the client key and certificate to the hidden directory &lt;code&gt;~/.client-creds&lt;/code&gt;, and then grants the file owner read and write permissions with &lt;code&gt;chmod&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ mkdir ~/.client-creds
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ mv &lt;span class=&#34;code-variable&#34;&gt;client_private_key&lt;/span&gt;.key ~/.client-creds/client_key.key
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ mv &lt;span class=&#34;code-variable&#34;&gt;client_cert&lt;/span&gt;.pem ~/.client-creds/client_cert.pem
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ chmod &lt;span class=&#34;m&#34;&gt;600&lt;/span&gt; ~/.client-creds/client_key.key ~/.client-creds/client_cert.pem
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&#34;create-an-authentication-record&#34;&gt;Create an authentication record&lt;/h3&gt;
&lt;p&gt;Next, you must create an &lt;a href=&#34;../../../en/security-and-authentication/client-authentication/creating-authentication-records/&#34;&gt;authentication record&lt;/a&gt; in the database. An authentication record defines a set of authentication and the access methods for the database. You grant this record to a user or role to control how they authenticate to the database:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-authentication/&#34;&gt;Create the authentication record&lt;/a&gt;. The &lt;code&gt;tls&lt;/code&gt; method requires that clients authenticate with a certificate whose Common Name (CN) specifies a database username:


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
   =&gt; CREATE AUTHENTICATION &lt;span class=&#34;code-variable&#34;&gt;auth_record&lt;/span&gt; METHOD &#39;tls&#39; HOST TLS &#39;0.0.0.0/0&#39;;
   CREATE AUTHENTICATION
   &lt;/code&gt;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../en/sql-reference/statements/grant-statements/grant-authentication/&#34;&gt;Grant the authentication record&lt;/a&gt; to a user or to a role. The following example grants the authentication record to &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-roles/predefined-db-roles/public/&#34;&gt;PUBLIC&lt;/a&gt;, the &lt;a href=&#34;../../../en/admin/db-users-and-privileges/db-roles/enabling-roles-automatically/&#34;&gt;default role&lt;/a&gt; for all users:


&lt;pre class=&#34;table-pre chroma language-sql&#34; &gt;
      &lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;
   =&gt; GRANT AUTHENTICATION &lt;span class=&#34;code-variable&#34;&gt;auth_record&lt;/span&gt; TO PUBLIC;
   GRANT AUTHENTICATION
   &lt;/code&gt;
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After you grant the authentication record, the user or role can access &lt;a href=&#34;#endpoints&#34;&gt;HTTPS service endpoints&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;mutual-tls-for-cluster-operations&#34;&gt;Mutual TLS for cluster operations&lt;/h2&gt;
&lt;p&gt;When you configure a database for TLS/SSL security in mutual mode, incoming client requests verify the server certificate. Each client needs to present a certificate and private key so that the server can verify the client. For the server, this means validating that the client certificate was signed by a chain of CA certificates terminating in a trusted CA certificate, typically but not necessarily a root (self-signed) CA certificate. For the client, this means performing the same validation as the server for the server certificate and ensuring that the server certificate belongs to the intended server.&lt;/p&gt;

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Validating the server hostname is optional. It is based on your network topology, client usage, and security requirements.
&lt;/div&gt;
&lt;h3 id=&#34;generate-and-set-the-certificate-for-the-nma-or-https-service-with-hostname-validation&#34;&gt;Generate and set the certificate for the NMA or HTTPS service with hostname validation&lt;/h3&gt;
&lt;p&gt;When generating a server certificate where the client validates the server hostname, the certificate must be valid for the expected hostnames and IPs.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; CREATE CERTIFICATE certificate_usable_by_nma_and_https_service
SUBJECT &amp;#39;/C=US/ST=Massachusetts/L=Cambridge/O=OpenText/OU=Vertica/CN=Vertica server alt/emailAddress=doesntmatter@example.com&amp;#39;
SIGNED BY rootca
EXTENSIONS &amp;#39;nsComment&amp;#39; = &amp;#39;Vertica/NMA server cert with IP hostname&amp;#39;, &amp;#39;extendedKeyUsage&amp;#39; = &amp;#39;serverAuth,clientAuth&amp;#39;,
&amp;#39;subjectAltName&amp;#39; = &amp;#39;IP.1:192.168.1.101,IP.2:192.168.1.102,IP.3:192.168.1.103,IP.4:192.168.1.104,DNS.1:mynode1.mydomain.com,DNS.2:mynode2.mydomain.com,DNS.3:mynode3.mydomain.com,DNS.4:mynode4.mydomain.com&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are 4 IPs in this example, as it is a 4-node cluster. Generate the NMA certificate with &#39;serverAuth,clientAuth&#39; as the &lt;code&gt;extendedKeyUsage&lt;/code&gt; option when the server TLS configuration in the database is in VERIFY_CA mode or higher. Otherwise, use &lt;code&gt;serverAuth&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;enable-mutual-tls-for-cluster-operations&#34;&gt;Enable Mutual TLS for cluster operations&lt;/h3&gt;
&lt;p&gt;To enable mutual TLS for cluster operations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Generate the server and client certificates. For more information, see &lt;a href=&#34;#create-the-server-certificate&#34;&gt;Create the server certificate&lt;/a&gt; and &lt;a href=&#34;#create-the-client-certificate&#34;&gt;Create the client certificate&lt;/a&gt;. To generate the server certificate, use the subjectAltName setting mentioned in &lt;a href=&#34;#generate-and-set-the-certificate-for-the-nma-or-https-service-with-hostname-validation&#34;&gt;Generate and set the certificate for the NMA or HTTPS service with hostname validation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Either create a separate NMA client/server certificate or reuse the database server certificate that is generated. Specify &#39;extendedKeyUsage&#39; = &#39;serverAuth,clientAuth&#39; when generating the certificate to allow NMA to present a certificate to the database.&lt;/li&gt;
&lt;li&gt;Export the NMA certificate and key and the CA certificate to a location accessible to each node on the cluster.&lt;/li&gt;
&lt;li&gt;For each node, point the NMA at the new certificate, key, and CA certificate. For more information, see &lt;a href=&#34;../../../en/admin/managing-db/node-management-agent/custom-certificates/#&#34;&gt;Custom certificates&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Set the TLS mode environment variable for NMA before starting NMA as shown here.
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;export NMA_CLIENT_TLS_MODE=VERIFY_FULL
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Restart the NMA on each node.&lt;/li&gt;
&lt;li&gt;Export the CA certificate from Step 1 to a location accessible to the client.&lt;/li&gt;
&lt;li&gt;Configure the server TLS CONFIGURATION object as mentioned above. Use &lt;code&gt;VERIFY_CA&lt;/code&gt; for the TLS mode option.&lt;/li&gt;
&lt;li&gt;For clients calling the API, use the exported client certificate, client key, and trusted CA certificate to perform mutual TLS.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;tlsmode-environment-variable-for-sql-client-connections&#34;&gt;TLSMode environment variable for SQL client connections&lt;/h2&gt;
&lt;p&gt;The environment variable NMA_CLIENT_TLS_MODE controls TLS mode for NMA SQL client connections. You must export the value on NMA startup. The TLS modes are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;enable # the default&lt;/li&gt;
&lt;li&gt;verify_ca&lt;/li&gt;
&lt;li&gt;verify_full&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each value specifies a different set of requirements that the database server needs to connect with NMA for operations using the NMA as a SQL proxy. The database server has requirements of the NMA certificate, but this is independent of the NMA requirements of the database server certificate.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable – This is the current behavior. The system accepts database server certificates with no validation.&lt;/li&gt;
&lt;li&gt;verify_ca – This means the database server certificate is signed by a trusted CA.&lt;/li&gt;
&lt;li&gt;verify_full – This means the database server certificate is signed by a trusted CA and validated for the expected hostname.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
