I'm running rundeck 2.6.4-1 on centos 7 with AWS Open JDK 1.7.0_95.
I'm creating new job without scheduled run, that I want to send notification email on success/fail with output log attached.
After running the job the mail is not send and in rundeck.log:
2016-03-22 11:59:13,835 [qtp1545044507-61] INFO grails.app.services.rundeck.services.ScheduledExecutionService - scheduling immediate job run: TEMP:admin:6:4599
2016-03-22 11:59:17,904 [quartzScheduler_Worker-6] INFO grails.app.services.rundeck.services.ExecutionUtilService - Execution successful: 4599
2016-03-22 11:59:17,951 [quartzScheduler_Worker-6] ERROR grails.app.services.rundeck.services.NotificationService - Error sending notification: Notification{eventTrigger='onsuccess', type='email', content='{"recipients":"[list of recipients hidden]","subject":"Tes mail after job success","attachLog":true}'}: class java.io.IOException: No such file or directory
java.io.IOException: No such file or directory
at java.io.File.createTempFile(File.java:2001)
at java.io.File.createTempFile(File.java:2047)
at rundeck.services.NotificationService.copyExecOutputToTempFile(NotificationService.groovy:116)
at rundeck.services.NotificationService$_triggerJobNotification_closure5.doCall(NotificationService.groovy:243)
at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy:142)
at rundeck.services.NotificationService$_triggerJobNotification_closure1.doCall(NotificationService.groovy:84)
at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy:81)
at rundeck.services.ExecutionService$_saveExecutionState_closure59.doCall(ExecutionService.groovy:2041)
at rundeck.services.ExecutionService.saveExecutionState(ExecutionService.groovy:1946)
at rundeck.quartzjobs.ExecutionJob$_saveState_closure4.doCall(ExecutionJob.groovy:480)
at rundeck.quartzjobs.ExecutionJob.withRetry(ExecutionJob.groovy:418)
at rundeck.quartzjobs.ExecutionJob.saveState(ExecutionJob.groovy:490)
at rundeck.quartzjobs.ExecutionJob.execute_internal(ExecutionJob.groovy:146)
at rundeck.quartzjobs.ExecutionJob$_execute_closure1.doCall(ExecutionJob.groovy:74)
at com.codahale.metrics.Timer.time(Timer.java:99)
at rundeck.quartzjobs.ExecutionJob.execute(ExecutionJob.groovy:73)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
It seems that output log for job can not be found. Running same job without attaching log, produces notfication mail without any error.
this is an issue with your tmp directory, such as the dir does not exist or permissions are incorrect for rundeck to write to the specified temp directory. Try making sure your temp directory is writable by rundeck server user, and/or specify the directory via the -Djava.io.tmpdir=/tmp java property at startup
Most helpful comment
this is an issue with your tmp directory, such as the dir does not exist or permissions are incorrect for rundeck to write to the specified temp directory. Try making sure your temp directory is writable by rundeck server user, and/or specify the directory via the
-Djava.io.tmpdir=/tmpjava property at startup