elmercante
Hi @axelson, thanks for putting together main_proxy. I want to use it to do the same thing you’ve used it for: running multiple applications from one BEAM instance. I have an umbrella application with three phoenix endpoints (3 separate child apps): one for an e-commerce shop, another for the store’s admin area, and a third for its cms admin area. I want to route the requests for the admin areas to the single exposed web port for the e-commerce shop since the other two will never see much traffic. However, I’m having difficulty getting it to work with my release.
I have the functionality working correctly in both my local dev and prod environments, but once I use mix release to produce a release nothing is served when I start it. I’m seeing logs such as Configuration :server was not enabled for MyAppWeb.Endpoint, http/https services won't start for each web app that I’m trying to spin up locally in my release. Upon deployment (we build & start the release on Render) I’m seeing those logs plus the following ==> No open HTTP ports detected on 0.0.0.0, continuing to scan...
Do you have any idea what the issue could be?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
stefanluptak
You probably don’t have this part in your
config/runtime.exs:Change the port accordingly.
elmercante
Hey @stefanluptak thanks for the suggestion. I had
portalready inconfig/config.exsand I’ve addedip(tried them in bothconfig.exsandruntime.exs), but I’m still running into the same error logs.hubertlepicki
Two suspects:
MyApp.Proxy(or whatever you called it) in your application.ex in the supervision tree? This is this step in the readme:This should be done in one of the applications you have in app/. In my case I created a separate application just to serve that.
You should have something like this in the top-level mix.exs of your project
I strongly suspect you’re not doing 1 or 2 or both and the OTP application that should have main proxy as a child either does not start at all, or does not start the child.
stefanluptak
I am also suspecting not exposing ports in Docker, if it is being used.
elmercante
Hey @hubertlepicki thanks! #2 fixed the release locally and I’m now seeing the other two apps when I start it. The app deployed correctly and I’m no longer seeing the
No open HTTP ports detectedlogs. Unfortunately the admin apps still aren’t being served according to the backends I defined inMyApp.Proxy. What could I be doing wrong there?elmercante
I’m not using Docker.
hubertlepicki
Do you include these admin apps in the release as well? They both should have entries with :permanent just like your main app does.
elmercante
Yea one entry for the main app, one each for the admin apps, and now one for the proxy app.
hubertlepicki
And it’s broken as well on the local release and when you deploy, or only when you deploy?
But it works when you start with iex -S mix ?
Also: what does it mean it’s broken. It renders 404 page out of the main app?
elmercante
Only when I deploy. The local release is starting normally and I can access the admin apps from the domains defined in
backends. On the deployed version I’m seeing a “This site can’t provide a secure connection my-shop-admin.my-app-lhrl.onrender.com uses an unsupported protocol.” page (ERR_SSL_VERSION_OR_CIPHER_MISMATCH). It doesn’t actually produce a log with more information.