thx / rap2-delos

阿里妈妈前端团队出品的开源接口管理工具RAP第二代
http://rap2.taobao.org
MIT License
7.65k stars 1.35k forks source link

登录接口报 500错 #734

Closed ZhengXueNing closed 3 years ago

ZhengXueNing commented 4 years ago

BUG描述 我国庆前还可以正常使用。国庆过来回来后,升级了一下docker。RAP就登录不上了。报500

复现步骤

期望结果

实际结果

截图 image image image image

环境

附加信息

ZhengXueNing commented 4 years ago

为了尝试解决上面的问题,我在更新表结构时,发生错误。错误如下:

docker-compose exec delos node scripts/updateSchema

DATABASE √ HOST mysql PORT 3306 DATABASE rap2

升级 DB Schema 中遇到了错误 DatabaseError [SequelizeDatabaseError]: Table 'rap2.users' doesn't exist at Query.formatError (/app/node_modules/sequelize/lib/dialects/mysql/query.js:244:16) at Query.handler [as onResult] (/app/node_modules/sequelize/lib/dialects/mysql/query.js:51:23) at Query.execute (/app/node_modules/mysql2/lib/commands/command.js:30:14) at Connection.handlePacket (/app/node_modules/mysql2/lib/connection.js:425:32) at PacketParser.onPacket (/app/node_modules/mysql2/lib/connection.js:75:12) at PacketParser.executeStart (/app/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket. (/app/node_modules/mysql2/lib/connection.js:82:25) at Socket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12) at readableAddChunk (_stream_readable.js:271:9) at Socket.Readable.push (_stream_readable.js:212:10) at TCP.onStreamRead (internal/stream_base_commons.js:186:23) { parent: Error: Table 'rap2.users' doesn't exist at Packet.asError (/app/node_modules/mysql2/lib/packets/packet.js:712:17) at Query.execute (/app/node_modules/mysql2/lib/commands/command.js:28:26) at Connection.handlePacket (/app/node_modules/mysql2/lib/connection.js:425:32) at PacketParser.onPacket (/app/node_modules/mysql2/lib/connection.js:75:12) at PacketParser.executeStart (/app/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket. (/app/node_modules/mysql2/lib/connection.js:82:25) at Socket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12) at readableAddChunk (_stream_readable.js:271:9) at Socket.Readable.push (_stream_readable.js:212:10) at TCP.onStreamRead (internal/stream_base_commons.js:186:23) { code: 'ER_NO_SUCH_TABLE', errno: 1146, sqlState: '42S02', sqlMessage: "Table 'rap2.users' doesn't exist", sql: 'CREATE TABLE IF NOT EXISTS Users (id INTEGER auto_increment , fullname VARCHAR(32) NOT NULL, password VARCHAR(32), email VARCHAR(128) NOT NULL UNIQUE, createdAt DATETIME NOT NULL, updatedAt DATETIME NOT NULL, deletedAt DATETIME, PRIMARY KEY (id)) ENGINE=InnoDB;', parameters: undefined }, original: Error: Table 'rap2.users' doesn't exist at Packet.asError (/app/node_modules/mysql2/lib/packets/packet.js:712:17) at Query.execute (/app/node_modules/mysql2/lib/commands/command.js:28:26) at Connection.handlePacket (/app/node_modules/mysql2/lib/connection.js:425:32) at PacketParser.onPacket (/app/node_modules/mysql2/lib/connection.js:75:12) at PacketParser.executeStart (/app/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket. (/app/node_modules/mysql2/lib/connection.js:82:25) at Socket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12) at readableAddChunk (_stream_readable.js:271:9) at Socket.Readable.push (_stream_readable.js:212:10) at TCP.onStreamRead (internal/stream_base_commons.js:186:23) { code: 'ER_NO_SUCH_TABLE', errno: 1146, sqlState: '42S02', sqlMessage: "Table 'rap2.users' doesn't exist", sql: 'CREATE TABLE IF NOT EXISTS Users (id INTEGER auto_increment , fullname VARCHAR(32) NOT NULL, password VARCHAR(32), email VARCHAR(128) NOT NULL UNIQUE, createdAt DATETIME NOT NULL, updatedAt DATETIME NOT NULL, deletedAt DATETIME, PRIMARY KEY (id)) ENGINE=InnoDB;', parameters: undefined }, sql: 'CREATE TABLE IF NOT EXISTS Users (id INTEGER auto_increment , fullname VARCHAR(32) NOT NULL, password VARCHAR(32), email VARCHAR(128) NOT NULL UNIQUE, createdAt DATETIME NOT NULL, updatedAt DATETIME NOT NULL, deletedAt DATETIME, PRIMARY KEY (id)) ENGINE=InnoDB;', parameters: undefined }

sany-caobohao commented 4 years ago

可以尝试设置mysql为不区分表名的大小写。mysql中的表应该为Users。

ZhengXueNing commented 4 years ago

可以尝试设置mysql为不区分表名的大小写。mysql中的表应该为Users。

那您对于我的第一问题,有解决方案吗。登录接口报 500,这让我很崩溃。

Bosn commented 3 years ago

运维问题,涉及到环境配置等运维上的常见问题,建议群里交流。