brouznouf / fivem-mysql-async

MySql Async Library for FiveM
MIT License
111 stars 106 forks source link

Error On startup Linux #76

Closed Gittified closed 5 years ago

Gittified commented 5 years ago

Hello,

I am running my FiveM server on a Linux VPS with Ubuntu 18.04. On startup I get a whole line of errors, which has to do with mysql-async. Here are they:


    at PoolConnection.Connection._handleConnectTimeout (mysql-async.js:1004:13)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at Socket.emit (events.js:208:7)
    at Socket._onTimeout (net.js:422:8)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5161:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Error: (node:7888) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5161:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)
Error: (node:7888) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
    at Handshake.<anonymous> (mysql-async.js:6183:17)
    at emitNone (events.js:106:13)
    at Handshake.emit (events.js:208:7)
    at Handshake._onTimeout (mysql-async.js:316:8)
    at Timer._onTimeout (mysql-async.js:13221:23)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    --------------------
    at Protocol._enqueue (mysql-async.js:6167:48)
    at Protocol.handshake (mysql-async.js:6074:23)
    at PoolConnection.connect (mysql-async.js:711:18)
    at Pool.getConnection (mysql-async.js:4753:16)
    at Pool.query (mysql-async.js:4907:8)
    at Promise (mysql-async.js:5146:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:5143:26)
    at Object.global.exports [as callback] (mysql-async.js:5169:5)
    at citizen:/scripting/v8/main.js:96:41
Error: (node:7888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)```

Hopefully anyone can help me with this.

Thanks,
Jorrit
ghost commented 5 years ago

Would you mind posting the first error that happens and not just the trace?

Gittified commented 5 years ago

I think that the whole error will help better tracking the issue

Gittified commented 5 years ago

Duplicate?

ghost commented 5 years ago

Duplicate of #64

Or it least it looks like it.

Gittified commented 5 years ago

But is this gonna get resolved?

ghost commented 5 years ago

Unlikely in #64, you will need to provide maybe a full log.

./run.sh +exec server.cfg > output.log to create a log.

Gittified commented 5 years ago

output.log It looks like the error has changed, still weird error though since my string is totally fine

ghost commented 5 years ago

Error: (node:10331) UnhandledPromiseRejectionWarning: Error: Empty mysql_connection_string detected.

How about you properly use set mysql_connection_string To connect to mysql?

Gittified commented 5 years ago

As I said I have property set it, for some reason the issue changed. I'll send you the string

Gittified commented 5 years ago

set mysql_connection_string "server=5.226.143.66;uid=fivem;password=CENSORED;database=essentialmode"

ghost commented 5 years ago

try and set it before you call the resources. Somehow it says it is empty.

Gittified commented 5 years ago

It's the first line of the server.cfg

ghost commented 5 years ago

try and delete the cache folder.

Gittified commented 5 years ago

Alright one second

Gittified commented 5 years ago

No startup errors, let me login to the server

Gittified commented 5 years ago

Suddently it wasn't done yet. output.log

Also got 2 errors ingame

Gittified commented 5 years ago

Is it possible that my server.cfg is corrupt or anything? Also the option es_enablecustomdata from essentialmode does nothing

ghost commented 5 years ago

[91mError: (node:10481) UnhandledPromiseRejectionWarning: Error: Empty mysql_connection_string detected.

still the empty connection string, but there are a few more errors.

ghost commented 5 years ago

Maybe get support on the forums for it.

Gittified commented 5 years ago

I will this errors f***** up my whole playerbase. First night we had 32 players online. Next day the server went down and it haven't been up for several days. I will create a topic

LySoon commented 5 years ago

i have the same issue too im using linux and updated to latest version..

LySoon commented 5 years ago

image

i iget theese errors after that clear console

(errors appears after 3-4 secons later from other stuff)

at Protocol._parsePacket (mysql-async.js:6326:23) at Parser._parsePacket (mysql-async.js:6937:10) at Parser.write (mysql-async.js:6547:10) at Protocol.write (mysql-async.js:6073:16) at Socket. (mysql-async.js:683:28) at Socket. (mysql-async.js:1117:10) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7)

at Protocol._enqueue (mysql-async.js:6179:48)
at Protocol.handshake (mysql-async.js:6086:23)
at PoolConnection.connect (mysql-async.js:711:18)
at Pool.getConnection (mysql-async.js:4753:16)
at Pool.releaseConnection (mysql-async.js:4862:10)
at Pool._removeConnection (mysql-async.js:4982:8)
at Pool._purgeConnection (mysql-async.js:4963:8)
at Handshake.onConnect (mysql-async.js:4762:14)
at Handshake.<anonymous> (mysql-async.js:1117:10)
at Handshake._callback (mysql-async.js:1083:16)

Error: (node:28263) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 19)

Gittified commented 5 years ago

@LySoon I fixed all mine. Contact me on discord Jorrit#0001 it has nothing todo with MySQL async

LySoon commented 5 years ago

Request Sent ❤️