You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to run demo server with Mysql (ubuntu 20), I configured ltjs-sequelize but when trying to lift the demo server I got the following error:
~/projects/ltijs-demo-server [master]: npm run start
> [email protected] start /home/cesar/projects/ltijs-demo-server
> env DEBUG=provider:* node index.js
provider:main Attempting to connect to database +0ms
provider:database Using Sequelize Database Plugin - Cvmcosta +0ms
provider:database Dialect: mysql +0ms
Error during deployment: { SequelizeDatabaseError: BLOB/TEXT column 'iss' used in key specification without a key length
at Query.formatError (/home/cesar/projects/ltijs-demo-server/node_modules/sequelize/lib/dialects/mysql/query.js:239:16)
at Query.run (/home/cesar/projects/ltijs-demo-server/node_modules/sequelize/lib/dialects/mysql/query.js:54:18)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'SequelizeDatabaseError',
parent:
{ Error: BLOB/TEXT column 'iss' used in key specification without a key length
at Packet.asError (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/packets/packet.js:712:17)
at Query.execute (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/commands/command.js:28:26)
at Connection.handlePacket (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/connection.js:425:32)
at PacketParser.Connection.packetParser.p [as onPacket] (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/connection.js:75:12)
at PacketParser.executeStart (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.Connection.stream.on.data (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/connection.js:82:25)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
code: 'ER_BLOB_KEY_WITHOUT_LENGTH',
errno: 1170,
sqlState: '42000',
sqlMessage:
'BLOB/TEXT column \'iss\' used in key specification without a key length',
sql:
'ALTER TABLE `idtokens` ADD INDEX `idtokens_iss_client_id_deployment_id_user` (`iss`, `clientId`, `deploymentId`, `user`)',
parameters: undefined },
original:
{ Error: BLOB/TEXT column 'iss' used in key specification without a key length
at Packet.asError (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/packets/packet.js:712:17)
at Query.execute (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/commands/command.js:28:26)
at Connection.handlePacket (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/connection.js:425:32)
at PacketParser.Connection.packetParser.p [as onPacket] (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/connection.js:75:12)
at PacketParser.executeStart (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.Connection.stream.on.data (/home/cesar/projects/ltijs-demo-server/node_modules/mysql2/lib/connection.js:82:25)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
code: 'ER_BLOB_KEY_WITHOUT_LENGTH',
errno: 1170,
sqlState: '42000',
sqlMessage:
'BLOB/TEXT column \'iss\' used in key specification without a key length',
sql:
'ALTER TABLE `idtokens` ADD INDEX `idtokens_iss_client_id_deployment_id_user` (`iss`, `clientId`, `deploymentId`, `user`)',
parameters: undefined },
sql:
'ALTER TABLE `idtokens` ADD INDEX `idtokens_iss_client_id_deployment_id_user` (`iss`, `clientId`, `deploymentId`, `user`)',
parameters: undefined }
Closing server...
Closing connection to the database...
provider:database Closing connection to database +36ms
provider:database Closed database connection and removed cronjob +0ms
Shutdown complete.
The text was updated successfully, but these errors were encountered:
status update:
I discovered the error in the ltjs-sequelize/dist/DB.js, all of the types for columns that are going to be used as indexes should be replaced from TEXT to STRING. in some cases I need to use STRING(127) as the default was throwing KEY_TOO_LONG error.
after this fix in a bunch of lines the server finally lifted up..
Hello, I am trying to run demo server with Mysql (ubuntu 20), I configured ltjs-sequelize but when trying to lift the demo server I got the following error:
The text was updated successfully, but these errors were encountered: