Error: “A slave with the same server_uuid/server_id as this slave has connected to the master”












0















I am testing a node.js client which connects to a mysql DB (mariadb). It works fine on its own, but if I launch this client simultaneously on another host, the first instance gets disconnected with the following error. I have read some posts suggesting to change the server-id in my.cnf, but that didn't help. Besides, why would I need to change the id of the server since both clients are pointing to the same server?



{ Error: UNKNOWN_CODE_PLEASE_REPORT: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-b
in.000024' at 334, the last event read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.
at Binlog.Sequence._packetToError (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Binlog.Sequence.ErrorPacket (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:17)
at Protocol._parsePacket (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:278:23)
at Parser.write (/home/myapp/node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket.<anonymous> (/home/myappp/node_modules/mysql/lib/Connection.js:91:28)
at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
--------------------
at Protocol._enqueue (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Immediate._start (/home/myapp/node_modules/@rodrigogs/zongji/index.js:234:31)
at processImmediate (timers.js:632:19)
code: 'UNKNOWN_CODE_PLEASE_REPORT',
errno: 4052,
sqlMessage:
"A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000024' at 334, the last event
read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.",
sqlState: 'HY000' }
{ Error: Connection lost: The server closed the connection.
at Protocol.end (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:112:13)
at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:97:28)
at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
at Socket.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process.internalTickCallback (internal/process/next_tick.js:72:19) fatal: true, code: 'PROTOCOL_CONNECTION_LOST' }








share





























    0















    I am testing a node.js client which connects to a mysql DB (mariadb). It works fine on its own, but if I launch this client simultaneously on another host, the first instance gets disconnected with the following error. I have read some posts suggesting to change the server-id in my.cnf, but that didn't help. Besides, why would I need to change the id of the server since both clients are pointing to the same server?



    { Error: UNKNOWN_CODE_PLEASE_REPORT: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-b
    in.000024' at 334, the last event read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.
    at Binlog.Sequence._packetToError (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Binlog.Sequence.ErrorPacket (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:17)
    at Protocol._parsePacket (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:278:23)
    at Parser.write (/home/myapp/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/home/myappp/node_modules/mysql/lib/Connection.js:91:28)
    at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    --------------------
    at Protocol._enqueue (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Immediate._start (/home/myapp/node_modules/@rodrigogs/zongji/index.js:234:31)
    at processImmediate (timers.js:632:19)
    code: 'UNKNOWN_CODE_PLEASE_REPORT',
    errno: 4052,
    sqlMessage:
    "A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000024' at 334, the last event
    read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.",
    sqlState: 'HY000' }
    { Error: Connection lost: The server closed the connection.
    at Protocol.end (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:112:13)
    at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:97:28)
    at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)
    at process.internalTickCallback (internal/process/next_tick.js:72:19) fatal: true, code: 'PROTOCOL_CONNECTION_LOST' }








    share



























      0












      0








      0








      I am testing a node.js client which connects to a mysql DB (mariadb). It works fine on its own, but if I launch this client simultaneously on another host, the first instance gets disconnected with the following error. I have read some posts suggesting to change the server-id in my.cnf, but that didn't help. Besides, why would I need to change the id of the server since both clients are pointing to the same server?



      { Error: UNKNOWN_CODE_PLEASE_REPORT: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-b
      in.000024' at 334, the last event read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.
      at Binlog.Sequence._packetToError (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
      at Binlog.Sequence.ErrorPacket (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:17)
      at Protocol._parsePacket (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:278:23)
      at Parser.write (/home/myapp/node_modules/mysql/lib/protocol/Parser.js:76:12)
      at Protocol.write (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:38:16)
      at Socket.<anonymous> (/home/myappp/node_modules/mysql/lib/Connection.js:91:28)
      at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
      at Socket.emit (events.js:182:13)
      at addChunk (_stream_readable.js:283:12)
      at readableAddChunk (_stream_readable.js:264:11)
      --------------------
      at Protocol._enqueue (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:144:48)
      at Immediate._start (/home/myapp/node_modules/@rodrigogs/zongji/index.js:234:31)
      at processImmediate (timers.js:632:19)
      code: 'UNKNOWN_CODE_PLEASE_REPORT',
      errno: 4052,
      sqlMessage:
      "A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000024' at 334, the last event
      read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.",
      sqlState: 'HY000' }
      { Error: Connection lost: The server closed the connection.
      at Protocol.end (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:112:13)
      at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:97:28)
      at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
      at Socket.emit (events.js:187:15)
      at endReadableNT (_stream_readable.js:1094:12)
      at process.internalTickCallback (internal/process/next_tick.js:72:19) fatal: true, code: 'PROTOCOL_CONNECTION_LOST' }








      share
















      I am testing a node.js client which connects to a mysql DB (mariadb). It works fine on its own, but if I launch this client simultaneously on another host, the first instance gets disconnected with the following error. I have read some posts suggesting to change the server-id in my.cnf, but that didn't help. Besides, why would I need to change the id of the server since both clients are pointing to the same server?



      { Error: UNKNOWN_CODE_PLEASE_REPORT: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-b
      in.000024' at 334, the last event read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.
      at Binlog.Sequence._packetToError (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
      at Binlog.Sequence.ErrorPacket (/home/myapp/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:17)
      at Protocol._parsePacket (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:278:23)
      at Parser.write (/home/myapp/node_modules/mysql/lib/protocol/Parser.js:76:12)
      at Protocol.write (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:38:16)
      at Socket.<anonymous> (/home/myappp/node_modules/mysql/lib/Connection.js:91:28)
      at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
      at Socket.emit (events.js:182:13)
      at addChunk (_stream_readable.js:283:12)
      at readableAddChunk (_stream_readable.js:264:11)
      --------------------
      at Protocol._enqueue (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:144:48)
      at Immediate._start (/home/myapp/node_modules/@rodrigogs/zongji/index.js:234:31)
      at processImmediate (timers.js:632:19)
      code: 'UNKNOWN_CODE_PLEASE_REPORT',
      errno: 4052,
      sqlMessage:
      "A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000024' at 334, the last event
      read from 'mysql-bin.000024' at 256, the last byte read from 'mysql-bin.000024' at 334.",
      sqlState: 'HY000' }
      { Error: Connection lost: The server closed the connection.
      at Protocol.end (/home/myapp/node_modules/mysql/lib/protocol/Protocol.js:112:13)
      at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:97:28)
      at Socket.<anonymous> (/home/myapp/node_modules/mysql/lib/Connection.js:502:10)
      at Socket.emit (events.js:187:15)
      at endReadableNT (_stream_readable.js:1094:12)
      at process.internalTickCallback (internal/process/next_tick.js:72:19) fatal: true, code: 'PROTOCOL_CONNECTION_LOST' }






      mysql mariadb-10.3 node.js





      share














      share












      share



      share








      edited 3 mins ago







      ChrisF

















      asked 9 mins ago









      ChrisFChrisF

      31




      31






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231414%2ferror-a-slave-with-the-same-server-uuid-server-id-as-this-slave-has-connected%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231414%2ferror-a-slave-with-the-same-server-uuid-server-id-as-this-slave-has-connected%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL Server 17 - Attemping to backup to remote NAS but Access is denied

          Always On Availability groups resolving state after failover - Remote harden of transaction...

          Restoring from pg_dump with foreign key constraints