Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containers are not Pulling #753

Closed
TheStealth359 opened this issue Aug 9, 2023 · 9 comments
Closed

Containers are not Pulling #753

TheStealth359 opened this issue Aug 9, 2023 · 9 comments

Comments

@TheStealth359
Copy link

I have been using Fermentrack on an older i386 laptop running Raspbian Bister. I had originally installed the docker version back when it was on its own branch. A few days ago I finally caved to the GUI notification to update via git. The update was successful, but then I got a message that I needed to upgrade fermentrack-tools following the info in issue #727. This initially failed because I still had the docker branch checked out. I switched branches to master and things seem to have progressed better. However, now I'm faced with the following error pulling the containers and the script seems to just hang here:

curl -L install.fermentrack.com | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   123  100   123    0     0    530      0 --:--:-- --:--:-- --:--:--   532
100  6918  100  6918    0     0  15039      0 --:--:-- --:--:-- --:--:-- 15039

<<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>>
:: Checking user
::: This script was called without root privileges, which is recommended. The script will, however,
::: need root privileges periodically in order to install certain packages. Please be ready to
::: enter your password if prompted to allow installation to continue.
:::
:: Verifying free disk space...
::: Sufficent free space for installation
:: Installing dependencies using apt-get
::: installing git and build-essential.
::: (This may take a few minutes during which everything will be silent)
:::: All packages installed successfully.
:: Cloning fermentrack-tools repo from GitHub into /home/pi/fermentrack-tools
::: Repo was cloned successfully.
:: This script will now attempt to install Fermentrack using the script that has been created at
::: /home/pi/fermentrack-tools/install.sh
::: If the install script does not complete successfully, please relaunch the script above directly.
:::
:::: Launching Fermentrack installer.
::: Checking for Internet connection:
::: Internet connection Success!
::: Verifying free disk space...
::: Sufficient free disk space is available
::: Checking that the Fermentrack installer (this repo) is up to date...
::: This repo is up to date. Continuing.
::: Checking/installing Docker prerequisites using apt-get
::: Docker is already installed. Continuing.
::: Docker-compose is already installed. Continuing.
::: pi already belongs to the 'docker' group
::: Able to access docker - Proceeding.
::: Downloading required files from GitHub for setup
::: Creating Fermentrack TiltBridge Junior environment configuration at ./envs/tiltbridge-jr
::: This script will now attempt to shut down any previous installation of Fermentrack
::: before proceeding.
::: Shutting down previous installation...
::: Previous installation shut down. Continuing with install.
::: The default port for Fermentrack to run on is port 80 (which is standard
::: for most websites). If you have another service currently running on port 80
::: then this install will likely fail unless another port is selected.

::: 80 is a valid port for installation. Continuing.
::: Creating Fermentrack environment configuration at ./envs/django
::: Creating Fermentrack Postgres environment configuration at ./envs/postgres
::: Downloading, building, and starting Fermentrack containers
Pulling postgres          ... error
Pulling redis             ... error
Pulling django            ...
Pulling nginx             ... error
Pulling tiltbridge-junior ...

I have tried the following to resolve the issue:

  • Delete the fermentrack-tools folder and reinstall using the automated curl script
  • Delete the fermentrack-tools folder and reinstall manually using the installl.sh script
  • Deleted all docker containers and images
  • Tried as a regular user and as root

I always get the same problems with the postgres, redis, and nginx containers and fermentrack fails to install. Is there something that I am missing?
Thanks

@thorrak
Copy link
Owner

thorrak commented Aug 9, 2023

I’ll take a look at docker hub momentarily - but what do you see if you run uname -a?

@TheStealth359
Copy link
Author

Thanks for the quick reply. Here is the info:

Linux Beaker 4.19.0-25-686-pae #1 SMP Debian 4.19.289-1 (2023-07-24) i686 GNU/Linux

@thorrak
Copy link
Owner

thorrak commented Aug 9, 2023

Yeah, the i386 images should work then (though I would recommend migrating to a 64 bit build if your hardware is capable of it). I can see the images are available on Docker Hub so there shouldn’t be any issue pulling them. Can you see if you get any errors if you pull the image manually? To do so, just run docker pull jdbeeler/fermentrack

@TheStealth359
Copy link
Author

The laptop I'm currently using is a first gen Atom CPU, so no go for 64bit. I do have a Raspberry Pi 3B that I was saving for another project that I could put 64bit Raspbian on. However, if I do this is there any way to migrate all the fermentrack data that is on the old device?

The manual pull did work

docker pull jdbeeler/fermentrack
Using default tag: latest
latest: Pulling from jdbeeler/fermentrack
8de74d843a46: Pull complete
bbaaf1649176: Pull complete
3677802a5238: Pull complete
1621baec8fbf: Pull complete
cb9b4eff69a7: Pull complete
4095cde13411: Pull complete
ea9fa0d1d782: Pull complete
b1c13bf58a11: Pull complete
6d0c94a8807e: Pull complete
8d4fa25beab5: Pull complete
773e42360ef3: Pull complete
ad567405da66: Pull complete
c354623b1500: Pull complete
330d29fcb699: Pull complete
378bbd445112: Pull complete
d6d012abb08a: Pull complete
3fd66060edc8: Pull complete
d2c249a4625e: Pull complete
f193dc7e406a: Pull complete
564dcea6ab9b: Pull complete
8bd1dde6f6b7: Pull complete
ddf613b2d209: Pull complete
a3fa6019d421: Pull complete
02a2165a9ae4: Pull complete
0d9e2075387d: Pull complete
32bb278dcb16: Pull complete
78aa97c9956d: Pull complete
4f4fb700ef54: Pull complete
5265236c7830: Pull complete
cad2355fd6a0: Pull complete
Digest: sha256:4e411a009f13092d8f25735c468a21ad0900ac45a317bf524b8986fab2bb252e
Status: Downloaded newer image for jdbeeler/fermentrack:latest

@TheStealth359
Copy link
Author

I just tried to run the install script again and it seems to progress a bit further. However the pull access denied errors are odd. I let it sit for 30+ mins and it seems stuck at Waiting for PostgreSQL to become available...

Pulling postgres          ... error
Pulling redis             ... error
Pulling django            ... done
Pulling nginx             ... error
Pulling tiltbridge-junior ...

ERROR: for redis  pull access denied for fermentrack_redis, repository does not exist or may require 'docker login'

ERROR: for nginx  pull access denied for fermentrack_nginx, repository does not exist or may require 'docker login'

ERROR: for postgres  pull access denied for fermentrack_postgres, repository does not exist or may require 'docker login'

ERROR: for tiltbridge-junior  no matching manifest for unknown in the manifest list entries
ERROR: no matching manifest for unknown in the manifest list entries
latest: Pulling from jdbeeler/fermentrack
Digest: sha256:4e411a009f13092d8f25735c468a21ad0900ac45a317bf524b8986fab2bb252e
Status: Image is up to date for jdbeeler/fermentrack:latest
Building postgres
Step 1/4 : FROM postgres:12.3
12.3: Pulling from library/postgres
23ad22c16ab9: Pull complete
67ea487ca635: Pull complete
0154231add66: Pull complete
da4fbfa021e0: Pull complete
3cc5482d80e9: Pull complete
e53a5ef67b75: Pull complete
2127fe0de980: Pull complete
1f4cee315191: Pull complete
6c40b97781cc: Pull complete
cd6702343613: Pull complete
a8989e8330bb: Pull complete
8bb8e4c39e4b: Pull complete
91a20d9ad23e: Pull complete
06ab166efa3c: Pull complete
Digest: sha256:a06e6e6e519b7a329c419f8221edec66cfc45511e8b80e262c12103ba745cf19
Status: Downloaded newer image for postgres:12.3
 ---> ec00669d9148
Step 2/4 : COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance
 ---> 1569bb535a2b
Step 3/4 : RUN chmod +x /usr/local/bin/maintenance/*
 ---> Running in c8218fd2abbb
Removing intermediate container c8218fd2abbb
 ---> c3793511b364
Step 4/4 : RUN mv /usr/local/bin/maintenance/* /usr/local/bin     && rmdir /usr/local/bin/maintenance
 ---> Running in 3bac3012a285
Removing intermediate container 3bac3012a285
 ---> 2258b8d22e9b

Successfully built 2258b8d22e9b
Successfully tagged fermentrack_postgres:latest
Building redis
Step 1/3 : FROM redis:6.0
6.0: Pulling from library/redis
3a8b0c4b1a83: Pull complete
bc44b28409ee: Pull complete
4afc9cb29d6c: Pull complete
6ee0b3a4bfd3: Pull complete
509cbb9bb715: Pull complete
c0d2031896fe: Pull complete
Digest: sha256:c712a9030f8fb4d3d27f79cec68e9e2ca5f4b8712bb58aba1f799b422c309eef
Status: Downloaded newer image for redis:6.0
 ---> 9b2d6ba7bde3
Step 2/3 : COPY ./compose/production/redis/redis.conf /usr/local/etc/redis/redis.conf
 ---> e9ee9b60b6dc
Step 3/3 : CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
 ---> Running in 091ce1c3efc7
Removing intermediate container 091ce1c3efc7
 ---> 3eb289cd26f1

Successfully built 3eb289cd26f1
Successfully tagged fermentrack_redis:latest
Building nginx
Step 1/2 : FROM nginx:1.18.0-alpine
1.18.0-alpine: Pulling from library/nginx
ac056f582090: Pull complete
f941b4fb1009: Pull complete
d70ae12b4309: Pull complete
846aaf3722a0: Pull complete
ae2dc5f55365: Pull complete
Digest: sha256:93baf2ec1bfefd04d29eb070900dd5d79b0f79863653453397e55a5b663a6cb1
Status: Downloaded newer image for nginx:1.18.0-alpine
 ---> 776ed0d2dee4
Step 2/2 : COPY ./compose/production/nginx/nginx.conf /etc/nginx/nginx.conf
 ---> 6afabb63730b

Successfully built 6afabb63730b
Successfully tagged fermentrack_nginx:latest
tiltbridge-junior uses an image, skipping
Creating fermentrack-tools_postgres_1 ... done
Creating fermentrack-tools_redis_1    ... done
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...
Waiting for PostgreSQL to become available...

@thorrak
Copy link
Owner

thorrak commented Aug 9, 2023

OK cool - that's a start! Let's pull the rest of the images from Docker Hub manually, then reattempt the install.sh script:

  • docker image pull nginx:1.18.0-alpine
  • docker image pull postgres:12.3
  • docker image pull redis:6.0

Those 4 are the base images that you need to be able to build the stack for Fermentrack. Assuming you have no errors from pulling those 3 additional images, re-run install.sh and it should hopefully all work. If it doesn't, try running docker-compose build manually (after you've tried running install.sh at least once -- that downloads files that you will need for this to work) and see if you get any error messages.

One thing to note -- You mentioned deleting your fermentrack-tools directory -- did you happen to back up your envs folder? If yes, then copy those env files back to the envs folder in the fermentrack-tools directory before you run install.sh. If not, then once you finish the install things will probably still break since you deleted your Postgres username/password (you'll get an error message when you try to access the site). There may still be a way to recover, but admittedly it's not a scenario that I've encountered before, and thus it will take some time to work out how. I would start with the above in any case and see what happens - we can then go from there.

@TheStealth359
Copy link
Author

The docker pulls told me that they were up to date, but it still gets stuck at Waiting for PostgreSQL to become available....

I did not backup the envs folder, so I guess I'm resigned to going scorched earth and loosing all my data to avoid unnecessary headaches. I guess I could just backup the docker volumes and start from scratch. Anything else I should nuke to start over?

@thorrak
Copy link
Owner

thorrak commented Aug 9, 2023

Yeah — it can’t log into Postgres is why that’s the case. You have a couple of options here:

Scorched earth: You can delete your volumes (or just the Postgres volume) and start fresh. If you run docker volume ls you should get a list of volumes. You can then run docker volume rm <volume id> which will remove a specific volume, or run docker volume prune -f to delete everything. I may be wrong about the -f option - if you get an error just run docker volume prune.

Slightly less scorched earth: Your log files (CSVs) are backed up in the fermentrack_data directory which should be somewhere like /lib/docker/data or something like that. I can get you an exact file path later. You won’t be able to view them in Fermentrack since the database entries aren’t there, but if you want the CSVs they will be available.

Try changing the Postgres passwords: There is supposedly a way that you can create a new Postgres user and change its password using docker commands. I haven’t done this, but I can try to help figure this out. Unfortunately, this may have to wait a bit as I’m currently traveling but it might be an option to recover your data.

@TheStealth359
Copy link
Author

Well in the end I'm giving up on the laptop running Raspbian and switched over to the RPi 3B running a 64 bit OS. The installation worked perfectly. I also managed to backup my CSV files for future reference.

Thanks again for he prompt responses!
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants