Realtime: Docker-compose 无法启动 - eafnosupport(协议族不支持地址族)

创建于 2020-07-21  ·  4评论  ·  资料来源: supabase/realtime

按照https://supabase.io/docs/realtime/docker的说明操作时,我收到错误消息:

docker-compose up
Starting rnbackend_db_1 ... done
Starting rnbackend_realtime_1 ... done
Attaching to rnbackend_db_1, rnbackend_realtime_1
db_1        | 
db_1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1        | 
db_1        | 2020-07-21 06:25:46.161 UTC [1] LOG:  starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
db_1        | 2020-07-21 06:25:46.163 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1        | 2020-07-21 06:25:46.164 UTC [1] LOG:  could not create IPv6 socket for address "::": Address family not supported by protocol
db_1        | 2020-07-21 06:25:46.173 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1        | 2020-07-21 06:25:46.207 UTC [25] LOG:  database system was shut down at 2020-07-21 06:25:24 UTC
db_1        | 2020-07-21 06:25:46.214 UTC [1] LOG:  database system is ready to accept connections
realtime_1  | 06:25:50.598 [error] Failed to start Ranch listener RealtimeWeb.Endpoint.HTTP in :ranch_tcp:listen([{:cacerts, :...}, {:key, :...}, {:cert, :...}, :inet6, {:port, 4000}]) for reason :eafnosupport (address family not supported by protocol family)
realtime_1  | 
realtime_1  | 06:25:50.599 [info] Application realtime exited: Realtime.Application.start(:normal, []) returned an error: shutdown: failed to start child: RealtimeWeb.Endpoint
realtime_1  |     ** (EXIT) shutdown: failed to start child: {:ranch_listener_sup, RealtimeWeb.Endpoint.HTTP}
realtime_1  |         ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
realtime_1  |             ** (EXIT) {:listen_error, RealtimeWeb.Endpoint.HTTP, :eafnosupport}
realtime_1  | {"Kernel pid terminated",application_controller,"{application_start_failure,realtime,{{shutdown,{failed_to_start_child,'Elixir.RealtimeWeb.Endpoint',{shutdown,{failed_to_start_child,{ranch_listener_sup,'Elixir.RealtimeWeb.Endpoint.HTTP'},{shutdown,{failed_to_start_child,ranch_acceptors_sup,{listen_error,'Elixir.RealtimeWeb.Endpoint.HTTP',eafnosupport}}}}}}},{'Elixir.Realtime.Application',start,[normal,[]]}}}"}
realtime_1  | Kernel pid terminated (application_controller) ({application_start_failure,realtime,{{shutdown,{failed_to_start_child,'Elixir.RealtimeWeb.Endpoint',{shutdown,{failed_to_start_child,{ranch_listener_sup
realtime_1  | 
realtime_1  | Crash dump is being written to: erl_crash.dump...done
rnbackend_realtime_1 exited with code 1

最有用的评论

感谢@soedirgo ,我的电脑在 grub 中禁用了 ipv6 的情况下启动,在重新启用它后可以正常工作。

所有4条评论

@lacoprof

rnbackend - 你介意分享你的 docker-compose 文件吗? 我们可以对其进行测试,并让您知道是否需要进行任何更改

谢谢,我使用默认的https://github.com/supabase/realtime/blob/master/docker-compose.dev.yml
docker-compose --version
docker-compose 版本 1.25.0,构建未知
码头工人--版本
Docker 版本 19.03.8,构建 afacb8b7f0

@lacoprof ,你的机器支持IPv6吗? 从这几行来看:

db_1        | 2020-07-21 06:25:46.164 UTC [1] LOG:  could not create IPv6 socket for address "::": Address family not supported by protocol
realtime_1  | 06:25:50.598 [error] Failed to start Ranch listener RealtimeWeb.Endpoint.HTTP in :ranch_tcp:listen([{:cacerts, :...}, {:key, :...}, {:cert, :...}, :inet6, {:port, 4000}]) for reason :eafnosupport (address family not supported by protocol family)

处理 IPv6 的本地主机似乎有问题。 我没有没有 IPv6 的机器,所以我无法重现这个。

感谢@soedirgo ,我的电脑在 grub 中禁用了 ipv6 的情况下启动,在重新启用它后可以正常工作。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

kwakwaversal picture kwakwaversal  ·  6评论

awalias picture awalias  ·  5评论

kiwicopple picture kiwicopple  ·  14评论

awalias picture awalias  ·  6评论

retendo picture retendo  ·  12评论