Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem installing database for Presence and FriendChat #3

Open
autocaret opened this issue Feb 6, 2022 · 4 comments
Open

Problem installing database for Presence and FriendChat #3

autocaret opened this issue Feb 6, 2022 · 4 comments

Comments

@autocaret
Copy link

I used the install script for Friend Chat, and it installed seemingly with a 100% success.

But when I tried running presence, it complains that:

[stack]: "Error: Table 'presence.db_history' doesn't exist\n" +
' at Packet.asError (/home/xxxx/friendup/build/services/Presence/node_modules/mysql2/lib/packets/packet.js:728:17)\n' +
' at Query.execute (/home/xxxx/friendup/build/services/Presence/node_modules/mysql2/lib/commands/command.js:29:26)\n' +
' at PoolConnection.handlePacket (/home/xxxx/friendup/build/services/Presence/node_modules/mysql2/lib/connection.js:456:32)\n' +
' at PacketParser.onPacket (/home/xxxx/friendup/build/services/Presence/node_modules/mysql2/lib/connection.js:85:12)\n' +
' at PacketParser.executeStart (/home/xxxx/friendup/build/services/Presence/node_modules/mysql2/lib/packet_parser.js:75:16)\n' +
' at Socket. (/home/xxxx/friendup/build/services/Presence/node_modules/mysql2/lib/connection.js:92:25)\n' +
' at Socket.emit (node:events:390:28)\n' +
' at addChunk (node:internal/streams/readable:315:12)\n' +
' at readableAddChunk (node:internal/streams/readable:289:9)\n' +
' at Socket.Readable.push (node:internal/streams/readable:228:10)',
[message]: "Table 'presence.db_history' doesn't exist",
code: 'ER_NO_SUCH_TABLE',
errno: 1146,
sqlState: '42S02',
sqlMessage: "Table 'presence.db_history' doesn't exist",
sql: 'SELECT * FROM db_history ORDER BY _id DESC LIMIT 1'
}
2022.02.06 13:02:45:302 : Presence > MysqlPool > no-go, db patching failed
/home/xxxx/friendup/build/services/Presence/presence.js:48
throw new Error( 'db failed! Run for the hills!' );

I installed the tables manually (like the installer does). Then I tried to re-run presence:

/home/xxxx/friendup/build/services/Presence/component/MysqlPool.js:442
throw new Error( 'error running query: ' + query + ' -- ERR: ' + err );
^

Error: error running query: CREATE TABLE message_status (
_id INT UNSIGNED NOT NULL auto_increment,
clientId VARCHAR( 191 ) NOT NULL UNIQUE,
msgId VARCHAR( 191 ) NOT NULL,
setBy VARCHAR( 191 ),
setTime BIGINT NOT NULL,
status VARCHAR( 191 ),
reason TEXT,
message TEXT,
PRIMARY KEY( _id ),
CONSTRAINT FK_status_message
FOREIGN KEY( msgId ) REFERENCES message( msgId )
ON DELETE CASCADE
ON UPDATE CASCADE,
CONSTRAINT FK_status_account
FOREIGN KEY( setBy ) REFERENCES account( clientId )
ON DELETE SET NULL
ON UPDATE CASCADE
) ENGINE=INNODB CHARACTER SET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- ERR: Error: Table 'message_status' already exists

@autocaret
Copy link
Author

I finally managed to get Presence and FriendChat servers running by setting the latest database update to 39 in the database. db_history. But FriendChat doesn't seem to add my FUser relation - so:

2022.02.06 13:21:09:110 : Presence > NoMansLand > clientLogin - failed to load or create account

@autocaret
Copy link
Author

I finally managed to get Presence and FriendChat servers running by setting the latest database update to 39 in the database. db_history. But FriendChat doesn't seem to add my FUser relation - so:

2022.02.06 13:21:09:110 : Presence > NoMansLand > clientLogin - failed to load or create account

I was missing the presence service key. Added it to presence's config.js and cfg/cfg.ini - but the installer needs a looking over.

@sokken
Copy link
Collaborator

sokken commented Feb 10, 2022

Yep, tables.sql was not up to date with patches, this has been fixed now

@autocaret
Copy link
Author

Wonderful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants