Menu
  • HOME
  • TAGS

ejabberd MAM does not work for MUC

xmpp,ejabberd,muc

I guess you are using ejabberd contributed module. However, a new official MAM module has been added to official ejabberd and it support latest version of MAM (0.3) and MUC archiving. It will be released in ejabberd 15.06, but you can already use it from source from Github repository. The...

How does ejabberd handle really high number of requests

erlang,xmpp,ejabberd

The typical Erlang way of doing things is to spawn a process per independent task (or set of tasks). Process spawning is cheap and the scheduling is both extremely lightweight and generally handled for you automatically -- so this is the easy way of modeling a massively concurrent problem in...

Different databases in different part of vhosts ejabberd

multi-tenant,ejabberd,bosh

No, you cannot have port reserved specifically for some vhosts. Port are shared for vhost. However, you can have a different databases for different vhost. See ejabberd documentation for reference: http://docs.ejabberd.im/admin/guide/configuration/#virtual-hosting In the following example, two vhosts are configured to use different database backends: host_config: "example1.com": auth_method: odbc odbc_type: odbc...

setup ichat message app with localhost ejabberd

ejabberd

I resolve issue by setting server name and port Server name : localhost Port : 5222...

ConverseJS and OpenFire

apache,xmpp,openfire,ejabberd,converse.js

You need to configure OpenFire to support BOSH (Bidirectional-streams Over Synchronous HTTP). Log in to the admin console, then go to Server-> Server Settings -> HTTP Binding....

XMPP Connection time optimization

ssl,xmpp,openfire,ejabberd,xmppframework

I'd recommend trying to get some logs to find out exactly what is taking the most amount of time. Figuring out exactly how many roundtrips you are using will help you determine what to optimize. There's a XEP for XMPP Quickstart, XEP-0305. This has some general recommendation, but also a...

ejabberd can not set nickname when add roster sometimes

xmpp,ejabberd,xmppframework

Here is a sequence that should work fine: Send the presence subscribe. Wait for reply. Set the name on roster item. We will have a look to see if we can improve to handle this case better as well....

Connect to an ejabberd server from another machine

installation,ejabberd

It was a problem with my own understanding with DNS .The domain name you set up when you set up your xmpp server should be an already existing ACCESSIBLE address on the network. I found the name of my pc simply by running the famous ipconfig/all on windows and used...

Creating composite key in mnesia

erlang,ejabberd,mnesia

For example, when use this record -record(cuser, { id, login_id, email}). to create mnesia table, then the primary key is id, but when you change this recode to this: -record(cuser, { {id,login_id}, email})., then the primary key is {id,login_id}. You can use an tuple as the primary key....

Max users in XMPP roster?

xmpp,ejabberd

You do not want to do that. This is not a scalable design. Having a roster for the bot with all presence of the server is the best way to create a deadly bottleneck as you scale. Consider writing a native ejabberd module that intercept the packet you want and...

Ejabberd with Stream management (XEP-198) not using offline message hook

xmpp,ejabberd,xep-0198

In my understanding the behaviour of ejabberd is correct from the XMPP specification point of view. It is doing the right thing and should not in that case forward message to the offline store, because you are not offline technically. It is just not the right place to place your...

WebSocket support for Ejabberd

websocket,xmpp,ejabberd

It appears that from Ejabberd 15.03 version, WebSockets are fully supported as stated here: Ejabberd 15.03...

Is it possible to set up an ejabberd cluster in master-slave mode where data is not being replicated?

xmpp,ejabberd,master-slave

In my understanding, a slave get the data replicated but would simply not be active. The slave needs the data to be able to take over the task of the master at some point. It seems to means that the core of the setup you describe is not about disabling...

Global variables in erlang

erlang,global-variables,ejabberd

Other ways are using ETS tables (simpler to use than Mnesia, but don't offer distribution, persistence or transactions), or using a gen_server process to store global values.

Adding all LDAP-User to jappix friend list

ldap,xmpp,ejabberd,jappix

I think you need to use mod_shared_roster_ldap

Connection Timeout at “./rebar get-deps” / compiling EJabberd

ejabberd,rebar

You should try replacing the dependancy link to Github using https:// instead of git:// It should fix your issue. We will check the project to make sure all our dependancies use https url scheme instead of ssh....

XMPP client for ejabberd server: Smack ConnectionConfiguration not connecting to localhost

xmpp,ejabberd,smack

I see you are using port 5280. This is HTTP port for XMPP over Bosh. However, you are trying to connect using XMPP over standard TCP socket. Are you sure you should not use port 5222 ?

Extracting multiple row corresponding to a value in mnesia

erlang,ejabberd,mnesia

you will have to use mnemosyne getRecords(ListMember)-> F = fun() -> Q = qlc:q( [ Record || Record <- mnesia:table(table_name_here), exists(Record#table_name_here.member_list, ListMember) ]), qlc:e(Q) end, {atomic, L}=mnesia:transaction(F), L. you then need to implement function exists(Member_list, Member) which scans the Member_list for the member and returns true if found and false...

Ejabberd error while xml,append_subtags

erlang,ejabberd,mongoose-im

You're passing Packet (a tuple: {From, To, XML}) to xml:append_subtags/2 while you should pass just XML. Your add_child/1 should look more like: add_child({From, To, XML} = Packet) -> Tag = {<<"a">>, <<"b">>}, NewPacket = {From, To, xml:append_subtags(XML, [Tag])}, ?INFO_MSG(" To party: ~p~n",[To]), NewPacket. I also changed {"a", "b"} to {<<"a">>,...

ejabberd behavior b/w user disconnected vs user unavailable

ejabberd,xmppframework

When the user gets offline, the default behaviour is the same, no matter which method is used (explicit session close or unvoluntary disconnect). This is per XMPP specification. If you want to customise the behaviour, it will not be easy as there is no way to know the reason why...

Configure mod_rest module for the ejabberd server

rest,erlang,xmpp,ejabberd

Guys i have figured out the issue for this. I have installed Ejabberd 14.05 version. The mod_rest module was including the ejabberd_http.hrl file for its dev_include directories.In the Ejabberd 14.05 the record for ejabberd_http.hrl are changed. "opts = [] :: list()," is an extra header in the ejabber-contrib`s include folder....

Writing a tuple in file in erlang

file,erlang,ejabberd

file:write_file takes an iolist, not a plain Erlang term. You could format the term as an iolist using io_lib:format: file:write_file("/tmp/logs.txt", io_lib:format("~p.~n", [Result]), [append]) ...

How to fetch multiple rows in mnesia

erlang,ejabberd,mnesia

If your request find multiple row, the answer is (I guess) {atomic,List} where List is a list that contains more than one element and thus cannot match with [R] which is a list of one single element. What you can do is receive the list and traverse it to print...

Storing messages in Ejabberd

mysql,xmpp,ejabberd

As mentioned in ejabberd forums, mysql backend for mod_mam is not available in ejabberd community edition, but it is expected to be released on june 2015.

Getting SSL related error against my request to Ejabberd

android,sockets,ssl,erlang,ejabberd

Here is how you can go about it. I work on the sandbox environment and after a bit of patching, i could make it work. Follow the patching done here: http://erlang.org/pipermail/erlang-questions/2015-June/084868.html You would be required to make changes in ssl_cipher.erl and ssl_handshake.erl files. These 2 files are a part of...

XMPP: count of unread messages

xmpp,openfire,ejabberd,mongoose-im

What you are trying to do is to basically store a counter of unseen stuff in your account. I think you do not need flexible offline retrieval as when you connect the messages would simply become unseen. You thus only have to deal with one case: Unseen. I will reply...

Cannot register new user android asmack “Unable To Generate CAPTCHA”

android,xmpp,ejabberd,smack,asmack

As the error stanza says, this is an internal server error. The server is not able to generate a CAPTCHA for the registration form for some reason. You'll have to ask the server administrator to have a look at the configuration.

xmpp messages are lost when client connection lost suddently

xmpp,message,ejabberd,xmppframework

I guess the reason is that B lost connection suddenly and the server still think B is online. Thus the offline message does work under this condition Yes you are absolutely correct,this is well known limitation of TCP connections. There are two approaches to your problem 1 Server side...

Store custom data for each user in ejabberd

ejabberd

This is what I am doing. During registration process in my Android Chat application, I post data like the desired userid (jabberid), password, email, display name, gender, mobile etc. to my PHP API. The PHP code validates if userid already exists and if it doesn't then it creates the user...

Erlang convert ejabberd XML structure to string

erlang,ejabberd,mongoose-im

You can use ejabberd xml:element_to_binary/1:...

'from' attribute in delay element of MUC history message has jid of occupant instead of room

ejabberd

It depends if you configured your room as anonymous or not. Configure that room as anonymous and it will behave as you expect. The behaviour you mention is from XEP-0045 v1.25. For non-anonymous room the original from field should be defined with Extended Stanza Addressing. Changes are not yet supported,...

ejabberd offline users can not receive announce message

offline,broadcast,ejabberd

I guess you are using external authentication or a custom authentication. In that case, ejabberd cannot access to the full user database and thus can only dispatch to known users, that are the ones that are online.

Architecture for cross platform messaging app

android,google-app-engine,backend,ejabberd,google-cloud-messaging

Announced last week: Engage your users across Android, iOS and Chrome via Google Cloud Messaging 3.0: https://developers.google.com/cloud-messaging/ https://www.youtube.com/watch?v=gJatfdattno ...

Ejabberd: How to limit the fetching of jabber user directory (JUD)

xmpp,ejabberd,smack

I do not think it is possible as default, without customizing ejabberd application code.

Get Roster List XMPP Framework

ios,ejabberd,xmppframework

To get full roster list, you need to send a roster request: - (void)FetchFriends { NSError *error = [[NSError alloc] init]; NSXMLElement *query = [[NSXMLElement alloc] initWithXMLString:@"<query xmlns='jabber:iq:roster'/>"error:&error]; NSXMLElement *iq = [NSXMLElement elementWithName:@"iq"]; [iq addAttributeWithName:@"type" stringValue:@"get"]; [iq addAttributeWithName:@"id" stringValue:@"ANY_ID_NAME"]; [iq addAttributeWithName:@"from" stringValue:@"[email protected]"]; [iq addChild:query]; [xmppStream sendElement:iq]; }...

Unable to register an user in Ejabberd using XMPPFramework

mysql,ios,chat,ejabberd,xmppframework

In order for registration to work, you would need to ensure that the stream is connected. I have shown below a sample of how to register a user. - (IBAction)signUpButtonPressed:(UIButton *)sender { // when the sign up button is pressed, set the JID for the xmpp stream [self.xmppStream setMyJID:[XMPPJID jidWithString:jid]];...

MongooseIM module not getting variables from Packet

php,xmpp,ejabberd,mongoose-im

offline_message_hook is only called when the server is routing a message to a user who is not online. user_send_packet is run every time the server receives a stanza from a client. This might explain why the handler is not run, though it depends on how you test. There's an article...

ejabberd server broadcast message

android,ios,xmpp,broadcast,ejabberd

Sending a single message to multiple recipient is defined in XEP-0033: Extended Stanza Addressing: http://xmpp.org/extensions/xep-0033.html This XEP is supported by ejabberd....

Any way to force stop eJabberd?

ubuntu,erlang,xmpp,ejabberd

Finally! after learning more about erlang nodes and ejabberd I found a bash script here that would allow you to kill any erlang node. After running epmd -names I made sure ejabberd was running on "ejabberd" node and not "[email protected]", All I had to do was to excute ./kill-erlang-node.sh ejabberd...

Rebar Jiffy dependency not available

ejabberd,rebar,jiffy

I don't know why, but make clean then make again made it work. I figured this out by making that Canillita thing from the tutorial and seeing that it had no problem with Jiffy, so I assumed it was because I was making it clean.

Can't compile a new module in ejabberd

erlang,ejabberd

The jlib.hrl file in ejabberd repository contains -include("ns.hrl"). (line 21) and -include_lib("p1_xml/include/xml.hrl"). line 22. The include_lib means that it will search the file in library path. You could modify this and add the necessary files in your directory (maybe a simple solution to test?) but I think that the clean...

Ejabberd SASL external authentication for client SSL Authentication using certificates

ssl,ejabberd,sasl

This feature is not available in ejabberd Community Edition at the moment. This is part of ejabberd Business offering....

disco#items is returning error code 403

xmpp,ejabberd,service-discovery

Access to the all users info node is hard-coded to use the configure access rule. In the default configuration, it's set to only allow server admins: %% Only admins can use the configuration interface: {access, configure, [{allow, admin}]}. There is no way to configure ejabberd to give access to just...

implement group chat using ejabberd

ejabberd,chatroom,groupchat

XMPP does not have the concept of whatsapp group as default. You need to roll out a custom approach to build it. However, with the existing building bricks in ejabberd, MUC, MAM and a bit of customization, you can get very close to the same behaviour....

Fetching unicode data from PostgreSQL Erlang

postgresql,unicode,erlang,ejabberd

Erlang ODBC driver perfectly fetched the status column from your database. Indeed, PostgreSQL encodes your data is UTF-8, and the value you get is UTF-8 encoded. Status = <<209,139,209,132,208,178,208,176,209,139,209,132,208,178,208,176>>. This is a binary representing the string ыфваыфва in UTF-8. You can directly use UTF-8 encoded binaries in your code. If...

aSmack 4.0.* XMPPTCPConnection can't connect to OpenFire and Ejabbered (SmackException$NoResponseException)

android,xmpp,ejabberd,smack,asmack

I have found the problem all i did is adding this line: ConnectionConfiguration.setSecurityMode(SecurityMode.disabled); and i was connected to server successfully here's my configuration in the end : ConnectionConfiguration ConnectionConfiguration = new ConnectionConfiguration(HOST, PORT); ConnectionConfiguration.setDebuggerEnabled(true); ConnectionConfiguration.setSecurityMode(SecurityMode.disabled); ...

Need help in configuring the ejabberd

java,ejabberd

You may want to look into ejabberd.yml which is the new Yaml config file format.

getting internal server error on connecting ejabber using Bosh url

apache,xmpp,ubuntu-14.04,ejabberd,ejabberd-http-bind

XMPP Prebind for PHP needs PHP5 curl extension. While Enabling Curl extension , it solved the issue of 'Internal Server Error'.

Trying to register for XMPP

java,android,xmpp,ejabberd

First you need to check if server supports In-Band Registration. As far as I know, public registration at jabber.org is disabled for a long time.

Manipulating XML element to get value from Sub-element in Erlang

xml,erlang,ejabberd

You can use function xml:get_path_s, asking it to descend into the element called received to get the attribute called id: > xml:get_path_s(Packet, [{elem, "received"}, {attr, "id"}]). "018A12FB-0718-4304-87FD-430C59EDB4F9" ...

Ejabberd 13.12 how to add element XMPP Packet?

erlang,xmpp,ejabberd

13.12 uses different type for xmlelement. Packet is a type of record #xmlel, so you need to insert new element to Packet#xmlel.children. on_filter_packet({From, To, #xmlel{ children=OldChildren } = Packet}=Input) -> ... TimeElem = #xmlel{ name = <<"time">>, children = [{xmlcdata, <<"testtime">>}]}, NPacket = Packet#xmlel{ children = [TimeElem|OldChildren] }, ... Not...

How to fetch module value in ejabberd

ejabberd

Module_value=?MODULE.Will give value in string.You can use list_to_binary() function to convert it into binary

Formulating json array

json,post,erlang,ejabberd

Body Variable:- Body = lists:flatten(mochijson2:encode( { struct,[ { registration_ids, ['KEY']}, { data,[{ message,[Message] } This is the final JSON Packet that worked with Google GCM API....

Can't connect to my ejabberd server using Asmack

android,keystore,ejabberd,asmack,sasl

Here is the answer for this problem... AndroidConnectionConfiguration config = new AndroidConnectionConfiguration(server, port); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { config.setTruststoreType("AndroidCAStore"); config.setTruststorePassword(null); config.setTruststorePath(null); } else { config.setTruststoreType("BKS"); String path = System.getProperty("javax.net.ssl.trustStore"); if (path == null) path = System.getProperty("java.home") + File.separator + "etc" + File.separator + "security" +...

Finding c2s connection on ejabberd

erlang,ejabberd

These can be found in session table

On-the-fly XMPP client to connect with Google App Engine

google-app-engine,xmpp,ejabberd

To address your questions: Am I understanding this correctly? You use to have to use Google Talk XMPP service, but I guess, yes, now you need to deploy your own server. If so- does that mean I must host my own xmpp server (ejabbered) if I want on-the-fly session-based clients?...

Trying to get an Android jabber app to check for a string in new messages and return a toast message

android,xmpp,toast,ejabberd,instant-messaging

You've got an extra semi-colon here if (chat.getLastText().contains("Mom") && (!messageItem.isRead())); <------ So your next block of code containing the Toast show statement will always be executed. Remove the semi-colon...

Strophejs get roster success callback response

javascript,xmpp,ejabberd,strophe

I've changed the callback function like this : function callback(iq){ $(iq).find('item').each(function(){ var jid = $(this).attr('jid'); alert(jid); }); } Works well.....

ejabberd mod_multicast won't allow relaying

ejabberd

At the moment, ejabberd only support multicasting to local user and does not support relaying. I created a feature request for you on ejabberd ticket tracker: https://github.com/processone/ejabberd/issues/583...

Running PHP code from erlang [closed]

php,erlang,ejabberd

Since Erlang webserver (Yaws) CAN run PHP scripts, this is an example. first on the yaws.conf, write this. the env variable. php_exe_path = /usr/bin/php-cgi Also be sure you enable the php processing for the individual server, like this. <server www.example.org> port = 80 listen = 0.0.0.0 allowed_scripts = php yaws...

Exception handling in Erlang to Continue execution

exception,error-handling,exception-handling,erlang,ejabberd

Seems the reason is an exception happens in mochijson2:decode/1. The function doesn't return a error as a tuple, instead the process crashes. There isn't enough information to tell what exactly the reason is. However I guess that the data format of Ccode might be wrong. You can handle exception using...

Ejabberd 14.12 mod_mam multisession issue

xmpp,ejabberd

mod_mam from ejabberd-contrib works perfect. Problem solved.

Ejabberd PostgreSQL chat persistence table

database,postgresql,xmpp,ejabberd

As a default, message history are not stored in the database. You may want to look into the Message Archive Management (XEP-0313, aka MAM) XMPP extension, supported in ejabberd 15.06. You can use the mod_mam (Message Archive Management - XEP-0313) module. It works perfect. And dont forget the add the...

Ejabberd server not getting started?

python-2.7,ubuntu-14.04,openfire,ejabberd

Solved the issue problem wan with my settings,and then restarted the server using sudo service ejabbers restart.It worked

Get packet type in module (ejabberd 15.02)

module,erlang,xmpp,ejabberd

I guess that you want to do Packet_Type = xml:get_tag_attr_s("type", XML), not Packet_Type = xml:get_tag_attr_s("type", Packet)

Jabber user going offline: Why the two different scenarios?

android,erlang,xmpp,ejabberd,user-presence

Scenario 1: When I swipe-right the app (kill the app), the user goes offline on the server immediately. Its status is changed to offline at that very instant. In above case your Android xmpp client is sending presence as unavailable before closing your Android application, maybe your Android XMPP...

Store device tokens for push notification in ejabberd

erlang,ejabberd

Your question is "how do I store data in Erlang?" There are many answers. Probably, you want to read about Mnesia. Or use a relational database. Or use basically any other data store (Redis, MongoDB, DynamoDB, etc, etc, etc) depending on your needs and situation....

Getting value of host from Ejabbered.yml file

erlang,ejabberd

This can be get by Host=?MYHOSTS.?MYHOSTS is a Macro in erlang...

How to properly connect strophe.js client with Prosody server using XMPP protocol

xmpp,ejabberd,strophe

First and foremost, it looks like you're trying to connect directly to port 5222 (typically used for XMPP), but in order to use Strophe from a client-side webpage, you must use HTTP-Binding (aka BOSH). XMPP vs BOSH Strophe speaks XMPP, but it is unique in that it does not actually...