ot-node icon indicating copy to clipboard operation
ot-node copied to clipboard

DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1

Open tjosm opened this issue 2 years ago • 0 comments

Issue description

I was monitoring the logs and I came across this error where node crashed and automatically restarted. This node has been running for 5 days. I occasionally see #2091. Node worked fine apart from that. Full log entry for the error is at the end of this post.

I went ahead and searched for similar errors in the logs. This is what I saw,

root@origintrail-testnet-node:~# journalctl -u otnode --output cat | grep "SequelizeDatabaseError"
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1

This has happened multiple times.

Expected behavior

Actual behavior

Crashed and automatically restarted.

Specifications

  • Node version: v6.6.6-beta.2.2.4
  • Platform: Ubuntu 20.04
  • Node wallet: 0x25F00506764E902747b1FbAc214B5B96aDc18eF0 (OP)
  • Node libp2p identity: 0x0e68a6BB3db88b0aeB5489A0C3De6e761e426ADF

Error logs

[2022-09-17 13:07:37] DEBUG: Reading operation id: a62d3d50-0491-4e79-a0f8-76428034e98b cached data from memory
[2022-09-17 13:07:37] INFO: Assertion integrity validated!
[2022-09-17 13:07:37] DEBUG: Reading operation id: a62d3d50-0491-4e79-a0f8-76428034e98b cached data from memory
Something went really wrong! OT-node shutting down... DatabaseError [SequelizeDatabaseError]: Data too long for column 'value1' at row 1
    at Query.formatError (/root/ot-node/6.0.0-beta.2.2.4/node_modules/sequelize/lib/dialects/mysql/query.js:265:16)
    at Query.run (/root/ot-node/6.0.0-beta.2.2.4/node_modules/sequelize/lib/dialects/mysql/query.js:77:18)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /root/ot-node/6.0.0-beta.2.2.4/node_modules/sequelize/lib/sequelize.js:619:16
    at async MySQLQueryInterface.insert (/root/ot-node/6.0.0-beta.2.2.4/node_modules/sequelize/lib/dialects/abstract/query-interface.js:749:21)
    at async model.save (/root/ot-node/6.0.0-beta.2.2.4/node_modules/sequelize/lib/model.js:3987:35)
    at async Function.create (/root/ot-node/6.0.0-beta.2.2.4/node_modules/sequelize/lib/model.js:2217:12) {
  parent: Error: Data too long for column 'value1' at row 1
      at Packet.asError (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/packets/packet.js:728:17)
      at Execute.execute (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/commands/command.js:29:26)
      at Connection.handlePacket (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/connection.js:456:32)
      at PacketParser.onPacket (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/connection.js:85:12)
      at PacketParser.executeStart (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/packet_parser.js:75:16)
      at Socket.<anonymous> (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/connection.js:92:25)
      at Socket.emit (node:events:513:28)
      at Socket.emit (node:domain:489:12)
      at addChunk (node:internal/streams/readable:315:12)
      at readableAddChunk (node:internal/streams/readable:289:9)
      at Socket.Readable.push (node:internal/streams/readable:228:10)
      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
    code: 'ER_DATA_TOO_LONG',
    errno: 1406,
    sqlState: '22001',
    sqlMessage: "Data too long for column 'value1' at row 1",
    sql: 'INSERT INTO `event` (`id`,`operation_id`,`name`,`timestamp`,`value1`,`value2`,`value3`) VALUES (DEFAULT,?,?,?,?,?,?);',
    parameters: [
      'a62d3d50-0491-4e79-a0f8-76428034e98b',
      'FAILED',
      1663420058019,
      'Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',
      'PublishLocalStoreRemoteError',
      null
    ]
  },
  original: Error: Data too long for column 'value1' at row 1
      at Packet.asError (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/packets/packet.js:728:17)
      at Execute.execute (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/commands/command.js:29:26)
      at Connection.handlePacket (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/connection.js:456:32)
      at PacketParser.onPacket (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/connection.js:85:12)
      at PacketParser.executeStart (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/packet_parser.js:75:16)
      at Socket.<anonymous> (/root/ot-node/6.0.0-beta.2.2.4/node_modules/mysql2/lib/connection.js:92:25)
      at Socket.emit (node:events:513:28)
      at Socket.emit (node:domain:489:12)
      at addChunk (node:internal/streams/readable:315:12)
      at readableAddChunk (node:internal/streams/readable:289:9)
      at Socket.Readable.push (node:internal/streams/readable:228:10)
      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
    code: 'ER_DATA_TOO_LONG',
    errno: 1406,
    sqlState: '22001',
    sqlMessage: "Data too long for column 'value1' at row 1",
    sql: 'INSERT INTO `event` (`id`,`operation_id`,`name`,`timestamp`,`value1`,`value2`,`value3`) VALUES (DEFAULT,?,?,?,?,?,?);',
    parameters: [
      'a62d3d50-0491-4e79-a0f8-76428034e98b',
      'FAILED',
      1663420058019,
      'Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',
      'PublishLocalStoreRemoteError',
      null
    ]
  },
  sql: 'INSERT INTO `event` (`id`,`operation_id`,`name`,`timestamp`,`value1`,`value2`,`value3`) VALUES (DEFAULT,?,?,?,?,?,?);',
  parameters: [
    'a62d3d50-0491-4e79-a0f8-76428034e98b',
    'FAILED',
    1663420058019,
    'Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',
    'PublishLocalStoreRemoteError',
    null
  ]
}
[2022-09-17 13:07:38] ERROR: Command error (PublishLocalStoreRemoteError): Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.
[2022-09-17 13:07:38] DEBUG: Marking operation id a62d3d50-0491-4e79-a0f8-76428034e98b as failed
otnode.service: Main process exited, code=exited, status=1/FAILURE
otnode.service: Failed with result 'exit-code'.
otnode.service: Scheduled restart job, restart counter is at 10.
Stopped OriginTrail V6 Stage 1 Beta Node.
Started OriginTrail V6 Stage 1 Beta Node.

And right after the node restart, I see another error.

[2022-09-17 13:07:41] DEBUG: Reading operation id: a62d3d50-0491-4e79-a0f8-76428034e98b cached data from file
[2022-09-17 13:07:41] ERROR: Command error (PublishLocalStoreRemoteError): Cannot destructure property 'assertionId' of '(intermediate value)' as it is undefined.
[2022-09-17 13:07:41] DEBUG: Marking operation id a62d3d50-0491-4e79-a0f8-76428034e98b as failed
[2022-09-17 13:07:41] DEBUG: Removing operation id: a62d3d50-0491-4e79-a0f8-76428034e98b cached data
[2022-09-17 13:07:41] DEBUG: Removing file on path: /root/ot-node/data/operation_id_cache/a62d3d50-0491-4e79-a0f8-76428034e98b
[2022-09-17 13:07:41] WARN: Error in command: handleStoreRequestCommand, error: ENOENT: no such file or directory, unlink '/root/ot-node/data/operation_id_cache/a62d3d50-0491-4e79-a0f8-76428034e98b'
[2022-09-17 13:07:41] WARN: Failed to recover command handleStoreRequestCommand and ID 88930ba6-1609-4550-a90c-3de0b561f615

Disclaimer

Please be aware that the issue reported on a public repository allows everyone to see your node logs, node details, and contact details. If you have any sensitive information, feel free to share it by sending an email to [email protected].

tjosm avatar Sep 17 '22 13:09 tjosm