Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-4906

Decanter e-mail alerter can't use javamail authentication

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • decanter-1.4.0
    • decanter
    • None

    Description

      The Decanter e-mail alerter works fine when using a local MTA (like local postfix), but fails to use a remote SMTP server:

      016-11-07 14:23:54,067 | ERROR | Thread-31        | EmailAlerter                    
      | Can't send the alert e-mail
      javax.mail.AuthenticationFailedException: failed to connect, no password
      specified?
      	at javax.mail.Service.connect(Service.java:329)[74:javax.mail:1.4.7]
      	at javax.mail.Service.connect(Service.java:176)[74:javax.mail:1.4.7]
      	at javax.mail.Service.connect(Service.java:125)[74:javax.mail:1.4.7]
      	at javax.mail.Transport.send0(Transport.java:194)[74:javax.mail:1.4.7]
      	at javax.mail.Transport.send(Transport.java:124)[74:javax.mail:1.4.7]
      	at
      org.apache.karaf.decanter.sla.email.EmailAlerter.handleEvent(EmailAlerter.java:101)[81:org.apache.karaf.decanter.sla.email:1.1.0]
      	at
      org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[84:org.apache.karaf.services.eventadmin:4.0.2]
      	at
      org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[84:org.apache.karaf.services.eventadmin:4.0.2]
      	at
      java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_71]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_71]
      	at
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_71]
      	at
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_71]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
      2016-11-07 14:23:54,052 | ERROR | Thread-26        | EmailAlerter                    
      | Can't send the alert e-mail
      javax.mail.AuthenticationFailedException: failed to connect, no password
      specified?
      	at javax.mail.Service.connect(Service.java:329)[74:javax.mail:1.4.7]
      	at javax.mail.Service.connect(Service.java:176)[74:javax.mail:1.4.7]
      	at javax.mail.Service.connect(Service.java:125)[74:javax.mail:1.4.7]
      	at javax.mail.Transport.send0(Transport.java:194)[74:javax.mail:1.4.7]
      	at javax.mail.Transport.send(Transport.java:124)[74:javax.mail:1.4.7]
      	at
      org.apache.karaf.decanter.sla.email.EmailAlerter.handleEvent(EmailAlerter.java:101)[81:org.apache.karaf.decanter.sla.email:1.1.0]
      	at
      org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[84:org.apache.karaf.services.eventadmin:4.0.2]
      	at
      org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[84:org.apache.karaf.services.eventadmin:4.0.2]
      	at
      java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_71]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_71]
      	at
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_71]
      	at
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_71]
      

      Even if the configuration contains the expected properties:

      #
      # Decanter SLA e-mail alerter configuration
      #
      
      # From e-mail address
      from=foo@bar.com
      
      # To e-mail address
      to=foo@bar.com
      
      # Hostname of the SMTP server
      host=smtp.office365.com
      
      # Port of the SMTP server
      port=587
      
      # enable SMTP auth
      auth=true
      
      # enable starttls and ssl
      starttls=true
      ssl=false
      
      # Optionally, username for the SMTP server
      username=<username>
      
      # Optionally, password for the SMTP server
      password=<password>
      

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            jbonofre Jean-Baptiste Onofré
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: