0

I'm really new to XMPP and I decided to go with ejabberd. Firstly I tried to configure it on ubuntu, but I got error after error and I just switched to windows. The server is running now.

I've installed XAMPP and I tested the connection with strophe.js.

I've read some of the documentation on ejabberd and watched the tutorial videos and that guy talks about stateless configuration( use ejabberd only of messages and have my own database in which I save messages,users etc). I want to achieve that, but I don't really know where to start. I assume that I would have to post the message to my database for storing and also to the ejabberd for pushing.

Any ideas/examples/tutorials?

Edit:

2016-05-22 20:28:32.746 [error] <0.532.0>@ejabberd_sql:check_error:991 SQL query 'Q9525209' at {sql_queries,145} failed: <<"Unknown Host">>
2016-05-22 20:28:32.746 [error] <0.532.0>@ejabberd_sql:check_error:991 SQL query 'Q9525209' at {sql_queries,145} failed: <<"Unknown Host">>
2016-05-22 20:28:32.746 [error] <0.532.0>@ejabberd_auth:is_user_exists:316 The authentication module ejabberd_auth_sql returned an error
when checking user <<"admin">> in server <<"localhost">>
Error message: <<"Unknown Host">>

Configuration:

##
## MySQL server:
##
odbc_type: mysql
odbc_server: "127.0.0.1"
odbc_database: "ej_chatapp"
odbc_username: "root"
odbc_password: "password"
##
## If you want to specify the port:
odbc_port: 3306

auth_method: odbc
Bogdan Daniel
  • 2,689
  • 11
  • 43
  • 76

1 Answers1

0

In my videos, Stateless configuration is mentioned in the context of ejabberd SaaS: https://ejabberd-saas.com

ejabberd SaaS provide API that can be used to point to your own backend. Those API are not available in ejabberd, only available in SaaS to ease integration with customer backends.

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
  • Thank you. I thought that they were sort of similar. Ejabberd for testing and when you are ready to just upgrade it to ejabberd SaaS. So I guess that in order to implement new tables I have to change from mnesia to a mysql and then implement new functions? – Bogdan Daniel May 20 '16 at 08:23
  • If you do not want to use Mnesia, but want to use another database, you need to change the configuration accordingly. This is documented in ejabberd doc: https://docs.ejabberd.im/admin/guide/configuration/#database-and-ldap-configuration – Mickaël Rémond May 23 '16 at 07:01
  • Thank you. I've changed it to mysql, I manually created the tables, but I get the error from the edit. Any ideas? – Bogdan Daniel May 23 '16 at 07:21
  • Your configuration is likely wrong, but you did not post it. – Mickaël Rémond May 23 '16 at 07:28
  • I updated it now. After I connect how do I create the admin user?The users table is empty and the admin is not there any more. I'm on windows. – Bogdan Daniel May 23 '16 at 07:32
  • admin user creation is well documented. See step 1 in post install operations: https://docs.ejabberd.im/admin/guide/installation/#post-install-operations – Mickaël Rémond May 23 '16 at 09:06
  • Well you show only a part of it, but I think "Unknown host" means you do not have correct host defined in your configuration for the user you are trying to authenticate. So, I still think your configuration is wrong. – Mickaël Rémond May 23 '16 at 09:11
  • You need Bash to use ejabberdctl on Windows. ejabberd is made to be use on any Unix flavor. On Windows, you will always be pretty limited to what binary installer allows. Typically Windows deploy is for small instances using Mnesia. – Mickaël Rémond May 23 '16 at 09:11
  • Thank you for all of your answers. The first time I've tried to use it on linux, but I got error after error when I was trying to start the server and that's why I got it on windows. I guess I'll have to solve it on linux as it's better. – Bogdan Daniel May 23 '16 at 09:15