[RÉSOLU] Problème d'accès à la base de donnée -> Gladys ne démarre pas

#1

Hello,

Petit problème du dimanche soir, MySQL semble être totalement planté.

Après un reboot, Gladys est innacessible. Je me connecte, et je vois que la SD est pleine (oui, j’ai oublié de redimentionné la partoche c’est mal :sob:). Du coup, je l’ai quelque peu agrandie. Mais Gladys refuse toujours de se lancer, les logs indiquent l’impossibilité de se connecter au serveur MySQL

Précision : j’ai un RPi 3 avec l’image Gladys dessus

Une idée de comment remédier à ce « petit » problème ? :smile:

Merci bien ! :slight_smile:

[email protected]:~ $ pm2 logs gladys
[TAILING] Tailing last 15 lines for [gladys] process (change the value with --lines option)
/home/pi/.pm2/logs/gladys-error-0.log last 15 lines:
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   | Unhandled rejection Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)

/home/pi/.pm2/logs/gladys-out-0.log last 15 lines:
0|gladys   |   cause: Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9),
0|gladys   |   isOperational: true }
0|gladys   | AwoX module: Bluetooth device not available

^[[A0|gladys   | Warning: connect.session() MemoryStore is not
0|gladys   | designed for a production environment, as it will leak
0|gladys   | memory, and will not scale past a single process.
0|gladys   | Warning: connect.session() MemoryStore is not
0|gladys   | designed for a production environment, as it will leak
0|gladys   | memory, and will not scale past a single process.
0|gladys   | =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
0|gladys   | WARNING: You currently have your default CORS settings configured to allow
0|gladys   | all requests from all origins, with credentials.  This may leave your app
0|gladys   | open to attack by third-party sites!  Consider making your `origins` setting
0|gladys   | more restrictive or setting `credentials` to false, or else make certain that
0|gladys   | none of your routes perform sensitive actions or reveal secure information.
0|gladys   | =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
0|gladys   | Gladys version : 3.13.0
0|gladys   | Gladys Gateway: Init Procedure : Getting keys from database
0|gladys   | Bootstrap is taking unusually long to execute its callback (2000 milliseconds).
0|gladys   | Perhaps you forgot to call it?  The callback is the first argument of the function, `cb`.
0|gladys   | { Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   |   cause: Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9),
0|gladys   |   isOperational: true }
0|gladys   | Gladys database is not up to date with current Gladys version (DB = 0.0.0, Gladys = 3.13.0), performing migration.
0|gladys   | { Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   |   cause: Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9),
0|gladys   |   isOperational: true }
0|gladys   | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
0|gladys   | Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   | Unhandled rejection Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   | Gladys Gateway: Not connected.
0|gladys   | Unhandled rejection Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   | Unhandled rejection Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   | Gladys brain loaded with success !
0|gladys   | Error while performing DB migration.
0|gladys   | { Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   |   cause: Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9),
0|gladys   |   isOperational: true }
0|gladys   |                .-..-.
0|gladys   |    Sails              <|    .-..-.
0|gladys   |    v0.12.14            |\
0|gladys   |                       /|.\
0|gladys   |                      / || \
0|gladys   |                    ,'  |'  \
0|gladys   |                 .-'.-==|/_--'
0|gladys   |                 `--'-------'
0|gladys   |    __---___--___---___--___---___--___
0|gladys   |  ____---___--___---___--___---___--___-__
0|gladys   | Server lifted in `/home/pi/gladys`
0|gladys   | To see your app, visit http://localhost:8080
0|gladys   | To shut down Sails, press <CTRL> + C at any time.
0|gladys   | -------------------------------------------------------
0|gladys   | :: Sun Apr 28 2019 18:09:34 GMT+0000 (UTC)
0|gladys   | Environment : production
0|gladys   | Port        : 8080
0|gladys   | -------------------------------------------------------
0|gladys   | Unhandled rejection Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   | Unhandled rejection Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   | AwoX module: Bluetooth device available
0|gladys   | Gladys is up to date !
0|gladys   | Event : create : new Event with code : gladys-launched
0|gladys   | { Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys   |   cause: Error: Could not connect to MySQL:
0|gladys   | Error: connect ECONNREFUSED 127.0.0.1:3306
0|gladys   |     at afterwards (/home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:72:13)
0|gladys   |     at /home/pi/gladys/node_modules/sails-mysql/lib/connections/spawn.js:40:7
0|gladys   |     at Handshake.onConnect [as _callback] (/home/pi/gladys/node_modules/mysql/lib/Pool.js:54:9)
0|gladys   |     at Handshake.Sequence.end (/home/pi/gladys/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
0|gladys   |     at Protocol.handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/protocol/Protocol.js:364:14)
0|gladys   |     at PoolConnection.Connection._handleNetworkError (/home/pi/gladys/node_modules/mysql/lib/Connection.js:421:18)
0|gladys   |     at emitOne (events.js:116:13)
0|gladys   |     at Socket.emit (events.js:211:7)
0|gladys   |     at emitErrorNT (internal/streams/destroy.js:64:8)
0|gladys   |     at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys   |     at process._tickDomainCallback (internal/process/next_tick.js:218:9),
0|gladys   |   isOperational: true }
#2

Tu as tenté de redémarrer le pi une nouvelle fois?

Sinon tu peux tenter:

sudo service mysql restart
#3

Solution trouvée !
Le problème venait effectivement de MySQL, enfin mariaDB : un des fichiers, “tc.log” était inaccessible, ce qui est sûrement dû au problème d’espace disque mentionné dans mon premier message. Comme il tentait d’y accéder, en vain, le processus s’arrête brusquement.

J’ai donc renommé le fichier en tc.log.old, puis redémarrer le service et magie : Gladys is back online ! :slight_smile:

Pour la postérité, la correction du problème de bout en bout :
Quand MySQL/MariaDB ne démarre pas correctement avec

sudo service mysql restart

Regarder les logs :

journalctl -u mariadb.service

Si vous n’apprenez pas grand chose du journal, regardez les logs d’erreur de mysql directement :

sudo tail -n 100 /var/log/mysql/error.log

Si les dernières lignes sont les suivantes :

[Note]  Recovering after a crash using tc.log
[ERROR] Can't init tc log
[ERROR] Aborting 

C’est effectivement un problème lié au fichier tc.log. Il faut donc le supprimer ou le renommer :

sudo mv /var/lib/mysql/tc.log /var/lib/mysql/tc.log.old 

Relancer ensuite mariaDB et Gladys

sudo service mysql start
pm2 restart gladys

Gladys devrait redémarrer en quelques secondes !

2 Likes