How can I see what port a phoenix app in production is actually trying to use?

Thanks @manukall and @idi527 you helped me resolve my issue.
@manukall: you were right, I had not un-commented the config :phoenix, :serve_endpoints, true in my prod.exs config file.
After fixing that, re-building, re-deploying and re-starting, then I was able to use the remote_console as @idi527 suggested (using the appName.Endpoint from my prod.exs file, appending .Server to the end of that then issuing this command on the console::sys.get_state Myapp.Endpoint.Server
The result verified the successful operation:

 {:state, {:local, Myapp.Endpoint.Server}, :one_for_one,
  [{:child, #PID<0.1338.0>, {:ranch_listener_sup, Myapp.Endpoint.HTTP},
    {Phoenix.Endpoint.CowboyHandler, :start_link,
     [:http, Myapp.Endpoint,
      {:ranch_listener_sup, :start_link,
       [Myapp.Endpoint.HTTP, 100, :ranch_tcp,
        [max_connections: 16384, port: 4000], :cowboy_protocol,
        [env: [dispatch: [{:_, [],
            [{["socket", "websocket"], [], Phoenix.Endpoint.CowboyWebSocket,
              {Phoenix.Transports.WebSocket,
               {Myapp.Endpoint, Myapp.UserSocket, :websocket}}},
             {:_, [], Plug.Adapters.Cowboy.Handler,
              {Myapp.Endpoint, []}}]}]]]]}]}, :permanent, :infinity, :supervisor,
    [:ranch_listener_sup]}], :undefined, 3, 5, [], 0, Phoenix.Endpoint.Server,
  {:myapp, Myapp.Endpoint}}
2 Likes