Quantcast

Some problems getting the email to work

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Some problems getting the email to work

Jorge Costa
This post was updated on .
Hi,

After checking with our network administrators. I got in test email the following messages in sonar.log

2012.06.19 10:48:15 ERROR o.s.p.e.EmailNotificationChannel  Fail to send test email to: jorge.costa@xxxxx.com
org.apache.commons.mail.EmailException: Sending the email to the following server failed : mail.xxxxx.fi:25
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: mail.xxxxx.fi, port: 25
Caused by: java.net.SocketException: Permission denied: connect

Settings:
Use secure connection:
empty user and password.

Im using sonar 3.1

There is this issue http://jira.codehaus.org/browse/SONARPLUGINS-1002 with the plugin but since this has been merged into core im not sure if this has been also fixed there.

Im not sure why im getting permission denied when the admin said there was no security when using trusted @xxxxx.com from field.

Thanks in advance

Jorge Costa


Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some problems getting the email to work

Patroklos Papapetrou
Hi  Jorge  

Does your mail server allow anonymous sends? I think this is your problem, since you have not set valid username and password.
Try to use a valid combination of username/password.

2012/6/19 jmecosta <[hidden email]>
Hi,

After checking with our network administrators. I got in test email the
following messages in sonar.log

2012.06.19 10:48:15 ERROR o.s.p.e.EmailNotificationChannel  Fail to send
test email to: [hidden email]
org.apache.commons.mail.EmailException: Sending the email to the following
server failed : mail.xxxxx.fi:25
Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
mail.tekla.fi, port: 25
Caused by: java.net.SocketException: Permission denied: connect

Settings:
Use secure connection:
empty user and password.

Im using sonar 3.1

There is this issue http://jira.codehaus.org/browse/SONARPLUGINS-1002 with
the plugin but since this has been merged into core im not sure if this has
been also fixed there.

Im not sure why im getting permission denied when the admin said there was
no security when using trusted @xxxxx.com from field.

Thanks in advance

Jorge Costa




--
View this message in context: http://sonar.15.n6.nabble.com/Some-problems-getting-the-email-to-work-tp4999941.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some problems getting the email to work

Evgeny Mandrikov
Hi Jorge,

On my side : I believe that there is a firewall (on Sonar machine or on mail-server machine) which blocks access to port 25.

On Tue, Jun 19, 2012 at 4:26 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi  Jorge  

Does your mail server allow anonymous sends? I think this is your problem, since you have not set valid username and password.
Try to use a valid combination of username/password.

2012/6/19 jmecosta <[hidden email]>
Hi,

After checking with our network administrators. I got in test email the
following messages in sonar.log

<a href="tel:2012.06.19%2010" value="+12012061910" target="_blank">2012.06.19 10:48:15 ERROR o.s.p.e.EmailNotificationChannel  Fail to send
test email to: [hidden email]
org.apache.commons.mail.EmailException: Sending the email to the following
server failed : mail.xxxxx.fi:25
Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
mail.tekla.fi, port: 25
Caused by: java.net.SocketException: Permission denied: connect

Settings:
Use secure connection:
empty user and password.

Im using sonar 3.1

There is this issue http://jira.codehaus.org/browse/SONARPLUGINS-1002 with
the plugin but since this has been merged into core im not sure if this has
been also fixed there.

Im not sure why im getting permission denied when the admin said there was
no security when using trusted @xxxxx.com from field.

Thanks in advance

Jorge Costa




--
View this message in context: http://sonar.15.n6.nabble.com/Some-problems-getting-the-email-to-work-tp4999941.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some problems getting the email to work

Jorge Costa
Hi,

From the admin, he mentioned that there is no need for password/username. Also we have this working in other  services like TC fine.

What i was also wondering was the possibility of firewall in the sonar machine, i don't believe the smtp server is blocking since TC is able to do it. I tried creating rules for both wrapper.exe and all ports allowing all traffic but did not work.

Another thing is that from the email server there is no log of connections from sonar. I open with wire shark and it seems that there is packets being sent by sonar. So needs to be something in the middle.

Im guessing that likely is vmware server doing it? Does this seems a common problem?

JC



Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some problems getting the email to work

Evgeny Mandrikov
This seems like a problem, which doesn't relate to Sonar ;)

On Tue, Jun 19, 2012 at 6:12 PM, jmecosta <[hidden email]> wrote:
Hi,

From the admin, he mentioned that there is no need for password/username.
Also we have this working in other  services like TC fine.

What i was also wondering was the possibility of firewall in the sonar
machine, i don't believe the smtp server is blocking since TC is able to do
it. I tried creating rules for both wrapper.exe and all ports allowing all
traffic but did not work.

Another thing is that from the email server there is no log of connections
from sonar. I open with wire shark and it seems that there is packets being
sent by sonar. So needs to be something in the middle.

Im guessing that likely is vmware server doing it? Does this seems a common
problem?

JC





--
View this message in context: http://sonar.15.n6.nabble.com/Some-problems-getting-the-email-to-work-tp4999941p4999950.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some problems getting the email to work

Jorge Costa
Definitively rule out sonar, installed sonar in a different vmware machine and email works there.

Need to bother again infra admins.

thanks

JC
Best Regards
Jorge Costa
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some problems getting the email to work

Jorge Costa
Hi,

So got back to this, and its not a problem with firewall. Ive installed jenkins in the same machine and try and it works. The difference, jre version.

The problems described above resulted when using jre

java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b22)
Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode, sharing)

Then ive changed to jre supplied by jenkins
C:\sonar-3.1.1\bin\windows-x86-32>"C:\Program Files (x86)\Jenkins\jre\bin\java.exe" -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode)

And then i try, and got the following exception:

Caused by: javax.mail.MessagingException: Exception reading response
        at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611) ~[na:na]
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369) ~[na:na]
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412) ~[na:na]
        at javax.mail.Service.connect(Service.java:288) ~[na:na]
        at javax.mail.Service.connect(Service.java:169) ~[na:na]
        at javax.mail.Service.connect(Service.java:118) ~[na:na]
        at javax.mail.Transport.send0(Transport.java:188) ~[na:na]
        at javax.mail.Transport.send(Transport.java:118) ~[na:na]
        at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232) ~[na:na]
        ... 249 common frames omitted
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.6.0_26]
        at java.net.SocketInputStream.read(Unknown Source) ~[na:1.6.0_26]
        at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110) ~[na:na]
        at java.io.BufferedInputStream.fill(Unknown Source) ~[na:1.6.0_26]
        at java.io.BufferedInputStream.read(Unknown Source) ~[na:1.6.0_26]
        at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88) ~[na:na]
        at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1589) ~[na:na]
        ... 257 common frames omitted

I notice that in jenkins the response from the server is really slow but it works after some time, is there any way of configuring this timeout value in the wrapper configuration in sonar? At least i will get this working in my server.

Thanks

JC

Best Regards
Jorge Costa
Loading...