Tell us what’s happening:
Describe your issue in detail here.
Currently doing the relational database course but facing this major issue …unable to proceed with the course…despite typing the right command in the terminal the logs for the command
\l second_table
is not showing. I had tried many times but unable to proceed . I even tried switching browsers as well but nothing is working . I had checked that I am connected to the database and logged in …needing help in this issue
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Challenge Information:
Learn Relational Databases by Building a Mario Database - Build a Mario Database
Got this when typing \d second_table first:
FATAL: terminating connection due to administrator command
SSL connection has been closed unexpectedly
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
After that \d second_table gave no output.
Is there an option to complete these locally? Thanks for any reply. : )
Hello @gnyrfta
I would like to give you my opinion about running it locally. The answer is yes, there are ways to run this course locally. However, it requires knowledge how the course is structured to set it up properly. You are going to find, eventually, information about setting up your local desktop, but I would not recommend that, since it is going to pollute your system with things you might not want. The other option is to run it in a virtual machine.
Quite often you will see someone recommending this:
But, you might encounter one of the many bugs I have encountered.
That solution uses Linux containers. Do you have the ability to build a docker container and run it?
1 Like
Hi @anon28508191, thanks for the reply!
I decided to jump past the mario database project checkmark - I did complete it once earlier using docker but because of some bug the checkmark did not show up. Anyway, the point with the non-required projects is to learn the stuff so thats ok.
The project I just finished worked using gitpod and following the instructions,
but I stumbled across the same problem as you in an earlier project so I try to do these in one sitting now.
I ran all the projects in the Backend Development and API’s course locally and it was actually much simpler - and also free! I’m on a linux system to begin with, so that might simplify things.
1 Like
Hello @gnyrfta
I agree with you that the point is to learn.
I spent my whole 500 credits in Gitpod just troubleshooting. I was able to do just one course without problem, the first on bash scripting. Not that I needed it but I was curious about the content presented.
Since my credits were consumed in Gitpod I started to find an alternative to do it locally, and then I hit the problem that there was not an easy way to setup my local machine without polluting it with whatever was necessary to develop. I found the instructions that promised to use containers in vscode, but even that I had to setup my local vscode to accommodate what it was expected and more. That pushed me to think about a way to run vscode in the container itself and make the whole experience isolated, like you get from Gitpod.
I chose to use a very well known image from linuxserver.io and to add a couple layers to include the dependencies for the courses. In my next post I will write the Dockerfile I created and compose file to launch it, if that would be something you want to do.
Here’s the Dockerfile. I had to work with what the course and coderoad would expect. I built it as this:
docker build -t learnaway .
FROM linuxserver/openvscode-server:latest
RUN sed -i 's/ALL"/NOPASSWD:ALL"/' /etc/s6-overlay/s6-rc.d/init-openvscode-server/run
RUN yes | unminimize
RUN echo "**** Install course dependencies ****" \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - \
&& apt update \
&& apt install -y \
nodejs \
vim \
postgresql \
postgresql-contrib \
bash-completion \
man-db \
&& apt remove -y nano
RUN ln -snf /config/workspace /workspace
1 Like
Here’s the compose file that I used to launch it. Set your password and match your PUID and PGID to the user that owns the path to the volume. After that, visit the url localhost:3000, vscode will appear. In vscode install coderoad or verify that it got installed. Follow how to load the course you choose from the previous link.
---
version: "3.9"
services:
openvscode-server:
image: learnaway:latest
container_name: classroom
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
# - CONNECTION_TOKEN= #optional
# - CONNECTION_SECRET= #optional
- SUDO_PASSWORD=nada
- DOCKER_MODS=linuxserver/mods:code-server-extension-arguments
- VSCODE_EXTENSION_IDS=coderoad.coderoad
# - SUDO_PASSWORD_HASH=
volumes:
- ./data/config:/config
ports:
- 3000:3000
restart: unless-stopped
1 Like
Very cool! I won’t be able to sit down with FCC for a few days, but will definitely give this a shot. Thanks for posting this!
1 Like
I updated ubuntu to Jammy and seem to have gotten docker working using the link you posted. The tutorials are loading and functioning - we’ll see if the progress is sent to the homepage when done, but anyhow it saves me from spending gitpod credits on the practice projects.