I am trying to install ejabberd on a EC2 AWS Linux 2 machine running on a public subnet. I did the following:
- Assigned the EC2 instance an Elastic IP (52.22.184.194)
- Assign this domain to the the EIP - ejabberddev.strax.co
- Changed the hostname of the machine to ejabberddev.strax.co
- ejabberd is installed.
I get the error:
20:55:32.313 [error] Failed to open socket at 52.22.184.194:7777 for mod_proxy65_stream: can't assign requested address
ejabberd is trying to open a socket using the AWS elastic IP address - this will not work.
I went into the ejabberd.yml file and added the ip variable to get ejabberd to use the AWS private ip for the macine.
mod_proxy: ip: 10.1.254.240 access: local max_connections: 5
This fix and issue the ejabberd was able to come up.
For some reason the user I entered at install time admin and the domain ejabberddev.strax.co was not in the database so I entered it using this command.
ejabberdctl register admin ejabberddev.strax.co admin
This seemed to work so I tried to login into the web using these credentials and the URL containing the domain http://ejabberddev.strax.co:5280/admin
When I logged in the following error happened:
20:39:13.147 [error] CRASH REPORT Process <0.541.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 20:39:13.147 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.541.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated 20:39:13.252 [info] (none) Accepted connection [::ffff:18.232.45.141]:54109 -> [::ffff:10.1.254.240]:5280 20:39:13.252 [error] CRASH REPORT Process <0.542.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 20:39:13.252 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.542.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated 20:39:13.459 [info] (<0.543.0>) Accepted connection [::ffff:18.232.45.141]:54110 -> [::ffff:10.1.254.240]:5280 20:39:13.459 [error] CRASH REPORT Process <0.543.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 20:39:13.460 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.543.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated 20:39:18.582 [info] (none) Accepted connection [::ffff:18.232.45.141]:54113 -> [::ffff:10.1.254.240]:5280 20:39:18.582 [error] CRASH REPORT Process <0.544.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 20:39:18.582 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.544.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated 20:39:48.712 [info] (none) Accepted connection [::ffff:18.232.45.141]:54122 -> [::ffff:10.1.254.240]:5280 20:39:48.713 [error] CRASH REPORT Process <0.545.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 20:39:48.713 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.545.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated 20:40:48.899 [info] (<0.547.0>) Accepted connection [::ffff:18.232.45.141]:54143 -> [::ffff:10.1.254.240]:5280 20:40:48.900 [error] CRASH REPORT Process <0.547.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 20:40:48.900 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.547.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated 20:45:49.083 [info] (none) Accepted connection [::ffff:18.232.45.141]:54241 -> [::ffff:10.1.254.240]:5280 20:45:49.083 [error] CRASH REPORT Process <0.556.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 20:45:49.083 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.556.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
Not sure what is error means. Based on the fact I cannot even install the ejabberd package and login in I think something is going wrong regarding the use of AWS elastic IPs. I have not found any document about installing ejabberd on AWS - any help will be appreciated.
Tim McClure