kamal icon indicating copy to clipboard operation
kamal copied to clipboard

Server gives a 404 error

Open DVG opened this issue 4 months ago • 4 comments

I have a fresh VM Instance on Google Cloud Platform that I have deployed a Rails 8 rc1 app on with Kamal. Everything appears to be healthy. The deploy succeeds, I can use the kamal helper commands to get a remote console and see migrations and such have run, the proxy is up, the health check passed.

But when I go to the ip address, I see:

Screenshot 2024-10-24 at 10 05 09 PM

kamal logs

 INFO ssh -t app@my-ip -p 22 'sh -c '\''docker ps --latest --quiet --filter label=service=portal --filter label=destination=development --filter label=role=web --filter status=running --filter status=restarting --filter ancestor=$(docker image ls --filter reference=us-central1-docker.pkg.dev/orita-cloud/portal-development/portal:latest-development --format '\''\'\'''\''{{.ID}}'\''\'\'''\'') ; docker ps --latest --quiet --filter label=service=portal --filter label=destination=development --filter label=role=web --filter status=running --filter status=restarting'\'' | head -1 | xargs docker logs --timestamps --tail 10 --follow 2>&1'
2024-10-25T02:04:08.902482163Z *  Max threads: 3
2024-10-25T02:04:08.902731221Z *  Environment: production
2024-10-25T02:04:08.902896391Z *          PID: 39
2024-10-25T02:04:08.903658177Z * Listening on http://0.0.0.0:3000
2024-10-25T02:04:08.910713328Z Use Ctrl-C to stop
2024-10-25T02:04:09.114849696Z {"time":"2024-10-25T02:04:09.114675344Z","level":"INFO","msg":"Request","path":"/up","status":200,"dur":131,"method":"GET","req_content_length":0,"req_content_type":"","resp_content_length":73,"resp_content_type":"text/html; charset=utf-8","remote_addr":"172.18.0.3:45846","user_agent":"Go-http-client/1.1","cache":"miss","query":""}
2024-10-25T02:04:09.401826305Z SolidQueue-1.0.0 Fail claimed jobs (29.5ms)  job_ids: [], process_ids: []
2024-10-25T02:04:09.408356065Z SolidQueue-1.0.0 Started Supervisor (465.2ms)  pid: 57, hostname: "my-ip-04604b769b64", process_id: 7, name: "supervisor-66740156c928f77b1961"
2024-10-25T02:04:09.855761217Z SolidQueue-1.0.0 Started Worker (417.5ms)  pid: 69, hostname: "my-ip-04604b769b64", process_id: 8, name: "worker-0bfc66910a46d361fbe4", polling_interval: 0.1, queues: "*", thread_pool_size: 3
2024-10-25T02:04:09.910640483Z SolidQueue-1.0.0 Started Dispatcher (476.0ms)  pid: 67, hostname: "my-ip-04604b769b64", process_id: 9, name: "dispatcher-35fb3658737b2a3d3392", polling_interval: 1, batch_size: 500, concurrency_maintenance_interval: 600

docker ps

CONTAINER ID   IMAGE                                                                                                       COMMAND                  CREATED         STATUS         PORTS                                                                      NAMES
feebb54e40e7   app:19ccfea2db3ed70fe18b005116296e5419e378a9   "/rails/bin/docker-e…"   2 minutes ago   Up 2 minutes   80/tcp                                                                     portal-web-development-19ccfea2db3ed70fe18b005116296e5419e378a9
fc9e3b4267f1   basecamp/kamal-proxy:v0.8.1                                                                                 "kamal-proxy run"        2 hours ago     Up 2 hours     0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   kamal-proxy
cf7860f36767   postgres:15                                                                                                 "docker-entrypoint.s…"   2 hours ago     Up 3 minutes   5432/tcp                                                                   app-db

I'm not sure what could be wrong.

DVG avatar Oct 25 '24 02:10 DVG