Celestial Bodies Database - Build a Celestial Bodies Database

psql error: connection to server on socket failed
I completed the project and saved the universe.sql in my github repository. I tried to submit the project on freecodecamp but it gives me a message - You must complete the project first.
When I click on Start the project and digit psql --username=freecodecamp --dbname=postgres in bash it gives me an error message - PSQL:ERROR: connection to server on socket “/var/run/postgres.sql/.s.PGSQL.5432” failed: No such file or directory.
Is the sever running locally and accepting connections on that socket?

Can someone help me with that? Thanks


So, when you complete the course in CodeAlly, I guess it will give you the Congratulations message with a Continue button… at that point it should tell fCC that you’ve completed the challenge and then you are permitted to submit your code.

I just completed this course, and in my experience, sometimes that update takes a while… usually after completing the course I’d hit that continue, and then just select the project directory as the next project to open. After that, it would take several minutes if not more, and maybe a refresh or two, for the change to register in fCC so I could submit my code. When on the page you see the checkmark I circled below you’ll be allowed to submit your code:


As far as the psql error, either the server didn’t load correctly which happened to me several times, or it just didn’t start the process… you can try the below code to restart the process in the terminal:

sudo service postgresql start

If that doesn’t resolve, you may need to exit and try again later… although someone more knowledgable with the environment might be able to suggest other possible resolutions.

Thank you for your reply. I don’t see the checkmark next to Step 1.

I tried your code to restart the process in terminal and it gave me an error (screenshot attached). This is really frustrating

Is it just me, or is the “Complete this tasks below” not checkmarked…When you re-opened your project, did it not automatically come back up with the Congratulations message for completing the project? Did you backup your database as recommended in the instructions(by saving the .sql file) and is it still in the Projects folder?

I did all as it should and there was Congratulations message 100% complete. I saved universe.sql in the Project folderand everything was fine, Step 1 was checkmarked. I didn’t know how to submit the universe.sql to the Step 2, so I saved that file on my desktop. I tried logging out/in and did Soft reset of the project. When I found out that I need to place the file on my github repository I did it (file attached), but then I couldn’t submit it to Step 2 because of the message You should coplete the project first. and when I reopened the Project everything was gone. There was no Congratualtions message nor universe.sql under Project and even I treid to start the project again with psql --username etc. it says PSQL:ERROR: connection to server on socket “/var/run/postgres.sql/.s.PGSQL.5432” failed: No such file or directory.
Is the sever running locally and accepting connections on that socket?
So, I really don’t understand what happened or what I did wrong? I can see the project celestial bodies on my codeally profile under challanges like other two I did before but when I open it nothing, as I said in previous message. Can someone from freecodecamp fix this bug because I did the whole project and have the universe.sql file saved on my git repositoryhttps://github.com/bospink/sql_sample/blob/main/universe.sql

Yeah, definitely sounding like a corruption or something. At least with the backup of the .sql file, you won’t have to redo any work. Sadly I’m just a student here, so no insight into the inner-workings, just what I’ve done to fix a few issues. I wonder if deleting the project from your codeAlly dashboard would allow you to rebuild the VM and then restore the DB with your SQL file, but may want to wait to see if staff has a better/easier solution. I’ve never tried it. Not sure if trying a different browser would help as well… sometimes when my Firefox hung or had issues, instead opening it in Chrome would allow me in.

There is a report a bug function.

Thank you for your help, I appriciate it. I’ve already reported a bug. We will see.
I know that knowledge is more important than a certificate, but it’s frustrating that when I got to the end it wasn’t recognized.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.