I’ve got a workflow now, where I am deploying via GH Actions and I am seeing an error preventing deployment. I use the internal Redis URL found at FLY_REDIS_CACHE_URL and on every deployment, I see the following error and failure for my ‘web’ app:
2021/09/10 02:22:48 dial tcp: lookup redis on [fdaa::3]:53: no such host
Any idea what I should do to move past this roadblock? Is the flyctl tool used in the action the same as the version found on Hombrew? I am currently running:
It looks like it’s trying to look up the hostname redis, which wouldn’t work. If you’re trying to point to a Redis in the same org, you’ll need to use <appname>.internal.
Hey Kurt! As always thanks for being available for CFT work. I already have the app doing exactly as you said. I am now concerned that my secrets from another environment are being read in this environment causing the issue. The redis reference is from the development docker network DNS entry docker-compose created. Let’s assume I put it there on the remote and want it off!
So I tried that - unsetting all secrets. I called flyctl secrets unset k=v ....
The response was:
Error No change detected to secrets
I also tried to check that I could ping Redis (I set up my own) and did not get what I expected.
echo "PING" | nc <app-name>.internal 6379 did not return any response.
I’d like to reset my secrets for the ‘web’ application and then redeploy them. What are your thoughts?
The biggest area of concern is the stickiness of the secrets.
Alright I made the change I am getting the same state from the link in the ‘Possibly related’ comment. Trying to set the secrets now results in ‘no change detected to secrets’
This is a wild guess, but is it possible your Dockerfile or Docker compose are setting an env variable that overrides the secret / env variable set through Fly?
is it possible your Dockerfile or Docker compose are setting an env variable that overrides the secret / env variable set through Fly
The only way I could determine this (I believe) is by retrieving the secrets current running in the VM. My secrets workflow is done entirely from localhost. I decrypt secrets run something like this:
You can see what secrets/env variables are set in your VM by connecting over ssh, then running env:
> fly ssh console
env
It is suspicious that it’s trying to resolve the name that docker compose uses for your local redis service. It seems unlikely that you ever set a secret like FLY_REDIS_URL=redis://redis, but that redis name it’s trying to resolve is coming from somewhere.
Since redis is running I assumed it was a network issue.
I have added these lines, but the API VM still cannot connect:
redis-cli -h ipv4 => network timeout
redis-cli -u redis://<redissvcname>.internal => Could not connect to Redis at <redissvcname>.internal:6379: Connection refused