processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.09k stars 1.51k forks source link

Error on fresh install ejabberd 20.x #3175

Closed xdnroot closed 4 years ago

xdnroot commented 4 years ago

I installed ejabberd 20.x on centos 7, with default configuration. I have disabled firewall on centos.

However when I start with command "ejabberdctl start", there is no error or alert. And ejabberdctl didn't start. There is only epmd service listening on port 4369.

I also tried to kill epmd service. Then start ejabberdctl again, but there is same.

Moreover, I tried "ejabberdctl live", there are logs like this:

[xdn@trx ~]$ ./ejabberd-20.02/bin/ejabberdctl live
--------------------------------------------------------------------

IMPORTANT: ejabberd is going to start in LIVE (interactive) mode.
All log messages will be shown in the command shell.
You can interact with the ejabberd node if you know how to use it.
Please be extremely cautious with your actions,
and exit immediately if you are not completely sure.

To exit this LIVE mode and stop ejabberd, press:
  q().  and press the Enter key

--------------------------------------------------------------------
To bypass permanently this warning, add to ejabberdctl.cfg the line:
  EJABBERD_BYPASS_WARNINGS=true
Press return to continue

Erlang/OTP 21 [erts-10.3.4] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Eshell V10.3.4  (abort with ^G)
(ejabberd@localhost)1> 23:30:15.678 [notice] Changed loghwm of /home/xdn/ejabberd-20.02/logs/error.log to 100
23:30:15.678 [notice] Changed loghwm of /home/xdn/ejabberd-20.02/logs/ejabberd.log to 100
23:30:15.804 [info] Loading configuration from /home/xdn/ejabberd-20.02/conf/ejabberd.yml
23:30:15.830 [warning] ACME directory URL https://acme-v01.api.letsencrypt.org defined in option acme->ca_url is deprecated and was automatically replaced with https://acme-v02.api.letsencrypt.org/directory. Please adjust your configuration file accordingly. Hint: run `ejabberdctl dump-config` command to view current configuration as it is seen by ejabberd.
23:30:15.830 [warning] Option 'log_rotate_date' is deprecated and has no effect anymore. Please remove it from the configuration.
23:30:15.830 [warning] Option 'log_rate_limit' is deprecated and has no effect anymore. Please remove it from the configuration.
23:30:16.203 [info] Configuration loaded successfully
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/roster.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/archive_msg.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/archive_prefs.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/caps_features.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/last_activity.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/motd.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/motd_users.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/mqtt_pub.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/offline_msg.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/privacy.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/private_storage.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/pubsub_item.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/push_session.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/roster_version.DAT" not properly closed, repairing ...
dets: file "/home/xdn/ejabberd-20.02/database/ejabberd@localhost/vcard.DAT" not properly closed, repairing ...
23:30:16.554 [info] Loading modules for trx.vsudo.co
23:30:16.577 [warning] Mnesia backend for mod_mam is not recommended: it's limited to 2GB and often gets corrupted when reaching this limit. SQL backend is recommended. Namely, for small servers SQLite is a preferred choice because it's very easy to configure.
23:30:16.770 [info] Building MQTT cache for trx.vsudo.co, this may take a while
23:30:16.783 [error] Failed to open socket at 207.46.235.99:7777 for mod_proxy65_stream: can't assign requested address
23:30:16.783 [critical] Failed to start module mod_proxy65: 
{error,
    {eaddrnotavail,
        {child,undefined,
            {7777,{207,46,235,99},tcp},
            {ejabberd_listener,start,
                [{7777,{207,46,235,99},tcp},
                 mod_proxy65_stream,
                 #{accept_interval => 0,access => local,
                   auth_type => anonymous,backlog => 5, 
                   host => <<"proxy.trx.vsudo.co">>,hostname => undefined,
                   hosts => [],
                   ip => {207,46,235,99},
                   max_connections => 5,name => <<"SOCKS5 Bytestreams">>,
                   port => 7777,ram_db_type => mnesia,recbuf => 65536,
                   server_host => <<"trx.vsudo.co">>,shaper => none,
                   sndbuf => 65536,supervisor => true,transport => tcp,
                   use_proxy_protocol => false,vcard => undefined}]},
            transient,brutal_kill,worker,
            [ejabberd_listener]}}}
23:30:16.783 [critical] ejabberd initialization was aborted because a module start failed.

Why this error occur? Even, I installed on different host. It was work well without issues.

mremond commented 4 years ago

It seems that you have already a software listening to port 7777 (maybe another instance of ejabberd ?): eaddrnotavail.

prefiks commented 4 years ago

This is actually related to ip specified in that listener, that ip address 207.46.235.99 is not avaliable on that machine, so ejabberd can't create listener using it, and startup fails