So i was working on a login system with MySql. At first it worked perfectly, but after a bit of time it stopped working and now when I start it it gives me
Error: connect ETIMEDOUT
at Connection._handleConnectTimeout (I:\Websites\backend\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 (I:\Websites\backend\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (I:\Websites\backend\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at Connection.connect (I:\Websites\backend\node_modules\mysql\lib\Connection.js:116:18)
at Object.<anonymous> (I:\Websites\backend\Main.js:20:4)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
errorno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
fatal: true
}
What is also important to say is that I do not host the Database on my PC, I have rented a server for it. Hope that someone can help
Related
I am facing issue to run the JavaScript file in VS code.
I am getting the output as:-
[Running] node "e:\n\Temporay folders of web development\vs code project\tut64.js"
node:internal/fs/utils:343
throw err;
^
Error: ENOENT: no such file or directory, open 'tut64.txt'
at Object.openSync (node:fs:582:3)
at Object.readFileSync (node:fs:450:35)
at Object.<anonymous> (e:\n\Temporay folders of web development\vs code project\tut64.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47 {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'tut64.txt'
}
[Done] exited with code=1 in 0.839 seconds
And in the terminal I am getting:-
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS E:\n\Temporay folders of web development\vs code project> node \tut64.js\
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'E:\tut64.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I am not getting what type of these errors are and why I am getting them.
In the terminal you should do node tut64.js
And check the path of tut64.txt or post your code.
Whats the problem ??? I'm working on a bot for discord using JavaScript when executing my files in VS code it works normally but in Repl.it it shows me this error
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/home/runner/Bot/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.<anonymous> (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/Bot/index.js'
}
When I deploy the bot in Heroku, the build is successful, but then the bot crashes with this error in the log
2020-12-29T09:03:22.127022+00:00 app[worker.1]: at initializeClass (/app/node_modules/#dguttman/wolfram-alpha-api/lib/WolframAlphaAPI.js:336:10)
2020-12-29T09:03:22.127022+00:00 app[worker.1]: at Object.<anonymous> (/app/main.js:9:15)
2020-12-29T09:03:22.127022+00:00 app[worker.1]: at Module._compile (internal/modules/cjs/loader.js:999:30)
2020-12-29T09:03:22.127023+00:00 app[worker.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
2020-12-29T09:03:22.127023+00:00 app[worker.1]: at Module.load (internal/modules/cjs/loader.js:863:32)
2020-12-29T09:03:22.127023+00:00 app[worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
2020-12-29T09:03:22.127024+00:00 app[worker.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
2020-12-29T09:03:22.127024+00:00 app[worker.1]: at internal/main/run_main_module.js:17:47
2020-12-29T09:03:22.175669+00:00 heroku[worker.1]: Process exited with status 1
2020-12-29T09:03:22.207754+00:00 heroku[worker.1]: State changed from up to crashed
Not sure what the error means or how to fix it. When I run it from my terminal the code works without any errors.
thanks in advance
I've seen a ton of conflicting answers and I want this thread to be very conclusive. I'm running a Node.js app that needs to have a server endpoint to call a google mysql database.
The SQL call I'm making in server.js should be fine, empty though. Regardless, the break point isn't at the SQL call.
There's no enforced password set up so I have those credentials set up as
...
user: 'root',
password: '',
...
and I'm currently not using the socketPort configuration option.
Respond if you need any more information about the database.
This is a full stack trace, you can see it yourself by running npm run dev
Error connecting: Error: connect ETIMEDOUTat Connection._handleConnectTimeout (C:\Users\********\Projects\security-project\security-dashboard\node_modules\mysql\lib\Connection.js:412:13)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at Socket._onTimeout (net.js:442:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
--------------------
at Protocol._enqueue (C:\Users\********\Projects\security-project\security-dashboard\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (C:\Users\********\Projects\security-project\security-dashboard\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at Connection.connect (C:\Users\*******\Projects\security-project\security-dashboard\node_modules\mysql\lib\Connection.js:119:18)
at Object.<anonymous> (C:\Users\*********\Projects\security-project\security-dashboard\database.js:26:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
[ ready ] compiled successfully
I have script from CSgo roullete.when im try run it show me this error
errno: 'ECONNREFUSED',
syscall: 'connect',
address: 'XXX.XX.XXX.XX',
port: 3306,
fatal: true }
Error: connect ECONNREFUSED XXX.XX.XXX.XX:3306
at Object.exports._errnoException (util.js:890:11)
at exports._exceptionWithHostPort (util.js:913:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
--------------------
at Protocol._enqueue (/root/node_modules/mysql/lib/protocol/Protocol.js:141:48)
at Protocol.handshake (/root/node_modules/mysql/lib/protocol/Protocol.js:52:41)
at PoolConnection.connect (/root/node_modules/mysql/lib/Connection.js:123:18)
at Pool.getConnection (/root/node_modules/mysql/lib/Pool.js:45:23)
at query (/var/www/html/Bot/BOT/site.js:595:7)
at load (/var/www/html/Bot/BOT/site.js:607:2)
at Object.<anonymous> (/var/www/html/Bot/BOT/site.js:59:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
i have VPS with Ubuntu 15.10
#update
Now Mysql working good but if i want start this script i got this error.
[Error: listen EADDRINUSE :::8080]
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 8080 }
Error: listen EADDRINUSE :::8080
at Object.exports._errnoException (util.js:890:11)
at exports._exceptionWithHostPort (util.js:913:20)
at Server._listen2 (net.js:1234:14)
at listen (net.js:1270:10)
at Server.listen (net.js:1366:5)
at Server.listen.Server.attach (/root/node_modules/socket.io/lib/index.js:216:9)
at Timeout._onTimeout (/var/www/html/Bot/BOT/site.js:618:29)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
Most likely your mysql server is not running, or running on a different port/interface.