Github user ijokarumawak commented on the issue:

    https://github.com/apache/nifi/pull/483
  
    @JPercivall @trixpan Great review process, I learned a lot from it, thank 
you!
    
    I pulled the latest PR and tested, Unit test passed, however, I got 
following error if `Maximum number of SMTP connection` is 1. The error didn't 
occur with allowing more than 2 SMTP connection.
    It seems like the synchronized block and wait in 
SMTPMessagingHandlerFactory.data() causing this.
    
    ```
    2016-07-11 10:26:12,841 ERROR [Timer-Driven Process Thread-4] 
o.a.nifi.processors.standard.PutEmail 
PutEmail[id=837842bb-c28f-4866-919b-a9bb32003bdc] Failed to send email for 
StandardFlowFileRecord[uuid=25082964-6b4e-43bf-b897-063521b70b90,claim=StandardContentClaim
 [resourceClaim=StandardResourceClaim[id=1468200056438-1, container=default, 
section=1], offset=500, length=10],offset=0,name=23170008565393,size=10]: Could 
not connect to SMTP host: 127.0.0.1, port: 10024, response: 421; routing to 
failure: javax.mail.MessagingException: Could not connect to SMTP host: 
127.0.0.1, port: 10024, response: 421
    2016-07-11 10:26:12,842 ERROR [Timer-Driven Process Thread-4] 
o.a.nifi.processors.standard.PutEmail
    javax.mail.MessagingException: Could not connect to SMTP host: 127.0.0.1, 
port: 10024, response: 421
            at 
com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1949) 
~[mail-1.4.7.jar:1.4.7]
            at 
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654) 
~[mail-1.4.7.jar:1.4.7]
            at javax.mail.Service.connect(Service.java:295) 
~[mail-1.4.7.jar:1.4.7]
            at javax.mail.Service.connect(Service.java:176) 
~[mail-1.4.7.jar:1.4.7]
            at javax.mail.Service.connect(Service.java:125) 
~[mail-1.4.7.jar:1.4.7]
            at javax.mail.Transport.send0(Transport.java:194) 
~[mail-1.4.7.jar:1.4.7]
            at javax.mail.Transport.send(Transport.java:124) 
~[mail-1.4.7.jar:1.4.7]
            at 
org.apache.nifi.processors.standard.PutEmail.send(PutEmail.java:462) 
~[nifi-standard-processors-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
            at 
org.apache.nifi.processors.standard.PutEmail.onTrigger(PutEmail.java:341) 
~[nifi-standard-processors-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
            at 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
 [nifi-api-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
            at 
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1077)
 [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
            at 
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136)
 [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
            at 
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
 [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
            at 
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:123)
 [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
            at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[na:1.8.0_77]
            at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[na:1.8.0_77]
            at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [na:1.8.0_77]
            at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [na:1.8.0_77]
            at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[na:1.8.0_77]
            at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[na:1.8.0_77]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to