Max
Logs full with (ArgumentError) unknown registry: RumblWeb.PubSub
Hi,
after updating to Phoenix 1.5 and follwing the upgrade plan, my logs are full with:
[error] an exception was raised:
** (ArgumentError) unknown registry: RumblWeb.PubSub
(elixir 1.12.0) lib/registry.ex:1332: Registry.info!/1
(elixir 1.12.0) lib/registry.ex:985: Registry.register/3
(phoenix_pubsub 2.0.0) lib/phoenix/pubsub.ex:117: Phoenix.PubSub.subscribe/3
(phoenix 1.5.9) lib/phoenix/channel/server.ex:420: Phoenix.Channel.Server.init_join/3
(phoenix 1.5.9) lib/phoenix/channel/server.ex:378: Phoenix.Channel.Server.channel_join/4
(phoenix 1.5.9) lib/phoenix/channel/server.ex:298: Phoenix.Channel.Server.handle_info/2
(stdlib 3.15) gen_server.erl:695: :gen_server.try_dispatch/4
(stdlib 3.15) gen_server.erl:771: :gen_server.handle_msg/6
application.ex
defmodule Rumbl.Application do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
{Phoenix.PubSub, name: Rumbl.PubSub},
# Start the Ecto repository
supervisor(Rumbl.Repo, []),
# Start the endpoint when the application starts
supervisor(RumblWeb.Endpoint, []),
# Start your own worker by calling: Rumbl.Worker.start_link(arg1, arg2, arg3)
# worker(Rumbl.Worker, [arg1, arg2, arg3]),
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Rumbl.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
def config_change(changed, _new, removed) do
RumblWeb.Endpoint.config_change(changed, removed)
:ok
end
end
config.exs (partial)
…
config :rumbl,
namespace: Rumbl
config :rumbl, ecto_repos: [Rumbl.Repo]
# Configures the endpoint
config :rumbl, RumblWeb.Endpoint,
url: [host: "//*.mydomain.io"],
# root: Path.dirname(__DIR__),
secret_key_base: "123",
render_errors: [view: RumblWeb.ErrorView, format: "json", accepts: ~w(html json)],
pubsub_server: RumblWeb.PubSub
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
config :phoenix, :json_library, Jason
# Configure phoenix generators
config :phoenix, :generators,
migration: true,
binary_id: false
What can i do?
thanks
Marked As Solved
APB9785
Creator of ECSx
I found another thread where the same issue is discussed from #14 down. It seems the module naming conventions in the book are a little outdated now - but it’s easily fixable!
6
Also Liked
APB9785
Creator of ECSx
Maybe in config.exs try changing
pubsub_server: RumblWeb.PubSub
to
pubsub_server: Rumbl.PubSub
?
2
Max
Thank you all for your help. Apart from your suggestions i also had an old code in mix:
def application do
[mod: {Rumbl, []}, extra_applications: [:logger]]
end
needs to be
def application do
[mod: {Rumbl.Application, []}, extra_applications: [:logger]]
end
But the app worked all the time before. So not sure where i missed the change.
2
Popular in Questions
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Hello, I have map which I want to convert it to string like this:
the map:
%{last_name: "tavakkoli", name: "shahryar"}
the string I ne...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
i’m a new one to elixir
which editor can i use
vs code? or atom?
Thanks! :smiley:
New
I have a super simple question about elixir - how would I take a file like this
foo
bar
baz
and output a new file that enumerates th...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New
Other popular topics
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode.
The solution seems to be, in a hyphena...
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
In templates/appointment/index.html.eex:
<%= for appointment <- @appointments do %>
<tr>
<td><%= appoi...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








