Net::SMTPAuthenticationError exception with capistrano and puma - ruby-on-rails-4

I deployed my server with capistrano 3 and runs in puma.
Everyhting works well except mailing.
When I tried to send an email via webform, I got the following exception.
However, I can sucessfully send mail under rails console.
There is no typo on password or api key, because I sent mails via the console sucessfully
Any suggestion to get more debug information, I don't know how to get further information.
I, [2015-08-27T05:47:07.691835 #14686] INFO -- : Completed 500 Internal Server Error in 2627ms
F, [2015-08-27T05:47:07.693123 #14686] FATAL -- :
Net::SMTPAuthenticationError (535 5.7.0 Mailgun is not loving your login or password
):

Related

SAML error with Kubernetes: ‘InResponseToField of the Response doesn’t correspond to sent message’

I am having a recurring issue with shinyproxy (currently 2.5.0 - based on Springboot) hosted within a kubernetes cluster (currenty a single node). I'm using Auth0 with SAML. Traffic goes through a Nginx ingress controller that does TLS termination and has a fairly basic configuration. What I don't understand is that I will get the following error, but only once in a while. If I try to login, I will get the error, but then after that, if I go back to the login page and try to log in again, everything works fine.
o.s.security.saml.log.SAMLDefaultLogger : AuthNResponse;FAILURE;[Auth0 URN];;;org.opensaml.common.SAMLException: InResponseToField of the Response doesn't correspond to sent message a12g399012cidi7i2i3ha3ha4h6e6jc
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:175)
at org.springframework.security.saml.SAMLAuthenticationProvider.authenticate(SAMLAuthenticationProvider.java:88)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:199)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:219)
...
This made me think of a cookies problem, however adjusting the shinyproxy server/proxy configuration for cookies did not change anything. Shinyproxy configuration has:
server:
secure-cookies: true
proxy:
same-site-cookie: None
In the browser when I try to log in I get the following error message:
Error
Status code: 200
Message: Error validating SAML message
Stack Trace:
org.springframework.security.authentication.AuthenticationServiceException: Error validating SAML message
...
Anyone has an idea of what I am missing? I would really appreciate it! Thank you!

SMTPAuthenticationError in Weblate (which uses Django)

I checked quite a few stackoverflow questions about this and none doesn't seem to be the exact case as me and didn't really work for me so posting this question. So I'm trying to setup weblate using docker which wants me to set weblate email host user, password etc. to send mails to users when using the site, my current docker-compose.override.yml looks like this:
version: '3'
services:
weblate:
ports:
- 1111:8080
environment:
WEBLATE_EMAIL_HOST: smtp.mymailserver.com
WEBLATE_EMAIL_PORT: 465
WEBLATE_EMAIL_HOST_USER: translate#domain.com
WEBLATE_EMAIL_HOST_PASSWORD: password
WEBLATE_SERVER_EMAIL: translate#domain.com
WEBLATE_DEFAULT_FROM_EMAIL: translate#domain.com
WEBLATE_SITE_DOMAIN: translate.mydomain.com
WEBLATE_ADMIN_PASSWORD: mypass
WEBLATE_ADMIN_EMAIL: myemail#domain.com
I checked this with gmail app in mobile with the same outgoing server configuration and it worked perfectly fine there (I was able to send mails from it) but whenever I try it with weblate, I'm seeing this error:
SMTPAuthenticationError: (535, b'Authentication credentials invalid')
This is the whole error I get in the logs
You don't have SSL enabled, that might be reason for server rejecting the crendentials. Try enabling WEBLATE_EMAIL_USE_SSL.
PS: In the upcoming release, this will be turned on automatically for port 465, see https://github.com/WeblateOrg/weblate/commit/efacbf5d7e36c7207e985744639564e7edfc2fbb

Laravel 5.5 Mail causing 404

$email = new NewUserVerification(new User([
'email_token' => $user->email_token,
'name' => $user->email
]));
\Mail::to($user->email)->send($email);
I have the above code. Works perfectly on dev machine. When uploaded to server both controllers where NewUserVerification is called get a 404 error. Removing those 2 lines everything works.
I would have assumed its mail configuration, that would be logical, but all other mails are working int he server. Mail provider is mailgun, and I am using the same provider from dev machine and production.
Also, I confirmed the $user object exists.
I can't explain why, but when I moved the email to a queue it worked.

Docusign Connect API : Not receiving request parameters in Rails 4 app

I have a docusign account, where I am creating an envelope of multiple/single documents and trying to send them through "Connect" to a particular endpoint/url after signing of the documents is done.
Now I have two applications for the endpoint url.
The first application is a Rails 2.3.1 app in which I get all the params including byte streams of the files sent through docusign.
This works fine.
The second application is a Rails 4.2.2 with ruby 2.2.2 . Now in this application, when I receive the request from the docusign, the request does not contain any params.
Can any one tell why there is difference in the behavior between Rails 2.3.1 and Rails 4.2.2.
Please Note in both the cases , the request is a POST request.
Update:
We have deployed a sample Rails 4 app on Heroku. Below is the link:
https://aqueous-harbor-4271.herokuapp.com/docusign/consume
which can be used to test a POST request that docusign sends through connect api. Just set up the connection endpoint as the above URL.
It just renders the incoming request parameters in json as response.
Vipul said, "The issue has been fixed. It was related to Rails 4 stack where in it truncates the request parameters if the request method is POST and content type is application/xml. No issue with docusign."
I'm putting the answer here so this doesn't show up as an unanswered question when searching Stack Overflow.

Web.config - PayPal IPN Listener - HTTP error code 500: Internal Server Error

I am trying to get my PayPal IPN Listener to work on my Live environment, it works on Staging perfectly and the issue is something to do with the web.config file:
(http://pastebin.com/B8YhJEZK)
I am using "https://developer.paypal.com/us/cgi-bin/devscr" and the Instant Payment Notification (IPN) simulator to test the web service however I am getting the following:
"IPN delivery failed. HTTP error code 500: Internal Server Error"
You might want to read this announcment from PayPal in regards to some changes they made to their Instant Notification Service (ipn).
enter link description here
also, check your code and see if you have something similar to this:
$fp = fsockopen($host,"80",$err_num,$err_str,30);
And try changing it to something like this:
$fp = fsockopen('ssl://'.$host,"443",$err_num,$err_str,30);