ejabberd - Comments for "Need help upgrading from old apt-get version in Ubuntu 16.04 LTS" https://www.ejabberd.im/forum/28817/need-help-upgrading-old-apt-get-version-ubuntu-1604-lts en I didn't know what to do, so https://www.ejabberd.im/forum/28817/need-help-upgrading-old-apt-get-version-ubuntu-1604-lts#comment-67505 <p>I didn't know what to do, so I ran the uninstall for ejabberd 17.04 and then deleted the database and conf files.</p> <p>I ran the install for ejabberd 17.04 again and checked that it was running in the default configuration.</p> <p>I then went through all the ejabberd.yml changes and testing them one at a time to make sure the service would still start (modify, save, ejabberdctl restart, repeat...).</p> <p>Then I stopped ejabberd and made a backup of the database directory.<br /> I deleted all the files in database/ejabberd@localhost and copied the database files from my initial installation.</p> <p>It started this time and users were able to login successfully.</p> <p>I'm not sure why it failed before.</p> <p>However, now the ejabberd admin page (localhost:5280/admin/) won't load anymore...</p> <p>In lieu of that, I tried to setup ejabberd to run as a service but that won't work either...</p> <p>I copied over the ejabberd.init to /etc/init.d/ejabberd<br /> I created the ejabberd system user<br /> I gave it write access to database and logs (didn't work so I gave it rwx to everything in the ejabberd-17.04 folder)</p> <div class="codeblock"><code>sudo /etc/init.d/ejabberd start<br />Starting ejabberd...<br />This command can only be run by root or the user ubuntu</code></div> <p>I just ran it as root using sudo... I tried sudo -i first and really ran it as "root", but it said the same thing.</p> <p>fyi, ubuntu is the name of the main user account on the VM which was used to install ejabberd</p> <p>USER=ejabberd in the script, so I don't know why it's asking for the user ubuntu and I don't know why it won't start for root either.</p> <p>So I can't administer ejabberd and it won't run when the VM starts up, but it's got 17.04 installed now... I don't know that I can call that a success...</p> Mon, 05 Jun 2017 17:51:03 +0000 MakoSDV comment 67505 at https://www.ejabberd.im What a troubled installation, https://www.ejabberd.im/forum/28817/need-help-upgrading-old-apt-get-version-ubuntu-1604-lts#comment-67503 <p>What a troubled installation, I had bet that a least one way would have worked!</p> <p>Regardless of what method you try, ensure no other ejabberd is running (kill any process called beam, or epmd), and check also a previous version isn't installed (it seems you already take care of this). You can try to install one of those versions in another machine (in your desktop, or development machine) just to see how it should work.</p> Mon, 05 Jun 2017 14:39:29 +0000 badlop comment 67503 at https://www.ejabberd.im Thanks. 1. OK 2. OK 3. Using https://www.ejabberd.im/forum/28817/need-help-upgrading-old-apt-get-version-ubuntu-1604-lts#comment-67502 <p>Thanks.</p> <p>1. OK<br /> 2. OK<br /> 3. Using repositories from jabber.at<br /> sudo apt-get install ejabberd</p> <p>Fails:</p> <div class="codeblock"><code>Job for ejabberd.service failed because the control process exited with error code. See &quot;systemctl status ejabberd.service&quot; and &quot;journalctl -xe&quot; for details.<br />invoke-rc.d: initscript ejabberd, action &quot;restart&quot; failed.<br />? ejabberd.service - A distributed, fault-tolerant Jabber/XMPP server<br />&nbsp;&nbsp; Loaded: loaded (/lib/systemd/system/ejabberd.service; enabled; vendor preset: enabled)<br />&nbsp;&nbsp; Active: activating (auto-restart) (Result: exit-code) since Fri 2017-06-02 18:05:31 UTC; 6ms ago<br />&nbsp; Process: 3017 ExecStart=/bin/sh -c /usr/sbin/ejabberdctl start &amp;&amp; /usr/sbin/ejabberdctl started (code=exited, status=1/FAILURE)<br /> Main PID: 1244 (code=killed, signal=TERM) <p>Jun 02 18:05:31 xmpp1 systemd[1]: ejabberd.service: Control process exited,...=1<br />Jun 02 18:05:31 xmpp1 systemd[1]: Failed to start A distributed, fault-tole...r.<br />Jun 02 18:05:31 xmpp1 systemd[1]: ejabberd.service: Unit entered failed state.<br />Jun 02 18:05:31 xmpp1 systemd[1]: ejabberd.service: Failed with result &#039;exi...&#039;.<br />Hint: Some lines were ellipsized, use -l to show in full.<br />dpkg: error processing package ejabberd (--configure):<br /> subprocess installed post-installation script returned error exit status 1<br />E: Sub-process /usr/bin/dpkg returned an error code (1)</p></code></div> <p>Crash dump shows:</p> <div class="codeblock"><code>=erl_crash_dump:0.3<br />Fri Jun&nbsp; 2 18:05:29 2017<br />Slogan: init terminating in do_boot ()<br />System version: Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]</code></div> <p>So I ran: apt-get remove ejabberd</p> <p>3. Trying again using .deb file from downloads page (<noindex><a href="https://www.process-one.net/ejabberd/downloads/" title="https://www.process-one.net/ejabberd/downloads/" rel="nofollow" >https://www.process-one.net/ejabberd/downloads/</a></noindex>)<br /> sudo gdebi ejabberd_17.04-0_amd64.deb</p> <p>Fails:</p> <div class="codeblock"><code>Reading package lists... Done<br />Building dependency tree<br />Reading state information... Done<br />Reading state information... Done<br />This package is uninstallable<br />Breaks existing package &#039;erlang-p1-iconv&#039; conflict: ejabberd (&lt; 1:16.02)</code></div> <p>3. Trying again using .run file from downloads page (<noindex><a href="https://www.process-one.net/ejabberd/downloads/" title="https://www.process-one.net/ejabberd/downloads/" rel="nofollow" >https://www.process-one.net/ejabberd/downloads/</a></noindex>)<br /> OK</p> <p>4. OK<br /> 5. OK<br /> 6. OK, I think...<br /> 7. won't start when using shortcut on desktop<br /> error.html page loads<br /> 8. Nothing was written to the logs</p> <p>Trying to use bin/start script from a terminal instead just keeps repeating the error:<br /> <code>bash: /home/ubuntu/ejabberd-17.04/lib/linux-x86_64/libtinfo.so.5: no version information available (required by bash)</code></p> <p>I set loglevel: 5 and tried the shortcut again. I got a crash dump this time:</p> <div class="codeblock"><code>=erl_crash_dump:0.3<br />Fri Jun&nbsp; 2 19:43:57 2017<br />Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{&#039;EXIT&#039;,nodistribution}}}}},{k<br />System version: Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]</code></div> <p>I don't know where the problem is, so I don't really know what to do now... Any insight would be extremely helpful.</p> <p>Thanks.</p> Fri, 02 Jun 2017 20:03:27 +0000 MakoSDV comment 67502 at https://www.ejabberd.im Whatever ejabberd version you https://www.ejabberd.im/forum/28817/need-help-upgrading-old-apt-get-version-ubuntu-1604-lts#comment-67501 <p>Whatever ejabberd version you have, or how you installed, it can be upgraded by:<br /> 1. Copy your config files, and the mnesia spool dir.<br /> 2. Uninstall the old deployment<br /> 3. Install the new version, whatever new way it has<br /> 4. Check it starts correctly with default configuration and empty database<br /> 5. Stop ejabberd<br /> 6. Copy the configuration files and mnesia spool dir from old installation<br /> 7. Try to start ejabberd again.<br /> 8. Check the log files for warnings or errors</p> Fri, 02 Jun 2017 15:13:30 +0000 badlop comment 67501 at https://www.ejabberd.im I'm not saying the installers https://www.ejabberd.im/forum/28817/need-help-upgrading-old-apt-get-version-ubuntu-1604-lts#comment-67499 <p>I'm not saying the installers don't work; I'm saying that I couldn't get ejabberd to work after using them. I was able to get the apt-get installed version working by looking at instructions provided by people online, but did not have success with the binary installed version.</p> <p>Anyway, can the apt-get installed version be upgraded using the binary installer? If so, what is the correct process? For example, apt-get remove, run binary installer, and then "migrate" settings from apt-get installation to binary installation? Or create a new clean vm and run binary installer, then "migrate" settings from apt-get installed VM to binary installed VM? Or ???</p> <p>Thanks.</p> Thu, 01 Jun 2017 16:49:27 +0000 MakoSDV comment 67499 at https://www.ejabberd.im > I tried using the binary https://www.ejabberd.im/forum/28817/need-help-upgrading-old-apt-get-version-ubuntu-1604-lts#comment-67497 <p>&gt; I tried using the binary installer originally but could never get it to work</p> <p>Those installers include most of the requirements, and Ubuntu 16 is recent enough, how can be it didn't work?</p> Thu, 01 Jun 2017 07:42:54 +0000 badlop comment 67497 at https://www.ejabberd.im