nuxspotb Posted October 28, 2020 Share Posted October 28, 2020 (edited) Hello, Ive uploaded my Nodejs API server to heliohost tommy, reading the wiki, but I cant make it to work. I suspect it could be some router, so I added both but it sitll wont work, I get either error 500 or Incomplete response received from applicationI know it works because it works on my localhost, so I dont know what could go wrong besides routes, but Ive added both ( I mean adding the /node/ path to nodejs express route config ) http://nuxspot.heliohost.us/node Edited October 28, 2020 by nuxspotb Link to comment Share on other sites More sharing options...
Krydos Posted October 29, 2020 Share Posted October 29, 2020 Did you try getting the basic example to work first? https://wiki.helionet.org/tutorials/node.js Link to comment Share on other sites More sharing options...
nuxspotb Posted October 29, 2020 Author Share Posted October 29, 2020 Did you try getting the basic example to work first? https://wiki.helionet.org/tutorials/node.jsYeah as mine didnt worked so I tried literally that code and worked with its Node.js is working. message, so then i uploaded mine again and got the 500 error or incomplete response received from application Link to comment Share on other sites More sharing options...
Krydos Posted October 29, 2020 Share Posted October 29, 2020 The reason I bring up the basic example is because the best way to troubleshoot something not working is to start with a working example and then add things to it one at a time, and test it between each change to make sure it's still working. If adding 1 line causes it to stop working then you can figure out what is wrong with that 1 line. If you change 500 things at once then it's very hard to narrow down what broke it exactly. Link to comment Share on other sites More sharing options...
Krydos Posted October 29, 2020 Share Posted October 29, 2020 I took a look at the error logs and it looks like your error is pretty simple. App 102512 output: Our app is running on port 3000 App 102512 output: /home/trenderx/node/node_modules/mysql/lib/protocol/Parser.js:437 App 102512 output: throw err; // Rethrow non-MySQL errors App 102512 output: ^ App 102512 output: Error: ER_DBACCESS_DENIED_ERROR: Access denied for user 'trenderx_notes'@'localhost' to database 'trenderx_nuxnotes' App 102512 output: at Handshake.Sequence._packetToError (/home/trenderx/node/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) App 102512 output: at Handshake.ErrorPacket (/home/trenderx/node/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18) App 102512 output: at Protocol._parsePacket (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:291:23) App 102512 output: at Parser._parsePacket (/home/trenderx/node/node_modules/mysql/lib/protocol/Parser.js:433:10) App 102512 output: at Parser.write (/home/trenderx/node/node_modules/mysql/lib/protocol/Parser.js:43:10) App 102512 output: at Protocol.write (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:38:16) App 102512 output: at Socket.<anonymous> (/home/trenderx/node/node_modules/mysql/lib/Connection.js:88:28) App 102512 output: at Socket.<anonymous> (/home/trenderx/node/node_modules/mysql/lib/Connection.js:526:10) App 102512 output: at Socket.emit (events.js:198:13) App 102512 output: at addChunk (_stream_readable.js:288:12) App 102512 output: -------------------- App 102512 output: at Protocol._enqueue (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:144:48) App 102512 output: at Protocol.handshake (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:51:23) App 102512 output: at Connection.connect (/home/trenderx/node/node_modules/mysql/lib/Connection.js:116:18) App 102512 output: at Object.<anonymous> (/home/trenderx/node/app/models/db.js:13:12) App 102512 output: at Module._compile (internal/modules/cjs/loader.js:778:30) App 102512 output: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) App 102512 output: at Module.load (internal/modules/cjs/loader.js:653:32) App 102512 output: at tryModuleLoad (internal/modules/cjs/loader.js:593:12) App 102512 output: at Function.Module._load (internal/modules/cjs/loader.js:585:3) App 102512 output: at Module.require (internal/modules/cjs/loader.js:692:17) Your mysql database user is getting access denied error. Link to comment Share on other sites More sharing options...
nuxspotb Posted October 30, 2020 Author Share Posted October 30, 2020 I took a look at the error logs and it looks like your error is pretty simple. App 102512 output: Our app is running on port 3000 App 102512 output: /home/trenderx/node/node_modules/mysql/lib/protocol/Parser.js:437 App 102512 output: throw err; // Rethrow non-MySQL errors App 102512 output: ^ App 102512 output: Error: ER_DBACCESS_DENIED_ERROR: Access denied for user 'trenderx_notes'@'localhost' to database 'trenderx_nuxnotes' App 102512 output: at Handshake.Sequence._packetToError (/home/trenderx/node/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) App 102512 output: at Handshake.ErrorPacket (/home/trenderx/node/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18) App 102512 output: at Protocol._parsePacket (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:291:23) App 102512 output: at Parser._parsePacket (/home/trenderx/node/node_modules/mysql/lib/protocol/Parser.js:433:10) App 102512 output: at Parser.write (/home/trenderx/node/node_modules/mysql/lib/protocol/Parser.js:43:10) App 102512 output: at Protocol.write (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:38:16) App 102512 output: at Socket.<anonymous> (/home/trenderx/node/node_modules/mysql/lib/Connection.js:88:28) App 102512 output: at Socket.<anonymous> (/home/trenderx/node/node_modules/mysql/lib/Connection.js:526:10) App 102512 output: at Socket.emit (events.js:198:13) App 102512 output: at addChunk (_stream_readable.js:288:12) App 102512 output: -------------------- App 102512 output: at Protocol._enqueue (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:144:48) App 102512 output: at Protocol.handshake (/home/trenderx/node/node_modules/mysql/lib/protocol/Protocol.js:51:23) App 102512 output: at Connection.connect (/home/trenderx/node/node_modules/mysql/lib/Connection.js:116:18) App 102512 output: at Object.<anonymous> (/home/trenderx/node/app/models/db.js:13:12) App 102512 output: at Module._compile (internal/modules/cjs/loader.js:778:30) App 102512 output: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) App 102512 output: at Module.load (internal/modules/cjs/loader.js:653:32) App 102512 output: at tryModuleLoad (internal/modules/cjs/loader.js:593:12) App 102512 output: at Function.Module._load (internal/modules/cjs/loader.js:585:3) App 102512 output: at Module.require (internal/modules/cjs/loader.js:692:17) Your mysql database user is getting access denied error. Yikes I actually tried that, so I did a new user, and probably forgot to re-add the new user to the database privileges. I added the user to the database privileges again and it worked fine, thanks Link to comment Share on other sites More sharing options...
Recommended Posts