SSH Console - Elixir App


I will often use fly ssh console to use IEx on a remote application. This morning I ran

fly ssh console -a app-staging -s  -C "/app/bin/app remote

It connected and gave me an IEx prompt, but I cannot run any of the functions. When I try to look up a record using Repo I get:

** (RuntimeError) could not lookup Ecto repo App.Repo.Local because it was not started or it does not exist
    lib/ecto/repo/registry.ex:22: Ecto.Repo.Registry.lookup/1
    lib/ecto/repo/supervisor.ex:160: Ecto.Repo.Supervisor.tuplet/2
    lib/gaming/repo.ex:3: Gaming.Repo.Local.get_by/3
    iex:1: (file)

The application is up and running, we have not deployed or changed the infrastructure in any way. Does anyone else have this issue or know what is going on?



Hey @andrewbarr1, we recently changed flyctl not to allocate a pseudo-terminal when given an explicit command (to match the behavior that people expect from OpenSSH). You can still run interactive apps that need a pseudo-terminal by adding --pty to the fly ssh console command. I’m not sure if this is what’s causing your problem, but perhaps it will help?


Perfect. Thank you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.