Skip to main content

Help with Node.js and PostgreSQL

Comments

8 comments

  • SamuelM
    Hello @Jucester Can you please clarify whether the issue you are observing is with phpPgAdmin or with the Sequelize application? For phpPgAdmin, you likely would not be able to access this as the superuser as you are using a shared hosting package. Only the server administrator would be able to manage the default Postgres password at the root level. For connecting your Sequelize app to the Postgres database, you would need to make sure you assigned the correct database name, database user, and database user password in the config file. These settings are managed on the PostgreSQL Databases page in cPanel:
    0
  • Jucester
    Hello @cPSamuel, thanks four your answer. The problem is that my application is not connecting to the database. Or at least I think so. When I click on the links that use routes to the endpoints that query the database, I get this: "Incomplete response received from application" Just for testing, I made a database with ElephantSQL and I can access it with my application locally with no problem, but in cPanel the same thing happens. It's like my app can't finish authenticating. Is there a way to debug the app with SSH? As you may see, It's the first time I'm using cPanel to host an app.
    0
  • cPanelChris
    Hello @Jucester , Are there any errors appearing in /var/log/apache2/error_log when this error is presented?
    0
  • Jucester
    Hi @cPanelChris In my var folder there are just cPanel with empty directories, but in the root I have a logs folder and inside it a ssl_log file. In that ssl_log shows all the access to my app and apparently, when I try to access the routes that query the database, I get this: xxx.xx.xxx.xx - - [09/Oct/2020:01:21:55 -0400] "GET /products HTTP/1.1" 502 54
    0
  • webmasterhive
    Hi @Jucester, I have the same error with the same details, please did you resolve this ? If yes, how ? Regards,
    0
  • Jucester
    Hi @Jucester, I have the same error with the same details, please did you resolve this ? If yes, how ? Regards,

    Hi @webmasterhive, in my case the problem was related with the sequelize and pg version in my node app, it seems that Postgre version in the namecheap cPanel its too old and you need to downgrade your sequelize and pg version to ve compatible with it. To avoid so much searching and trouble what I do was just switch to mysql as it works without problems and postgre was not obligatory (just a personal preference)
    0
  • webmasterhive
    Hi @webmasterhive, in my case the problem was related with the sequelize and pg version in my node app, it seems that Postgre version in the namecheap cPanel its too old and you need to downgrade your sequelize and pg version to ve compatible with it. To avoid so much searching and trouble what I do was just switch to mysql as it works without problems and postgre was not obligatory (just a personal preference)

    Thank you so much @Jucester!!! I am also using nameCheap. Please where can I find this version error meesage on my Cpanel. I am new to Cpanel.
    0
  • splitcooler
    Thanks
    0

Please sign in to leave a comment.