1<refentry id="repmgr-cluster-crosscheck"> 2 <indexterm> 3 <primary>repmgr cluster crosscheck</primary> 4 </indexterm> 5 6 7 <refmeta> 8 <refentrytitle>repmgr cluster crosscheck</refentrytitle> 9 </refmeta> 10 11 <refnamediv> 12 <refname>repmgr cluster crosscheck</refname> 13 <refpurpose>cross-checks connections between each combination of nodes</refpurpose> 14 </refnamediv> 15 16 <refsect1> 17 <title>Description</title> 18 <para> 19 <command>repmgr cluster crosscheck</command> is similar to <xref linkend="repmgr-cluster-matrix"/>, 20 but cross-checks connections between each combination of nodes. In "Example 3" in 21 <xref linkend="repmgr-cluster-matrix"/> we have no information about the state of <literal>node3</literal>. 22 However by running <command>repmgr cluster crosscheck</command> it's possible to get a better 23 overview of the cluster situation: 24 <programlisting> 25 $ repmgr -f /etc/repmgr.conf cluster crosscheck 26 27 Name | Id | 1 | 2 | 3 28 -------+----+----+----+---- 29 node1 | 1 | * | * | x 30 node2 | 2 | * | * | * 31 node3 | 3 | * | * | *</programlisting> 32 </para> 33 <para> 34 What happened is that <command>repmgr cluster crosscheck</command> merged its own 35 <command><link linkend="repmgr-cluster-matrix">repmgr cluster matrix</link></command> with the 36 <command>repmgr cluster matrix</command> output from <literal>node2</literal>; the latter is 37 able to connect to <literal>node3</literal> 38 and therefore determine the state of outbound connections from that node. 39 </para> 40 </refsect1> 41 42 <refsect1> 43 <title>Exit codes</title> 44 <para> 45 One of the following exit codes will be emitted by <command>repmgr cluster crosscheck</command>: 46 </para> 47 <variablelist> 48 49 <varlistentry> 50 <term><option>SUCCESS (0)</option></term> 51 <listitem> 52 <para> 53 The check completed successfully and all nodes are reachable. 54 </para> 55 </listitem> 56 </varlistentry> 57 58 <varlistentry> 59 <term><option>ERR_BAD_SSH (12)</option></term> 60 <listitem> 61 <para> 62 One or more nodes could not be accessed via SSH. 63 </para> 64 <note> 65 <simpara> 66 This only applies to nodes unreachable from the node where 67 this command is executed. 68 </simpara> 69 <simpara> 70 It's also possible that the crosscheck establishes that 71 connections between PostgreSQL on all nodes are functioning, 72 even if SSH access between some nodes is not possible. 73 </simpara> 74 </note> 75 </listitem> 76 </varlistentry> 77 78 <varlistentry> 79 <term><option>ERR_NODE_STATUS (25)</option></term> 80 <listitem> 81 <para> 82 PostgreSQL on one or more nodes could not be reached. 83 </para> 84 <note> 85 <simpara> 86 This error code overrides <option>ERR_BAD_SSH</option>. 87 </simpara> 88 </note> 89 </listitem> 90 </varlistentry> 91 92 </variablelist> 93 </refsect1> 94 95</refentry> 96 97