Назад | Перейти на главную страницу

Кластер высокой доступности с ПК

Я использую Ubuntu 18.04LTS. Кажется, я не могу понять, почему этот кластер не будет работать. Я считаю, что служба Corosync не запускается. Я начал с sudo pcs cluster setup --name cluster_test node1 node2 --force, с которым вроде бы все хорошо. Результат был

Destroying cluster on nodes: node1, node2...
node2: Stopping Cluster (pacemaker)...
node1: Stopping Cluster (pacemaker)...
node2: Successfully destroyed cluster
node1: Successfully destroyed cluster

Sending 'pacemaker_remote authkey' to 'node1', 'node2'
node1: successful distribution of the file 'pacemaker_remote authkey'
node2: successful distribution of the file 'pacemaker_remote authkey'
Sending cluster config files to the nodes...
node1: Succeeded
node2: Succeeded

Synchronizing pcsd certificates on nodes node1, node2...
node1: Success
node2: Success
Restarting pcsd on the nodes in order to reload the certificates...
node1: Success
node2: Success

Если я попробую sudo pcs cluster enable --all:

node1: Cluster Enabled
node2: Cluster Enabled

Потом я попробовал sudo pcs cluster start --all и я получил:

node1: Error connecting to node1 - (HTTP error: 400)
node2: Error connecting to node2 - (HTTP error: 400)
Error: unable to start all nodes
node1: Error connecting to node1 - (HTTP error: 400)
node2: Error connecting to node2 - (HTTP error: 400)

Это спорт, в котором я не могу понять, что не так. Ниже приведены файлы конфигурации и выходы для записей журнала.

Файл на /etc/corosync/corosync.conf содержит это в обеих системах:

totem {
    version: 2
    cluster_name: cluster_test
    secauth: off
    transport: udpu
}

nodelist {
    node {
        ring0_addr: node1
        nodeid: 1
    }

    node {
        ring0_addr: node2
        nodeid: 2
    }
}

quorum {
    provider: corosync_votequorum
    two_node: 1
}

logging {
    to_logfile: yes
    logfile: /var/log/corosync/corosync.log
    to_syslog: yes
}

Если я попытаюсь запустить Corosync вручную, набрав sudo service corosync start Я получил:

Job for corosync.service failed because the control process exited with error code.
See "systemctl status corosync.service" and "journalctl -xe" for details.

systemctl status corosync.service вывод:

● corosync.service - Corosync Cluster Engine
   Loaded: loaded (/lib/systemd/system/corosync.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-04-28 14:21:35 MDT; 1min 2s ago
     Docs: man:corosync
           man:corosync.conf
           man:corosync_overview
  Process: 4453 ExecStart=/usr/sbin/corosync -f $COROSYNC_OPTIONS (code=exited, status=8)
 Main PID: 4453 (code=exited, status=8)

Apr 28 14:21:35 node1 systemd[1]: Starting Corosync Cluster Engine...
Apr 28 14:21:35 node1 systemd[1]: corosync.service: Main process exited, code=exited, status=8/n/a
Apr 28 14:21:35 node1 systemd[1]: corosync.service: Failed with result 'exit-code'.
Apr 28 14:21:35 node1 systemd[1]: Failed to start Corosync Cluster Engine.

journalctl -xe вывод:

Apr 28 14:21:35 node1 systemd[1]: Starting Corosync Cluster Engine...
-- Subject: Unit corosync.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit corosync.service has begun starting up.
Apr 28 14:21:35 node1 systemd[1]: corosync.service: Main process exited, code=exited, status=8/n/a
Apr 28 14:21:35 node1 systemd[1]: corosync.service: Failed with result 'exit-code'.
Apr 28 14:21:35 node1 systemd[1]: Failed to start Corosync Cluster Engine.
-- Subject: Unit corosync.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit corosync.service has failed.
--
-- The result is RESULT.
Apr 28 14:21:35 node1 sudo[4423]: pam_unix(sudo:session): session closed for user root

Я просто не знаю, что делать. Любая помощь будет принята с благодарностью.