ejabberd

Ejabber Configuration on Amazon for Chat application

倾然丶 夕夏残阳落幕 提交于 2019-12-06 17:14:40
问题 Ubuntu Ejabber Amazon (AWS) Created t2 instance in AWS (Amazon) for congiguring Ejabberd Server . Created custom http and passed 5280 (Ejabber port) in place of 80 and through Ubuntu i tried to install Ejabber and register Admin as user . User registered succesfully. I used Ejabberdctl command to check Ejabberd status and it showing it running and in the message it showing a private IP which is linked with my AWS ip . But when same thing like : 36.159.103.47/admin/5280 hit on URL then it

How to join multiple rooms by just sending one <presence> message to ejabberd server

让人想犯罪 __ 提交于 2019-12-06 12:27:09
问题 For example, I have 20 rooms to join. The simple solution is to send 20 message to each room id. Considering the performance, this is bad. I want to join the 20 rooms by just sending one <presence> message, how to achieve this? Writing a module to hook the custom <presence> message? But I do not know how to write this kind of module. 回答1: In XEP-0045 Multi User Chat, there is no way defined to join 20 chat rooms with a single presence packet. However, by combining other XMPP Extension with

Ejabberd user registration command fails with {error,access_rules_unauthorized}

白昼怎懂夜的黑 提交于 2019-12-06 11:30:07
I've been trying to set up an XMPP server using ejabberd on windows. every time I try to register a user in ejabberd with this command: ejabberdctl register admin localhost admin it gives me this error: {error,access_rules_unauthorized} I've installed the ejabberd using its binary installer and according to "install.log" file, the installer also fails to create a user due to the same error. Part of the log file: E:\Program Files\ejabberd-16.08\bin>bash ejabberdctl register "admin" "localhost" "admin" {error,access_rules_unauthorized} ejabberd.yml config file: access_rules: register: - allow I

Intercept login/logout ejabberd

混江龙づ霸主 提交于 2019-12-06 09:06:14
问题 I want to know when a user is logged in and logged out from an ejabberd session in a custom module, without changing the ejabberd code. I need that because I have to execute some actions when a user logs in and clean up the actions I did when the user logs out. Also, I need to be able to logoff a user given some circumstances. So, is there a way to extend some module to get those feature? I'm still looking for some documentation that could help me with that. 回答1: You can write your own code

extending ejabberd with modules for custom mysql schema?

…衆ロ難τιáo~ 提交于 2019-12-06 07:52:55
Instead of ejabberd.sql ,I am using a custom MySQL schema(because of legacy reasons). I will be doing some DB operations on certain activities like Ping,Pong,Msg deliverd,Msg read and most importantly getting/setting roster list and announcing presence(all of these on my own schema). However,ejabberd seems to use ejabberd.sql all throughout and its source code is pretty much dependent on it.Fiddling with the source code is the last thing I would do since I am not aware of its dependencies. Possible ideas : Lets say if I extend ejabberd by writing my own modules,then what use will mod_roster

使用Spark、pandion客户端测试ejabberd服务器

耗尽温柔 提交于 2019-12-06 06:46:37
测试admin用户和summergao用户相互发送消息: 1.下载 pandion 客户端 https://en.softonic.com/download/pandion/windows/post-download 2.下载 spark 客户端 http://www.igniterealtime.org/downloads/download-landing.jsp?file=spark/spark_2_8_3.exe 3.修改配置文件 vim /usr/local/etc/ejabberd/ejabberd.yml 配置5222端口如下: - port: 5222 ip: "127.0.0.1" module: ejabberd_c2s max_stanza_size: 262144 shaper: c2s_shaper access: c2s starttls_required: false 因为是本地测试,设置 ip: "127.0.0.1",starttls_required: false 4.重启使新配置生效 ejabberdctl restart 5.运行Spark客户端连接ejabberd服务器 使用admin用户登录,连接设置如右图: 连接成功: 6.使用Pandion客户端连接ejabberd服务器 使用summergao用户登录,连接设置如下图所示

Ejabberd Clustering understanding

流过昼夜 提交于 2019-12-06 06:22:41
Let assume I have two ejabberd server consider X and Y which has the same source and i did ejabberd clustering for those server by using this . Now consider A and B are user and those are connected in X server . Both A and B are in ONLINE state and those are connected via X server . If suppose X server is get shutdown or crashed by some issue. In this sceneraio whether the A and B are get OFFLINE state or A and B are in ONLINE state which is handle by Y server. I don't know whether my thought is right or not. If any one give me the suggestion about it. If you have nodes in different physical

How to stop ejabberd from using mnesia [closed]

故事扮演 提交于 2019-12-06 05:58:11
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm trying to establish a procedure for restoring my database from a crashed server to a new server. My server is running Ejabberd as an XMPP server, and I configured it to use postgresql instead of mnesia - or so I thought. My procedure goes something like "dump the contents of the original DB, run the new server, restore the contents of the DBs using psql, then run the system". However, when I try running

How do I get a list of all online users in ejabberd/XMPP?

試著忘記壹切 提交于 2019-12-06 04:57:07
问题 How do I get a list of all users online in XMPP assuming that I'm an admin and XEP-133 does not work and I'm not in their roster? 回答1: Most commands in XEP-133 do work fine with ejabberd. You are indeed right about some particular commands not working including getting the online-users: I discovered though there are non-standard alternatives specific to ejabberd: If you run a disco#items on the host you get some interesting items you can query: <iq to="localhost" type="get" id="123"> <query

how to use MongoDB for storing ejabberd messages?

本秂侑毒 提交于 2019-12-06 04:03:25
问题 I am using ejabberd as an XMPP server. But i wish to store the messages that go through the server and also when was the message sent and to whom and by who. I googled it but could not find how to do it. Help? 回答1: You probably need to write a hook in Erlang. See the ejabberd documentation for events and hooks Specifically this one : user_send_packet(From, To, Packet) -> ok Use the erlang driver for mongodb . If that's "not possible"/"too difficult", i suggest you call a PHP/Python/Ruby