processone / docker-ejabberd

Set of ejabberd Docker images
95 stars 77 forks source link

ejabberd/ecs startup failing in machines where ipv6 is disabled #94

Closed princejt closed 1 year ago

princejt commented 1 year ago

I am facing an issue where I am trying to start the ejabberd/ecs container in Ubuntu 20.04. The network has ipv6 disabled. On trying to launch ejabberd/ecs it fails with address family not supported by protocol family error. I think this is happening since the ejabberd.yml is specifying the ip configuration using ::.

https://github.com/processone/docker-ejabberd/blob/master/ecs/conf/ejabberd.yml#L41 .

Is there a way to configure this in a way compatible to ipv4 network.

FYI : I tried changing all configurations in ejabberd.yml with 0.0.0.0 and that allowed the container startup to go through. But I am not sure if it will result in any functionality issues .

2023-03-06 08:04:58.490971+00:00 [info] Loading configuration from /home/ejabberd/conf/ejabberd.yml 2023-03-06 08:04:58.532150+00:00 [warning] Option 'log_rotate_date' is deprecated and has no effect anymore. Please remove it from the configuration. 2023-03-06 08:04:58.532258+00:00 [warning] Option 'log_rate_limit' is deprecated and has no effect anymore. Please remove it from the configuration. 2023-03-06 08:04:58.957468+00:00 [info] Configuration loaded successfully 2023-03-06 08:04:59.113834+00:00 [info] Got no NOTIFY_SOCKET, notifications disabled 2023-03-06 08:04:59.185055+00:00 [error] Failed to open socket at [::]:5222 for ejabberd_c2s: address family not supported by protocol family 2023-03-06 08:04:59.185302+00:00 [error] SUPERVISOR REPORT: supervisor: {local,ejabberd_listener} errorContext: start_error reason: eafnosupport offender: [{pid,undefined}, {id,{5222,{0,0,0,0,0,0,0,0},tcp}}, {mfargs, {ejabberd_listener,start, [{5222,{0,0,0,0,0,0,0,0},tcp}, ejabberd_c2s,

{accept_interval => 0,access => c2s,backlog => 5,

                       cafile => undefined,ciphers => undefined,
                       dhfile => undefined,
                       ip => {0,0,0,0,0,0,0,0},
                       max_fsm_queue => 10000,max_stanza_size => 262144,
                       protocol_options => undefined,send_timeout => 15000,
                       shaper => c2s_shaper,starttls => false,
                       starttls_required => true,supervisor => true,
                       tls => false,tls_compression => false,
                       tls_verify => false,transport => tcp,
                       use_proxy_protocol => false,zlib => false}]}},
            {restart_type,transient},
            {significant,false},
            {shutdown,brutal_kill},
            {child_type,worker}]

2023-03-06 08:04:59.186246+00:00 [error] SUPERVISOR REPORT: supervisor: {local,ejabberd_sup} errorContext: start_error reason: {shutdown, {failed_to_start_child, {5222,{0,0,0,0,0,0,0,0},tcp}, eafnosupport}} offender: [{pid,undefined}, {id,ejabberd_listener}, {mfargs,{ejabberd_listener,start_link,[]}}, {restart_type,permanent}, {significant,false}, {shutdown,infinity}, {child_type,supervisor}]

2023-03-06 08:04:59.193969+00:00 [critical] Failed to start ejabberd application: {error, {shutdown, {failed_to_start_child, ejabberd_listener, {shutdown, {failed_to_start_child, {5222,{0,0,0,0,0,0,0,0},tcp}, eafnosupport}}}}} xited with code 1

prefiks commented 1 year ago

You could try removing that ip: "::" line, i think it will listen on ipv4 only then

badlop commented 1 year ago

@princejt, were you able to test that configuration solution? And did it help to solve your problem?

princejt commented 1 year ago

removing the ip: "::" line worked. I am able to start container without the issue. Thanks @prefiks and @badlop