mikeizbicki / cmc-csci143

big data course materials
40 stars 76 forks source link

Docker-compose containers not building properly #525

Closed westondcrewe closed 7 months ago

westondcrewe commented 7 months ago

Hi!

I am currently facing an issue of my containers failing to build, as indicated by the state 'Exit 1' when I run docker-compose ps. I've run docker-compose logs pg_denormalized and docker-compose logs pg_normalized_batch, and I see the following lines for both containers.

initdb: error: directory "/var/lib/postgresql/data" exists but is not empty initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".

I believe the root of my issue is that I did not run the commands to delete the postgres data from within the containers at some point, but now when I try to delete the data it does not fix my issue and I still see 'Exit 1'. Is there a way for me to fix this issue for myself, or do I need @mikeizbicki to delete the data as a root user (as hinted at in Step 0)? Any help is appreciated.

Thank you, Weston

mikeizbicki commented 7 months ago

I've just ran the following command

$ sudo rm -rf /home/Weston.Crewe.25/bigdata/pg_denormalized /home/Weston.Crewe.25/bigdata/pg_normalized_batch

to delete those folders for you.

westondcrewe commented 7 months ago

Awesome, thank you!