January 2016 Posts

[Mule] Error 400 Bad Request, Request Header Or Cookie Too Large

I had an error yersterday, when connecting Mule ESB to NGinx. Very weird, because somehow it never shown any errors when fired directly without a reverse proxy. Here is the complete stacktrace

<head><title>400 Request Header Or Cookie Too Large</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>Request Header Or Cookie Too Large</center>
<hr><center>nginx/1.4.4</center>
</body>
</html>
 (javax.xml.ws.soap.SOAPFaultException)
  org.apache.cxf.jaxws.JaxWsClientProxy:156 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/xml/ws/soap/SOAPFaultException.html)
3. Response was of unexpected text/html ContentType.  Incoming portion of HTML stream: <html>
<head><title>400 Request Header Or Cookie Too Large</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>Request Header Or Cookie Too Large</center>
<hr><center>nginx/1.4.4</center>
</body>
</html>

It happens because Mule, by default, send a very large cookies called “X-MULE_SESSION”. After removing it, my ESB runs well again. This is how i remove it,

<http:connector name="NoSessionConnector">
	    <service-overrides sessionHandler="org.mule.session.NullSessionHandler"/>
</http:connector>
Google+

Weird Error on Java Mail, “javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client”

I run into a weird error that never happened before, somehow it happened since my user upgrade their Microsoft Mail Exchange’s version. Here is the complete stacktrace,

Caused by: javax.mail.AuthenticationFailedException: 
No authentication mechansims supported by both server and client
    at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:760)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673)
    at javax.mail.Service.connect(Service.java:317)

I guess there are several reasons why it happens. First of all, it happens because im using starttls = “true” despite im connecting to port 25, first i change it into “false”. And the other thing is that im using username and password for connecting to my email exchange server, so the workaround is quite easy, just setting my mail.smtp.auth parameter into “false” instead of “true”. Or try sending email without setting username and password.

But actually, it’s much easier to fix the error on the mail server’s side, because it’s only a simple checklist configuration :-P

Google+

Download A Compressed Attachment (Zip, Rar or 7Z) on GMail

I want to download a compressed file that i’ve sent several years ago, but somehow google disabled it, and gives an “anti virus warning”. And it happen for all my email with compressed attachments files, such as .zip, .rar and also .7z.

compressed download

Well, the workaround is quite simple, im opening my email using my Android GMail client , and then save my attachment to Google Drive.

7zip

From Google Drive, i can easily download my attachment freely.
google drive

Hopefully it can help other people. :-D

Google+