System Information
- Strapi Version: 3.6.8
- Operating System: Windows 10
- Database: MySQL
- Node Version: v14.17.5
- NPM Version: 6.14.14
- Yarn Version:
Hi,
I have two problems (well, maybe more underlying - but at least 2…)
- My strapi application frequently stops working when I work in the admin panel - and the error message I usually get in the terminal is when I try to “run develop” again is:
[2021-08-31T17:51:00.966Z] debug Server wasn’t able to start properly.
[2021-08-31T17:51:00.967Z] error Error: connect ETIMEDOUT
at Connection._handleConnectTimeout (C:\Users\aneth\OneDrive\FEU 2021\Exam Osebro Antique Book Store\osebro-antikvariat\node_modules\mysql\lib\Connection.js:409:13)
at Object.onceWrapper (events.js:519:28)
at Socket.emit (events.js:400:28)
at Socket._onTimeout (net.js:484:8)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
--------------------
at Protocol._enqueue (C:\Users\aneth\OneDrive\FEU 2021\Exam Osebro Antique Book Store\osebro-antikvariat\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (C:\Users\aneth\OneDrive\FEU 2021\Exam Osebro Antique Book Store\osebro-antikvariat\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at Connection.connect (C:\Users\aneth\OneDrive\FEU 2021\Exam Osebro Antique Book Store\osebro-antikvariat\node_modules\mysql\lib\Connection.js:116:18)
at C:\Users\aneth\OneDrive\FEU 2021\Exam Osebro Antique Book Store\osebro-antikvariat\node_modules\knex\lib\dialects\mysql\index.js:68:18
at new Promise ()
at Client_MySQL.acquireRawConnection (C:\Users\aneth\OneDrive\FEU 2021\Exam Osebro Antique Book Store\osebro-antikvariat\node_modules\knex\lib\dialects\mysql\index.js:63:12)
at create (C:\Users\aneth\OneDrive\FEU 2021\Exam Osebro Antique Book Store\osebro-antikvariat\node_modules\knex\lib\client.js:290:39)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! osebro-antikvariat@0.1.0 develop: strapi develop
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the osebro-antikvariat@0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aneth\AppData\Roaming\npm-cache_logs\2021-08-31T17_51_00_996Z-debug.log
*If I close everything down and restart my computer and open a new terminal and try again, usually I am able to access the admin panel again, and everything seems good until I try to make some changes to anything and if I then try to save my changes.
This is also my 2nd problem: strapi admin seems to work fine in develop mode, but when I try to create content type or make any changes, when I save my changes Strapi just goes into an endless loading state, and I cannot do anything more in the admin panel.
Anyone have the slightest idea of what this can be - do I have wrong server settings?
I have a mysql database running on and external host server, and the admin panel running on localhost.
My server.js file is set up like this:
module.exports = ({ env }) => ({
host: env(‘HOST’, ‘0.0.0.0’),
port: env.int(‘PORT’, 1337),
admin: {
auth: {
secret: env('ADMIN_JWT_SECRET', 'xxxnumberxxx'),
},
},
});
My database.js file looks like this;
module.exports = ({ env }) => ({
defaultConnection: ‘default’,
connections: {
default: {
connector: 'bookshelf',
settings: {
client: 'mysql',
host: env('DATABASE_HOST', 'xxxusernamexxx.mysql.domeneshop.no'),
port: env.int('DATABASE_PORT', 3306),
database: env('DATABASE_NAME', 'xxxnamexxx'),
username: env('DATABASE_USERNAME', 'xxxusernamexxx'),
password: env('DATABASE_PASSWORD', 'xxxxpasswordxxx'),
ssl: env.bool('DATABASE_SSL', true),
},
options: {}
},
},