XMPP Punjab BOSH connection manager giving 405 while using Strophe.js - xmpp

Configuration:
Windows 7
Python 2.7
TwistedPython 10.2.0
Latest Punjab on GitHub
I started Punjab from the command line with: "python c:\python27\scripts\twisted.py -y punjab.tac"
I can hit the url just fine from Chrome: http://localhost:5280. The page gives the XEP-0124 response.
While using Strophe.js though, I keep getting a "405 method not allowed" response from Punjab. I'm fairly certain its not Strophe as I've been able to connect using public Punjab deployments just fine. Perhaps something I'm missing with the Punjab configuration?
Any help is welcome.

Forgot to put "http-bind" at the end of the url. The full url should be "http://localhost:5280/http-bind".

Related

Jersey server is disconnecting the client after 2 minutes

Jersey REST API is disconcerting client after exact 2 mins however client is not configured for any kind of timeout.
To avoid the issue i am using Jersey Async API that helps me.
But my problem is why jersey is disconnecting the client. Does Jersey has 2 mins timeout configured in it, that i don't know and couldn't find that on Google.
I tried via cURL, postman etc, everywhere client is disconnecting.
I got the fix of my problem.
The issue was due to DoS (Denial of Service) filter configuration. That was configured with 2 mins timeout. I changed that to extended value and so my REST API is working for long run processes.

Squirrelmail with Greenmail ERROR "Bad or malformed request"

Greenmail is a SMTP, POP3, IMAP mail mocking service ideal for mail testing to instead of a real mail server you have a stub that holds the mails for later confirmation.
Squirrelmail is a php based webmail interface that i intend to use to access greenmail but...
As soon as i try to open an email from squirrelmail i get:
ERROR: Bad or malformed request.
Query: FETCH 1 BODY[HEADER]
Server responded: Expected:'(' found:'B' Command should be ' UID |||'
That was squirrel 1.4.22, today i even tried installing svn trunk squirrelmail-20140131_0200-SVN.devel.tar.gz and got the exact same error.
Tried other webmail alternatives to squirrel but got similar error too except for atmail trial which is the only webmail client that has been able to open greenmail's mails. Telnet works well but that's too poor for what i'm trying to do here.
So if atmail can do it there must be something to be done here on squirrelmail side or perhaps some configuration related to imap i'm missing here?
Note atmail was tested with the same php 5.3.10, apache2, ubuntu precise 64 stack that squirrelmail.
To reproduce the error i've setup an open source Vagrant VM here
UPDATE 1
I'm using yawebmail web client with some handy updates to make email end-to-end testing stay in the browser. Yawebmail doesn't have the malformed request issue.
UPDATE 2
Great news! Greenmail has been moved to github and this question is now an issue in the official repo

enable http-bind on openfire

I am trying to enable BOSH connection over Openfire so that i can create a XMPP client over a web. curretly i am testing it with the strophe.js.
the problem is when i try to fire following url in a browser i am getting
http://www.mydomain.com:7070/http-bind
following error
HTTP ERROR 400
Problem accessing /http-bind/. Reason:
Bad Request
Powered by Jetty://
here is my server setting , i saw few threads but they arent helpful
update
i have made a connection using strophe but i am getting following error in browser trance
its now working in my system.
i think your error encountered may actually be a configuration issue with the openfire.
It is designed to reply with HTTP 400 Bad Request if there is no element in the request. You can test this yourself by providing a element in your query.
Try the following URL in your browser:
http://www.servername:7070/http-bind/?<body rid="1"/>
In your update Strophe is sending OPTIONS HTTP requests which means that it is negotiating cross domain communication. Requests are painted red which means that this is failing for some reason. Probably misconfiguration.
There is a nice article about that here: http://metajack.im/2010/01/19/crossdomain-ajax-for-xmpp-http-binding-made-easy/
Otherwise, when Strophe does its regular BOSH communication it uses POST method.
Your setup is correct. The page the browser displays to you is also normal. Openfires BOSH component is not designed to work in a Browser with HTTP GET, only with BOSH clients like strophe. Try to connect with strophe.
You should use proxy to repost the request to the openfire server . Because, the js post cannot support cross domain.
Notes:
1.I use jsjac , but I think it's not important .
2.If you sure your config is right , please restart you openfire server . It's my experience .
If server is properly configured it should display
HTTP ERROR: 404
Problem accessing /http-bind/. Reason:
Not Found
Powered by Jetty://
The Bad Request was gone when I uninstall and reinstall Openfire as in
here.
Below works for me, i am pinging the openfire server after some interval so, clients remains alive...
i just append "/?<body rid='1'" with the server name and i don't have 400 bad request error.
XMPPconnection.sendIQ($iq({ to: XMPPserver+"/?<body rid='1'/>", from: CurrentUserJID, type: "get" }).c('ping', { xmlns: "urn:xmpp:ping" }));

HTTPS requests sent with ASIHTTPRequest return a NULL response

I am developing an iPad application and using the ASIHTTPRequest library (https://github.com/pokeb/asi-http-request) to make requests to my web server, which runs CentOS 6.2 and is equipped with Apache 2.2 and mod_ssl enabled.
When I make an HTTPS request to the server, sometimes I get a null response. Absolutely nothing. As if the server were completely dead. Sometimes it works just fine, returning the expected response. There is no rhyme or reason to when the response is null and when it's fine.
The server uses a dummy security certificate
I am setting validatesSecurityCertificate to NO
I am setting SSLVerifyClient to none in httpd.conf
Note, HTTPS requests sent through a web browser work fine (after you tell it to proceed without a security certificate). But, all HTTPS requests sent through HTTP Client: ((Zero-length response returned from the server.))
The trick to using ASIHTTPRequest well is that you dont use it. Its deprecated by its author allseeing-i.com/ASIHTTPRequest . I suggest using AFNetworking, RESTKit or even NSURLConnection.
As it is we have no code of yours to see, but when experiencing random issues with a library that hasn't been worked on in years I would say to start by using a different library.

get 502 bad gateway error when calling a webservice

In my SEAM web application running under JBOSS-AS 4.2.3 there is a plain SOAP message call to a webservice, using SOAPConnection.call().
The call ends up with a
org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Invalid HTTP server response [502] - Bad Gateway.
Running the same code outside the JBOSS as a pure java application all works fine.
So question: Is there something in JBoss I have to configure that makes things work ?
Thx for answers,
Frank