It seems that mod_logxml module is not compatible with ejabberd 13.12 version. Ejabberd fails to start when this module is installed.
My question is - is there another way how to log (file, database, etc) all the XMPP packets send and received by ejabberd?
Yes, you can make your own log module if you cannot find anything that fits your needs.
You can use a module I developed as a reference. This module which would intercept stanza with the type "chat" or "groupchat" and send a acknowledgement back to the sender.
You can modify this module by removing the type so it intercepts all stanza types and log whatever you want into a DB instead of sending a message back to the sender.
https://github.com/Mingism/ejabberd-stanza-ack
I've changed mod_logxml.erl that it will work with eJabberd 13.12. You have to put in
ejabberd/src/
Configs are for ejabberd.yml format:
mod_logxml:
stanza: [message, other]
direction: [external]
orientation: [send, recv]
logdir: "/var/jabber/logs/"
timezone: universal
rotate_days: 1
rotate_megs: 100
rotate_kpackets: no
check_rotate_kpackets: 1
Repository
Related
I'm doing some testing with Mule ESB. I want to receive come plain text over TCP and convert it to a soap Message, for that I created a TCP connector a logger and an echo Component
I'm sending a simple "Hello" and getting the following error con mule console
ERROR 2016-01-27 09:10:54,402 [[mule].connector.tcp.mule.default.receiver.02] org.mule.exception.DefaultSystemExceptionStrategy: Caught exception in Exception Strategy: An error occurred while verifying your connection. You may not be using a consistent protocol on your TCP transport. Please read the documentation for the TCP transport, paying particular attention to the protocol parameter.
I have been playing with the Transformer and Metadata parameter but still couldĀ“t make it work. How do I config the connector so It knows how to dial with the Text input?
Just in case someone has the same problem:
I solve this by adding the "tcp:direct-protocol payloadOnly=true protocol" in TCP connector->general->connector configuration->protocol.
After that I got no problems receiving neither text not data
If you want to consume a WS from your HTTP request you could use the "Parte Template" Transformer and load the SOAP envelope from a .txt! Later add your payload to the template!
You can check the next url! Hope it helps!
http://forums.mulesoft.com/questions/994/consuming-webservices-in-mule-community-edition-without-datamapper-or-dataweave.html
I am in the process of configuring the ejabber server for one of our project.In this we need to configure the mod_rest module (https://github.com/processone/ejabberd-contrib) from ejabberd-contrib. Below are my configuration (YAML)
in listen
port: 5280
module: ejabberd_http
request_handlers:
"/rest": mod_rest
web_admin: true
http_poll: true
http_bind: true
## register: true
captcha: true
modules:
mod_rest:
allowed_ips:
- "host_one_ip"
- "host_one_ip"
access_commands:
- "registered_users"
- "connected_users"
allowed_destinations:
- "all"
But whenever i am trying to hit the ejabberd command using the rest (curl call) its giving me "TryPOSTING Stanza"
prompt# curl --data 'registered_users domain' -X POST http://host:5280/rest/
Try POSTing a stanza.
I tried to go though the forum but couldn't find ...anything helpful
I am new to ejabber and erlang. Any pointer in this direction will be very helpful. Please let me know if any more details are required.
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. I adjusted the header location accordingly and compile the module. It worked for me :) with this i got the ejabberd commands working using the mod_rest.
Now my i facing problem to consumes Stanzas using mod_rest :(. If anyone have any thoughts on the same please let me know.
I try this, and worked:
In my case I use ejabberd binary installation, and the installation folder in
/lib/ejabberd/xxxx
Compile the mod_rest.erl from ejabberd-contrib, here is the reference, https://www.ejabberd.im/ejabberd-contrib
I compiled using this command :
erlc -I /lib/ejabberd/include your_mod_rest_source_file
if success, you will have .beam file, after that copy the mod_rest.beam to ejabberd installation folder
cp ~/ejabberd-contrib/mod_rest/src/mod_rest.beam /lib/ejabberd/ebin/
than configure ejabberd.yml in my case the yml reside in (/etc/ejabberd/ejabberd.yml) like this:
https://github.com/processone/ejabberd-contrib/issues/45#issuecomment-69767670
I think you misunderstand the purpose of the ReST module.
From the doc, you are supposed to send XMPP stanza to it:
https://github.com/processone/ejabberd-contrib/tree/master/mod_rest
However, you are sending plain text, not XMPP stanza (not even XML).
I have two Java web applications in Tomcat 7.
tomcat/webapps/app1
tomcat/webapps/app2
App1 sends an email with attachments. No problem.
Deploy App2 and suddenly, App1 cannot send emails with attachments any more and gives the following exception:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary
Remove App2 again, and App1 is able to send emails with attachments.
How can one application affect another like that?
I upgraded to JavaMail 1.4.7 in App 1 which didnt fix the issue as suggested on other posts.
I did programmatically set the MailcapCommandMap config as per below which worked. Note this was taken from another post.
MailcapCommandMap mailcapCommandMap = (MailcapCommandMap) CommandMap.getDefaultCommandMap();
mailcapCommandMap.addMailcap("text/html;; x-java-content-handler=com.sun.mail.handlers.text_html");
mailcapCommandMap.addMailcap("text/xml;; x-java-content-handler=com.sun.mail.handlers.text_xml");
mailcapCommandMap.addMailcap("text/plain;; x-java-content-handler=com.sun.mail.handlers.text_plain");
mailcapCommandMap.addMailcap("multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
mailcapCommandMap.addMailcap("message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822");
CommandMap.setDefaultCommandMap(mailcapCommandMap);
I've gone through the SendGrid integration instructions for Exim (http://docs.sendgrid.com/documentation/get-started/integrate/examples/exim/)
However, any email I send now is not being sent. Its all stuck in the queue. I looked for the log file for a message I'm trying to send and this is what I get:
2011-10-12 19:49:14 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1RE9U2-0007Qg-20
+++ 1RE9U2-0007Qg-20 has not completed +++
2011-10-12 19:49:14 1RE9U2-0007Qg-20 <= email#example.com H=localhost [127.0.0.1] P=esmtpa A=dovecot_login:email#example.com S=731 id=20111012194913.13697j8jpb4heop5#example.com T="Test"
2011-10-12 19:49:14 1RE9U2-0007Qg-20 == email#gmail.com R=send_via_sendgrid T=sendgrid_smtp defer (-53): retry time not reached for any host
I've had the support rebuild the exim db, but that hasn't helped. I'm thinking it has to do with the fact that its using the dovecot login instead of the sendgrid login which is added after it. How do I make it use the sendgrid login info? Thanks!!
If you aren't using your SG credentials you're going to run into authentification issues.
Try the following to make sure you are using the correct credentials:
*:sendgridusername:sendgridpassword
I have set up the following publisher in CruiseControl:
<jabber host="my.network.local"
port="5222"
username="cruisecontrol"
password="cruisecontrol"
recipient="builds#conference.my.network.local"
chatroom="true"
buildresultsurl="http://cruise.control.net:7070/dashboard/tab/build/detail/customer" />
If I set chatroom to FALSE and enter a single recipient, everything works great. The problem I have is sending sending the build notification to a chat room. I set the chatroom value to TRUE and enter the fully qualified chatroom name I get the following error:
2009-10-16 13:34:10,818 [Thread-70897] ERROR JabberPublisher - Could not send message to recipient or chat room
No response from server.:
at org.jivesoftware.smack.GroupChat.join(GroupChat.java:162)
at org.jivesoftware.smack.GroupChat.join(GroupChat.java:123)
at net.sourceforge.cruisecontrol.publishers.JabberPublisher.init(JabberPublisher.java:146)
at net.sourceforge.cruisecontrol.publishers.JabberPublisher.publish(JabberPublisher.java:201)
at net.sourceforge.cruisecontrol.Project.publish(Project.java:742)
at net.sourceforge.cruisecontrol.Project.build(Project.java:264)
at net.sourceforge.cruisecontrol.Project.execute(Project.java:147)
at net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:402)
at net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69)
at java.lang.Thread.run(Thread.java:619)
Has anyone been able to send build messages to a Jabber chatroom using this method?
I haven't used Jabber with CruiseControl, but have you tried connecting to that port manually from your server running CC?
Like:
telnet my.network.local 5222
Can you log any of the xmpp / jabber packets from the client to server and back? We can see the CruiseControl config file and the java error, but we can't see what xmpp packets are actually being sent and received. That may be key in the troubleshooting.