Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-9315

Bamboo throws NumberFormatException when trying to send mail

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.2
    • 3.1.4
    • Notifications
    • None
    • CentOS 5.5, JDK 1.6.0_24

      After restarting our Bamboo 3.1.4 server this morning, we noticed no notifications were being sent.
      When we attempted to send a test mail from the admin interface, Bamboo threw a exception.
      All of the settings appeared to be correct, but we clicked the edit button.
      Without changing any of the settings, we tried sending a test mail from the edit screen, and it worked without issue.
      We saved the configuration (having changed nothing) and emails started sending again.
      However, the issue seems to re-appear if you restarted Bamboo.
      Below is the stack-trace seen in the logs when builds attempt to send notifications while the error appears.

      2011-07-18 07:13:19,192 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-16] [EmailListener] Failed to find mail server
      java.lang.NumberFormatException: For input string: "null"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
              at java.lang.Integer.parseInt(Integer.java:449)
              at java.lang.Integer.parseInt(Integer.java:499)
              at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:398)
              at javax.mail.Service.connect(Service.java:288)
              at javax.mail.Service.connect(Service.java:169)
              at javax.mail.Service.connect(Service.java:118)
              at javax.mail.Transport.send0(Transport.java:188)
              at javax.mail.Transport.send(Transport.java:118)
              at alt.javax.mail.TransportImpl.send(TransportImpl.java:18)
              at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:155)
              at com.atlassian.bamboo.mail.EmailListener.handleEvent(EmailListener.java:64)
              at com.atlassian.event.legacy.LegacyListenerHandler$LegacyListenerInvoker.invoke(LegacyListenerHandler.java:55)
              at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50)
              at java.lang.Thread.run(Thread.java:662)
      

            [BAM-9315] Bamboo throws NumberFormatException when trying to send mail

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 1436827 ] New: JAC Bug Workflow v3 [ 3380312 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: Bamboo Workflow 2016 v1 [ 1419035 ] New: Bamboo Workflow 2016 v1 - Restricted [ 1436827 ]
            Marek Went (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2014 v2 [ 613562 ] New: Bamboo Workflow 2016 v1 [ 1419035 ]
            James Dumay made changes -
            Workflow Original: Bamboo Workflow 2014 [ 598559 ] New: Bamboo Workflow 2014 v2 [ 613562 ]
            James Dumay made changes -
            Workflow Original: Bamboo Workflow 2010 [ 316134 ] New: Bamboo Workflow 2014 [ 598559 ]
            bmccoy made changes -
            Fix Version/s New: 3.2 [ 17301 ]
            Fix Version/s Original: 3.2.1 [ 19392 ]
            Resolution New: Fixed [ 1 ]
            Status Original: To be reviewed [ 10026 ] New: Resolved [ 5 ]
            bmccoy made changes -
            Status Original: In Progress [ 3 ] New: To be reviewed [ 10026 ]
            bmccoy made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]

            bmccoy added a comment -

            Well we will leave it as an unsolved mystery then. Please let us know if it happens again.
            I have made this code a bit more defensive in 3.2 so if it happens again it hopefully wont blow up quite as badly!

            Cheers,
            Brydie

            bmccoy added a comment - Well we will leave it as an unsolved mystery then. Please let us know if it happens again. I have made this code a bit more defensive in 3.2 so if it happens again it hopefully wont blow up quite as badly! Cheers, Brydie

            Hey Krystian,
            The restart happened and the mail settings were preserved. Seems to have been a transient issue.

            David Corley added a comment - Hey Krystian, The restart happened and the mail settings were preserved. Seems to have been a transient issue.

              bmccoy bmccoy
              b0d88db9bee7 David Corley
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: