ejabberd - Comments for "Move ejabberd server to another with same hostname?" https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname en Anyone? https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67170 <p>Anyone?</p> Tue, 01 Nov 2016 19:27:38 +0000 justaguy comment 67170 at https://www.ejabberd.im Already scrammed, and same https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67168 <p>Already scrammed, and same version.</p> Fri, 28 Oct 2016 17:46:00 +0000 justaguy comment 67168 at https://www.ejabberd.im That config looks good, I https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67163 <p>That config looks good, I copy it to my ejabberd 16.09, and can login with Tkabber and Gajim (both on Linux).</p> <p>Looking at your first post, you have an old server that runs perfectly, and the login problem appears when you install a new ejabberd and copy the old database, right?</p> <p>In the old server, passwords were already scrammed, or were still in plaintext? Do you use the same ejabberd version (this shouldn't matter, but who knows)? I mean, what are the differences between good old and new problematic server?</p> Fri, 28 Oct 2016 15:09:56 +0000 badlop comment 67163 at https://www.ejabberd.im listen: - port: 5222 https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67162 <pre> listen: - port: 5222 ip: "::" module: ejabberd_c2s ## ## If TLS is compiled in and you installed a SSL ## certificate, specify the full path to the ## file and uncomment these lines: ## certfile: "/etc/ejabberd/ejabberdcert.pem" (own cert that looks like private key + cert) starttls: true </pre><p> and later down in the file is</p> <p>auth_password_format: scram</p> Thu, 27 Oct 2016 21:39:00 +0000 justaguy comment 67162 at https://www.ejabberd.im Umm, Gajim 0.16.5 in Debian https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67160 <p>Umm, Gajim 0.16.5 in Debian logins correctly to a server with scrammed passwords. In fact Gajim has no option to configure that, so surely you have the client side correctly configured.</p> <p>Do you have starttls enabled in the listener, and scram enabled? Something like this:</p> <pre> listen: - port: 5222 module: ejabberd_c2s certfile: "/etc/ejabberd/ssl.pem" starttls: true ... auth_password_format: scram </pre><p> Regarding account registration, enable mod_register in your configuration, and check that the 'register' Access rule allows registrarion.</p> Thu, 27 Oct 2016 15:21:22 +0000 badlop comment 67160 at https://www.ejabberd.im Gajim and Pidgin (windows) https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67155 <p>Gajim and Pidgin (windows) both fail password still,<br /> and if i try to register a new account (as suggested)</p> <p>ejabberdctl register user domain.domain password<br /> Can't register user user@domain.domain at node ejabberd@server: not_allowed</p> <p>Thanks for all the help so far.</p> Tue, 25 Oct 2016 17:49:06 +0000 justaguy comment 67155 at https://www.ejabberd.im Ah, that's possible, I forgot https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67147 <p>Ah, that's possible, I forgot it.</p> <p>This happens because ejabberd got configured to store passwords scrammed, instead of plaintext, for security reasons:</p> <pre> auth_password_format: scram </pre><p> Now, if a client tries to authenticate using an old method (called legacy), ejabberd cannot use the SCRAM method to verify it, so it gets rejected even if the user provided the correct password:</p> <pre> 12:32:50.707 [info] (#Port&lt;0.23075&gt;) Accepted connection 127.0.0.1:34575 -&gt; 127.0.0.1:5222 12:32:51.905 [info] ({socket_state,gen_tcp,#Port&lt;0.23075&gt;,&lt;0.672.0&gt;}) Failed legacy authentication for user1@localhost/tka1 from 127.0.0.1 </pre><p> From now on, the clients must use the XMPP prefered auth method: SASL. Most clients support it, like Tkabber, Psi, Gajim... Almost all recent XMPP/Jabber clients should support it, and is enabled by default.</p> <p>In your case, check what clients are having problems to login.<br /> Try with a desktop good client, like Psi or Gajim.<br /> Also, try to create a new account now, and login to it.</p> Mon, 24 Oct 2016 10:38:52 +0000 badlop comment 67147 at https://www.ejabberd.im {passwd,{<<"user1">>,<<"domai https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67146 <p>{passwd,{&lt;&lt;"user1"&gt;&gt;,&lt;&lt;"domain.com"&gt;&gt;},<br /> {scram,&lt;&lt;"hash"&gt;&gt;,<br /> &lt;&lt;"hash"&gt;&gt;,<br /> &lt;&lt;"hash"&gt;&gt;,4096}}.</p> <p>All my users are there.<br /> I'm really confused :(</p> Fri, 21 Oct 2016 23:38:41 +0000 justaguy comment 67146 at https://www.ejabberd.im If you used mnesia/internal https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67142 <p>If you used mnesia/internal auth_method, then the account credentials were stored in the 'passwd' mnesia table. So, in your text dump file you should have something like:</p> <pre> {passwd,{&lt;&lt;"user1"&gt;&gt;,&lt;&lt;"localhost"&gt;&gt;},&lt;&lt;"mypass11"&gt;&gt;}. {passwd,{&lt;&lt;"user2"&gt;&gt;,&lt;&lt;"localhost"&gt;&gt;},&lt;&lt;"mypass2222"&gt;&gt;}. </pre><p> That means user1@localhost can login to the server providing the password mypass11.</p> Fri, 21 Oct 2016 09:26:57 +0000 badlop comment 67142 at https://www.ejabberd.im The text file has everything https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67139 <p>The text file has everything in it, but if i try to find "account" or something like that, no results.</p> <p>But, there is a roster with the user's contacts.</p> <p>There is this too</p> <p>{pubsub_item,{&lt;&lt;"XXXXXXXXX"&gt;&gt;,X},<br /> {{xxx,xxx,xxxx},{&lt;&lt;"user"&gt;&gt;,&lt;&lt;"domain"&gt;&gt;,&lt;&lt;&gt;&gt;}},<br /> {{xxxx,xxxxxx,xxxxx},<br /> {&lt;&lt;"user"&gt;&gt;,&lt;&lt;"domain"&gt;&gt;,<br /> &lt;&lt;"lookslikeahash?"&gt;&gt;}},<br /> [{xmlel,&lt;&lt;"tune"&gt;&gt;,<br /> [{&lt;&lt;"xmlns"&gt;&gt;,&lt;&lt;"http://jabber.org/protocol/tune"&gt;&gt;}],<br /> []}]}.</p> Thu, 20 Oct 2016 22:17:25 +0000 justaguy comment 67139 at https://www.ejabberd.im So backup+restore doesn't https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67137 <p>So backup+restore doesn't show error messages, but _apparently_ accounts aren't there. In that new server with restored database that doesn't show any account: try to dump that database to a text file with "ejabberdctl dump ...". Is there any data there, or is the database really empty of your old data?</p> <p>By the way, if you have few users (just a few hundreds), you can try in the old server to dump, and in the new server load.</p> <p>In fact, if you use the same erlang node name in both old and new ejabberd deployments, you can simply copy the old mnesia spool dir (with all its files) to the new location, then start new server.</p> Thu, 20 Oct 2016 19:07:03 +0000 badlop comment 67137 at https://www.ejabberd.im Doesn't seem to be https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67134 <p>Doesn't seem to be so.<br /> ejabberdctl registered_users (domain.domain)<br /> output is just blank</p> <p>i just did ejabberdctl restore /tmp/restorefile<br /> again from the backup (i did this first)</p> <p>** Table caps_features already exists on ejabberd@server1, just entering data<br /> ** Table privacy already exists on ejabberd@server1, just entering data<br /> ** Table passwd already exists on ejabberd@server1, just entering data<br /> ** Table irc_custom already exists on ejabberd@server1, just entering data<br /> ** Table roster already exists on ejabberd@server1, just entering data<br /> ** Table last_activity already exists on ejabberd@server1, just entering data<br /> ** Table sr_user already exists on ejabberd@server1, just entering data<br /> ** Table roster_version already exists on ejabberd@server1, just entering data<br /> ** Table offline_msg already exists on ejabberd@server1, just entering data<br /> ** Table motd already exists on ejabberd@server1, just entering data<br /> ** Table vcard already exists on ejabberd@server1, just entering data<br /> ** Table pubsub_index already exists on ejabberd@server1, just entering data<br /> ** Table sr_group already exists on ejabberd@server1, just entering data<br /> ** Table vcard_search already exists on ejabberd@server1, just entering data<br /> ** Table motd_users already exists on ejabberd@server1, just entering data<br /> ** Table private_storage already exists on ejabberd@server1, just entering data<br /> ** Table oauth_token already exists on ejabberd@server1, just entering data<br /> ** Table pubsub_item already exists on ejabberd@server1, just entering data<br /> ** Table muc_room already exists on ejabberd@server1, just entering data<br /> ** Table pubsub_state already exists on ejabberd@server1, just entering data<br /> ** Table muc_registered already exists on ejabberd@server1, just entering data<br /> ** Table pubsub_node already exists on ejabberd@server1, just entering data</p> <p>it says everything is there?</p> <p>on my old server<br /> if i run ejabberdctl registered_users domain.domain it outputs my users list.</p> Wed, 19 Oct 2016 22:12:58 +0000 justaguy comment 67134 at https://www.ejabberd.im Are the accounts correctly https://www.ejabberd.im/forum/28572/move-ejabberd-server-another-same-hostname#comment-67133 <p>Are the accounts correctly recovered? Are you able to login to the webadmin? Or if you use ejabberdctl to get the list of accounts, are they there?</p> Wed, 19 Oct 2016 10:12:11 +0000 badlop comment 67133 at https://www.ejabberd.im