Guest User

Untitled

a guest
Oct 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. In the wikis controller:
  2.  
  3. index(req, res, next) {
  4. wikiQueries.getAllWikis((err, wikis) => {
  5. if (err) {
  6. console.error(err);
  7. res.redirect(500, "static/index");
  8. } else {
  9. res.render("wikis/index", { wikis });
  10. }
  11. });
  12.  
  13.  
  14.  
  15. /////////////////
  16. ERROR
  17. /////////////////
  18. This is the output for the console.error....
  19.  
  20. 2018-10-21T00:12:14.674400+00:00 app[web.1]: { SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432
  21. 2018-10-21T00:12:14.674413+00:00 app[web.1]: at connection.connect.err (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:96:24)
  22. 2018-10-21T00:12:14.674416+00:00 app[web.1]: at Connection.connectingErrorHandler (/app/node_modules/pg/lib/client.js:123:14)
  23. 2018-10-21T00:12:14.674418+00:00 app[web.1]: at emitOne (events.js:116:13)
  24. 2018-10-21T00:12:14.674420+00:00 app[web.1]: at Connection.emit (events.js:211:7)
  25. 2018-10-21T00:12:14.674422+00:00 app[web.1]: at Socket.reportStreamError (/app/node_modules/pg/lib/connection.js:71:10)
  26. 2018-10-21T00:12:14.674423+00:00 app[web.1]: at emitOne (events.js:116:13)
  27. 2018-10-21T00:12:14.674425+00:00 app[web.1]: at Socket.emit (events.js:211:7)
  28. 2018-10-21T00:12:14.674427+00:00 app[web.1]: at emitErrorNT (internal/streams/destroy.js:66:8)
  29. 2018-10-21T00:12:14.674429+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:139:11)
  30. 2018-10-21T00:12:14.674431+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:181:9)
  31. 2018-10-21T00:12:14.674432+00:00 app[web.1]: name: 'SequelizeConnectionRefusedError',
  32. 2018-10-21T00:12:14.674435+00:00 app[web.1]: parent:
  33. 2018-10-21T00:12:14.674437+00:00 app[web.1]: { Error: connect ECONNREFUSED 127.0.0.1:5432
  34. 2018-10-21T00:12:14.674438+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
  35. 2018-10-21T00:12:14.674441+00:00 app[web.1]: errno: 'ECONNREFUSED',
  36. 2018-10-21T00:12:14.674443+00:00 app[web.1]: code: 'ECONNREFUSED',
  37. 2018-10-21T00:12:14.674444+00:00 app[web.1]: syscall: 'connect',
  38. 2018-10-21T00:12:14.674446+00:00 app[web.1]: address: '127.0.0.1',
  39. 2018-10-21T00:12:14.674447+00:00 app[web.1]: port: 5432 },
  40. 2018-10-21T00:12:14.674449+00:00 app[web.1]: original:
  41. 2018-10-21T00:12:14.674450+00:00 app[web.1]: { Error: connect ECONNREFUSED 127.0.0.1:5432
  42. 2018-10-21T00:12:14.674452+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
  43. 2018-10-21T00:12:14.674453+00:00 app[web.1]: errno: 'ECONNREFUSED',
  44. 2018-10-21T00:12:14.674455+00:00 app[web.1]: code: 'ECONNREFUSED',
  45. 2018-10-21T00:12:14.674456+00:00 app[web.1]: syscall: 'connect',
  46. 2018-10-21T00:12:14.674458+00:00 app[web.1]: address: '127.0.0.1',
  47. 2018-10-21T00:12:14.674459+00:00 app[web.1]: port: 5432 } }
  48. 2018-10-21T00:12:14.677736+00:00 app[web.1]: GET /wikis 500 6.914 ms - 84
  49. 2018-10-21T00:12:14.859228+00:00 app[web.1]: GET /favicon.ico 404 2.124 ms - 150
Add Comment
Please, Sign In to add comment