ejabberd - Comments for "Help with upgrading ejabberd and changing the domain name." https://www.ejabberd.im/node/24941 en That worked like a charm. ( https://www.ejabberd.im/node/24941#comment-65745 <p>That worked like a charm. ( although could not figure out where the ejabberdctl utility was. the one at /opt/ejabberd-2.1.4/bin/ejabberdctl kept complaining about dump being not an option. thankfully web admin access was there. )</p> <p>While restoring, it gave a total of 5 error messages. </p> <blockquote><p>Error in line:246753 of:"ejabberd-domainname.dump" syntax error before: '.'<br /> Can't load dump in "/opt/ejabberd-15.04/database/ejabberd@localhost/ejabberd-domainname.dump" at node ejabberd@localhost: read</p> <p>Error in line:246919 of:"ejabberd-domainname.dump" syntax error before: '}'<br /> Can't load dump in "/opt/ejabberd-15.04/database/ejabberd@localhost/ejabberd-domainname.dump" at node ejabberd@localhost: read</p> <p>Error in line:630800 of:"ejabberd-domainname.dump" syntax error before: stores<br /> Can't load dump in "/opt/ejabberd-15.04/database/ejabberd@localhost/ejabberd-domainname.dump" at node ejabberd@localhost: read</p> <p>Error in line:704139 of:"ejabberd-domainname.dump" syntax error before: '}'<br /> Can't load dump in "/opt/ejabberd-15.04/database/ejabberd@localhost/ejabberd-domainname.dump" at node ejabberd@localhost: read</p> <p>Problem 'error {case_clause,<br /> {aborted,<br /> {bad_type,<br /> {roster,<br /> {"user-name1","im.domainname.com",<br /> {"user-name2","im.domainname.com",[]}},<br /> {"user-name1","im.domainname",<br /> {"user-name3","im.domainname.com",[]}},<br /> {"user-name4","im.domainname.com"},<br /> {"user-name5","im.domainname.com",[]},<br /> "User Name",both,none,<br /> ["Group Name 1"],<br /> [],[]}}}}' occurred executing the command.<br /> Stacktrace: [{ejabberd_admin,load_mnesia,1,<br /> [{file,"src/ejabberd_admin.erl"},{line,566}]},<br /> {ejabberd_commands,execute_command2,2,<br /> [{file,"src/ejabberd_commands.erl"},<br /> {line,320}]},<br /> {ejabberd_ctl,call_command,3,<br /> [{file,"src/ejabberd_ctl.erl"},{line,293}]},<br /> {ejabberd_ctl,try_call_command,3,<br /> [{file,"src/ejabberd_ctl.erl"},{line,269}]},<br /> {ejabberd_ctl,process2,3,<br /> [{file,"src/ejabberd_ctl.erl"},{line,218}]},<br /> {ejabberd_ctl,process,1,<br /> [{file,"src/ejabberd_ctl.erl"},{line,203}]},<br /> {rpc,'-handle_call_call/6-fun-0-',5,<br /> [{file,"rpc.erl"},{line,205}]}]</p> <p>Problem 'error {case_clause,<br /> {aborted,<br /> {bad_type,<br /> {roster,<br /> {"user-name7","im.domainnamedomainname.com",[]},<br /> "User Name 8",none,none,<br /> ["Group Name 2"],<br /> [{"xmlns","jabber:iq:roster"}],<br /> []}}}}' occurred executing the command.<br /> Stacktrace: [{ejabberd_admin,load_mnesia,1,<br /> [{file,"src/ejabberd_admin.erl"},{line,566}]},<br /> {ejabberd_commands,execute_command2,2,<br /> [{file,"src/ejabberd_commands.erl"},<br /> {line,320}]},<br /> {ejabberd_ctl,call_command,3,<br /> [{file,"src/ejabberd_ctl.erl"},{line,293}]},<br /> {ejabberd_ctl,try_call_command,3,<br /> [{file,"src/ejabberd_ctl.erl"},{line,269}]},<br /> {ejabberd_ctl,process2,3,<br /> [{file,"src/ejabberd_ctl.erl"},{line,218}]},<br /> {ejabberd_ctl,process,1,<br /> [{file,"src/ejabberd_ctl.erl"},{line,203}]},<br /> {rpc,'-handle_call_call/6-fun-0-',5,<br /> [{file,"rpc.erl"},{line,205}]}] </p></blockquote> <p>All of them came one by one, one block after the other. I am not sure why those file format error messages came in. But I can happily live with that. I simply removed the respective line which had this formatting problem. And all good. Restarted the service and all good..</p> <p>The only problem now that see is I am not able to transfer file. I have enabled mod_proxy65 module( mod_proxy65: [] , the online document said default value is just fine so i went with default value only), but it doesn't seem to work. I will continue with my troubleshooting. </p> <p>Thanks a ton badlop</p> Fri, 05 Jun 2015 13:48:48 +0000 abhinav784 comment 65745 at https://www.ejabberd.im abhinav784 wrote: One of the https://www.ejabberd.im/node/24941#comment-65742 <div class="quote-msg"> <div class="quote-author"><em>abhinav784</em> wrote:</div> <p>One of the requirements was to move from old domain name to new domain name. So, lets say, I wanted to move from im.example1.com to im.example2.com</p> <p>My first question is about the 2nd part. Can we change the domain name? I googled and got to the link<br /> - <noindex><a href="https://www.process-one.net/docs/ejabberd/guide_en.html#htoc82" title="https://www.process-one.net/docs/ejabberd/guide_en.html#htoc82" rel="nofollow" >https://www.process-one.net/docs/ejabberd/guide_en.html#htoc82</a></noindex></p> <p>Is it what is suppose to be done? ( I don't know much about ejabberd server but I am not sure about that ) </p></div> <p>No, they are different things:<br /> - You want to change the Jabber/XMPP domain<br /> - The guide section you mentioned is about Erlang computer hostname, and it is only necessary in some cases, if Mnesia cannot read your old database. Apparently you don't have problems reading your old Mnesia database, so don't worry about that.</p> <div class="quote-msg"> <div class="quote-author"><em>abhinav784</em> wrote:</div> <p>When I started using "/opt/ejabberd-15.04/bin/ejabberdctl start" command, it gave me a lot of error messages in the log files. The error looks like this.</p> <p>from crash.log<br /> 2015-06-03 16:34:27 =ERROR REPORT====<br /> Mnesia(ejabberd@localhost): ** WARNING ** Mnesia is overloaded: {dump_log,write_threshold}</p> <p>from error.log<br /> 2015-06-03 16:34:27.079 [error] &lt;0.146.0&gt; Mnesia(ejabberd@localhost): ** WARNING ** Mnesia is overloaded: {dump_log,write_threshold}</p> <p>from ejabberd.log<br /> 2015-06-03 16:34:25.278 [info] &lt;0.7.0&gt; Application inets started on node ejabberd@localhost<br /> 2015-06-03 16:34:25.309 [info] &lt;0.38.0&gt;@ejabberd_config:convert_table_to_binary:971 Converting 'roster' table from strings to binaries.<br /> 2015-06-03 16:34:27.079 [error] &lt;0.146.0&gt; Mnesia(ejabberd@localhost): ** WARNING ** Mnesia is overloaded: {dump_log,write_threshold}</p> <p>My next question is, are these messages ok? </p></div> <p>Those are only warnings saying that it writes stuff slow on disk, which is normal because ejabberd is doing heavy operations. You should worry only if ejabberd did this all the time during normal daily use. So, don't worry now.</p> <div class="quote-msg"> <div class="quote-author"><em>abhinav784</em> wrote:</div> <p>I am able to connect to the new ejabberd with my old user name and password ( obviously, as they are getting fetched from ldap server and i took ldap dump and restored it on the new machine ). I can see my contact list as they were.</p> <p>Can you guys give me some pointers on how to go about this entire upgrade / migration? </p></div> <p>Apparently you are on the good path. The only remaining change is to change XMPP domain from im.example1.com to im.example2.com</p> <p>You can change ejabberd configuration easily in ejabberd.yml, then restart ejabberd. Probably, this isn't enough because some information in the Mnesia database still use the old domain. For example, rosters, offline messages, private table...</p> <p>If you used MySQL, then you would know what to do: run some queries to update some fields in some tables.</p> <p>As you use Mnesia, I'll tell you a easy (but time consuming) process:<br /> 1. Dump the mnesia database to text file. Use WebAdmin or "ejabberdctl dump /tmp/domain1.txt"<br /> 2. Edit that text file, and replace old domain with new domain<br /> 3. Stop ejabberd<br /> 4. Move away the old Mnesia database files<br /> 5. Start ejabberd, it will create empty mnesia database<br /> 6. Load your modified mnesia text file with "ejabberdctl load /tmp/domain2.txt</p> Thu, 04 Jun 2015 14:13:16 +0000 badlop comment 65742 at https://www.ejabberd.im