Project

General

Profile

Bug #27994

Add email wrapper to redirect stdout/stderr

Added by kroko shmoko about 1 year ago. Updated 10 months ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I have a cron job that stopped sending emails.
I did not catch it at first, because there is autofilter that screams when emails with specific keywords are received from notifier, it did not scream about not receiving any :)
So I started investigating and the issue was on FreeNAS-11.1-RELEASE which was affected.
Then I upgraded to the newest FreeNAS-11.1-U1, although it does not mention any email https://www.ixsystems.com/blog/library/freenas-11-1-u1/ i was hopeful :)
But the issue it still is there (thus no regression in 11.1-U1 from 11.1)

The setup is as follows and that can be easily recreated.

Under Tasks/Cron Jobs in FreeNAS GUI I've set up an entry.

user: root
command: /bin/bash /mnt/vol/offsiteconfigs/nas-backup-to-offsite-nas-runner.sh
runs every day.
redirect stdout: Y
redirect stderr: N
enabled: Y

Contents of nas-backup-to-offsite-nas-runner.sh

#!/bin/bash

TASKNAME="nas-backup-to-offsite-nas" 

# -------------------------
# for emailing
BACKUP_TASK_NAME="NAS offsite backup daily" 
EMAIL_TO=dns@host.tld

# count screen processes
counter=0
for session in $(/usr/local/bin/screen -ls | grep ${TASKNAME})
do
    counter=$((counter+1))
done

# if a screen process is running, then do not start anything, exit
if [ "$((counter))" -gt 0 ]
then
  # /bin/echo "Screen named ${name} running, doing nothing" 
  TIME="$(date +%Y-%m-%d-%H:%M:%S)" 
  /bin/echo "Screen already running, task busy on ${TIME}." | /usr/bin/mail -s "${BACKUP_TASK_NAME} - TASK BUSY" $EMAIL_TO
  exit 0
fi

# /bin/echo "Launching screen" 
screen -dm -S ${TASKNAME} /bin/bash /mnt/vol/offsiteconfigs/nas-backup-to-offsite-nas-mailtest.sh

exit 0

Contents of nas-backup-to-offsite-nas-runner.sh (which is obviously now just set as email tester for this issue)

#!/bin/bash

TIMESTART="$(date +%Y-%m-%d-%H:%M:%S)" 
TIMEEND="$(date +%Y-%m-%d-%H:%M:%S)" 
BACKUP_TASK_NAME="MAILTEST" 
EMAIL_TO=dns@host.tld
/bin/echo "Rsync task started on ${TIMESTART} and ended on ${TIMEEND} - SEEMS OK." | /usr/bin/mail -s "${BACKUP_TASK_NAME} - FINISHED - OK" $EMAIL_TO
exit 0

is a real email address that I use for sending out notifications from different machines. Has SMTP server, configured in System / Email in GUI. Yes, sending test email from FreeNAS GUI works.

When I log in via SSH into the NAS (as root, bash shell) and do

/bin/bash /mnt/vol/offsiteconfigs/nas-backup-to-offsite-nas-mailtest.sh

I do receive email.

When I do

/bin/bash /mnt/vol/offsiteconfigs/nas-backup-to-offsite-nas-runner.sh

I do not receive e-mail.

Thus something has changed about how email from within screen works, not cron.
So far the setup described above has worked for years.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEBUGING

%%%% __ 1

When I launch runner (the case where email is not sent)

cd /var/log &&
> debug.log && > maillog && > messages && \
/bin/bash /mnt/vol/offsiteconfigs/nas-backup-to-offsite-nas-runner.sh && \
sleep 8 && \
echo -e "-------########--------\n" && cat debug.log && echo -e "-------########--------\n" && cat maillog && echo -e "-------########--------\n" && cat maillog && echo -e "-------########--------\n" 

Only debug.log has something

-------########--------

Jan 26 06:14:44 nas sudo:     root : TTY=pts/2 ; PWD=/var/db/system/syslog-bd9055260d994501a6a389f2eacb609a/log ; USER=root ; COMMAND=/etc/find_alias_for_smtplib.py -i dns@host.tld
Jan 26 06:14:45 nas uwsgi: [ws4py:360] Closing message received (1000) 'b'''
-------########--------

-------########--------

-------########--------

%%%% __ 2

When I launch mailtest (the case where email is sent)

cd /var/log &&
> debug.log && > maillog && > messages && \
/bin/bash /mnt/vol/offsiteconfigs/nas-backup-to-offsite-nas-mailtest.sh && \
sleep 8 && \
echo -e "-------########--------\n" && cat debug.log && echo -e "-------########--------\n" && cat maillog && echo -e "-------########--------\n" && cat maillog && echo -e "-------########--------\n" 

it spits out

-------########--------

Jan 26 06:15:17 nas sudo:     root : TTY=pts/1 ; PWD=/var/db/system/syslog-bd9055260d994501a6a389f2eacb609a/log ; USER=root ; COMMAND=/etc/find_alias_for_smtplib.py -i dns@host.tld
Jan 26 06:15:19 nas /find_alias_for_smtplib.py: [ws4py:360] Closing message received (1000) 'b'''
-------########--------

Jan 26 06:15:19 nas /find_alias_for_smtplib.py[7159]: sending mail to dns@host.tld
To: dns@host.tld
Subject: MAILTEST - FINISHED - OK

Rsync task started on 2018-01-26-06:15:17 and ended on 2018-01-26-06:15:17 - SEEMS OK.
Jan 26 04:15:19 nas /middlewared[233]: sending mail to dns@host.tld
Content-Type: text/plain; charset="utf-8" 
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Subject: MAILTEST - FINISHED - OK
From: notify
-------########--------

Jan 26 06:15:19 nas /find_alias_for_smtplib.py[7159]: sending mail to dns@host.tld
To: dns@host.tld
Subject: MAILTEST - FINISHED - OK

Rsync task started on 2018-01-26-06:15:17 and ended on 2018-01-26-06:15:17 - SEEMS OK.
Jan 26 04:15:19 nas /middlewared[233]: sending mail to dns@host.tld
Content-Type: text/plain; charset="utf-8" 
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Subject: MAILTEST - FINISHED - OK
From: notify
-------########--------

Debug log has same /etc/find_alias_for_smtplib.py
However here it contains some Closing message received (1000) 'b''' for the /find_alias_for_smtplib.py that first case lacks.
And of course maillog as well as messages report that email was sent.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I saw another ticket about emails in bugtracker and it suggests manually tinkering find_alias_for_smtplib.py and it helped OP to solve it https://redmine.ixsystems.com/issues/27496#note-26

So, is it all about find_alias_for_smtplib.py which breaks? How to proceed?

Thanks!


Related issues

Has duplicate FreeNAS - Bug #28085: FreeNAS cron jobs stderr stdout emailClosed2018-01-31

Associated revisions

Revision 0a36e175 (diff)
Added by William Grzybowski about 1 year ago

fix(mail): wrapper to redirect stdout/stderr

Ticket: #27994

Revision 025014a3 (diff)
Added by William Grzybowski about 1 year ago

fix(mail): wrapper to redirect stdout/stderr

Ticket: #27994

History

#1 Updated by kroko shmoko about 1 year ago

Oh, and if asked, then yes - if I launch (manually, or cron) nas-backup-to-offsite-nas-runner.sh it runs nas-backup-to-offsite-nas-mailtest.sh.
So that part of chain works, the backups themselves are still working every day, just emails are not sent. But emails are critical!

direct environment

printenv
SSH_CONNECTION=XX.XX.XX.XX 52583 XX.XX.XX.XX 22
LANG=en_US.UTF-8
MM_CHARSET=UTF-8
USER=root
ENV=/root/.shrc
PAGER=more
PWD=/var/log
HOME=/root
SSH_CLIENT=XX.XX.XX.XX 52583 22
SSH_TTY=/dev/pts/1
MAIL=/var/mail/root
SHELL=/usr/local/bin/bash
TERM=xterm-256color
SHLVL=1
BLOCKSIZE=K
LOGNAME=root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/usr/local/fusion-io
_=/usr/bin/printenv
OLDPWD=/var/log

screen environment

printenv
STY=8341.pts-1.nas
SSH_CONNECTION=XX.XX.XX.XX 52583 XX.XX.XX.XX 22
LANG=en_US.UTF-8
OLDPWD=/var/log
MM_CHARSET=UTF-8
USER=root
ENV=/root/.shrc
PAGER=more
PWD=/var/log
HOME=/root
WINDOW=0
SSH_CLIENT=XX.XX.XX.XX 52583 22
SSH_TTY=/dev/pts/1
MAIL=/var/mail/root
SHELL=/usr/local/bin/bash
TERM=screen
SHLVL=2
BLOCKSIZE=K
LOGNAME=root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/usr/local/fusion-io
TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\
        :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
        :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
        :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
        :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
        :li#92:co#209:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
        :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\
        :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\
        :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
        :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\
        :se=\E[23m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\
        :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:G0:\
        :as=\E(0:ae=\E(B:\
        :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\
        :Km=\E[M:k0=\E[10~:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
        :k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\
        :k;=\E[21~:F1=\E[23~:F2=\E[24~:kb=^H:K2=\EOE:kB=\E[Z:\
        :kh=\E[1~:@1=\E[1~:kH=\E[4~:@7=\E[4~:kN=\E[6~:kP=\E[5~:\
        :kI=\E[2~:kD=\E[3~:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:km:
_=/usr/bin/printenv

if i manually enter screen

screen -S "nas-backup-to-offsite-nas" 

and execute

/bin/echo "SENT FROM SCREEN MANUALLY" | /usr/bin/mail -s "SENT FROM SCREEN MANUALLY" dns@host.tld

email is received

#2 Updated by Dru Lavigne about 1 year ago

  • Status changed from Unscreened to Not Started
  • Assignee changed from Release Council to William Grzybowski

#3 Updated by kroko shmoko about 1 year ago

I revisited ticket state and found a mistake that might introduce confusion.

is a real email address that I use for sending out notifications from different machines. Has SMTP server, configured in System / Email in GUI. Yes, sending test email from FreeNAS GUI works.

Thus, system email is configured to send from (the correction), and things are sent to (as seen in bash scripts). Although technically IMHO it made no difference if I sent from an email address to itself, it should work nevertheless, just wanted to be 100% correct on the setup.

Thanks! :)

#4 Updated by Dru Lavigne about 1 year ago

  • Target version set to 11.2-BETA1

#5 Updated by Dru Lavigne about 1 year ago

  • Has duplicate Bug #28085: FreeNAS cron jobs stderr stdout email added

#6 Updated by William Grzybowski about 1 year ago

  • Status changed from Not Started to Blocked
  • Reason for Blocked set to Waiting for feedback

Hi,

Can you please attach the output of:

  1. midclt call core.get_jobs | jq .

Thanks

#7 Updated by kroko shmoko about 1 year ago

[
  {
    "id": 1,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "nas.host.tld daily security run output",
        "text": "\nnas.host.tld kernel log messages:\n> SMP: AP CPU #3 Launched!\n> Timecounter \"TSC-low\" frequency 1745996446 Hz quality 1000\n> ugen1.1: <Intel EHCI root HUB> at usbus1\n> uhub3: 8 ports with 8 removable, self powered\n> ada0: Serial Number WD-WX31D944C7HK\n> ada0: 600.000MB/s transfersda1: Serial Number 0018F30C9FDCBE60810C465D\n>  (SATA 3.x, UDMA6, PIO 8192bytes)\n> da1: quirks=0x2<NO_6_BYTE>\n> da2: ada1: <Kingston DT microDuo 3.0 PMAP> Removable Direct Access SPC-4 SCSI device\n> <WDC WD60EFRX-68MYMN1 82.00A82> ACS-2 ATA SATA 3.x device\n> da0 at umass-sim0 bus 0 scbus7 target 0 lun 0\n> da0: ada2: 5723166MB (11721045168 512 byte sectors)\n> <Generic STORAGE DEVICE 0903> Removable Direct Access SPC-4 SCSI device\n> da0: quirks=0x3<NO_SYNC_CACHE,NO_6_BYTE>\n> ada3: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)\n> ums0 on uhub1\n> pid 51675 (python3.6), uid 0: exited on signal 6 (core dumped)\n> pid 51674 (sudo), uid 0: exited on signal 6\n\n-- End of security output --\n",
        "interval": null,
        "channel": null,
        "to": [
          "dns@host.tld" 
        ],
        "timeout": 300,
        "queue": true,
        "extra_headers": {
          "To": "dns@host.tld",
          "Subject": "nas.host.tld daily security run output",
          "X-Mailer": "FreeNAS",
          "X-FreeNAS-Host": "nas.host.tld",
          "From": "notify@host.tld" 
        },
        "attachments": false
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1517878865920
    },
    "time_finished": {
      "$date": 1517878866402
    }
  },
  {
    "id": 2,
    "method": "update.download",
    "arguments": [],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": null,
    "error": "'coroutine' object has no attribute 'result'",
    "exception": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.6/site-packages/middlewared/job_process.py\", line 118, in <module>\n    print(json.dumps(coro.result()))\nAttributeError: 'coroutine' object has no attribute 'result'\n",
    "state": "FAILED",
    "time_started": {
      "$date": 1517883180360
    },
    "time_finished": {
      "$date": 1517883191666
    }
  },
  {
    "id": 3,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "WARP UPS 01 report generated by nas.host.tld",
        "text": "COMMBAD - Eaton_5S1000i_01\n",
        "interval": null,
        "channel": null,
        "to": [
          "dns@host.tld" 
        ],
        "timeout": 300,
        "queue": true,
        "extra_headers": {
          "To": "dns@host.tld",
          "Subject": "WARP UPS 01 report generated by nas.host.tld",
          "X-Mailer": "FreeNAS",
          "X-FreeNAS-Host": "nas.host.tld",
          "From": "notify@host.tld" 
        },
        "attachments": false
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1517884420020
    },
    "time_finished": {
      "$date": 1517884420462
    }
  },
  {
    "id": 4,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "WARP UPS 01 report generated by nas.host.tld",
        "text": "COMMBAD - Eaton_5S1000i_01\n",
        "interval": null,
        "channel": null,
        "to": [
          "dns@host.tld" 
        ],
        "timeout": 300,
        "queue": true,
        "extra_headers": {
          "To": "dns@host.tld",
          "Subject": "WARP UPS 01 report generated by nas.host.tld",
          "X-Mailer": "FreeNAS",
          "X-FreeNAS-Host": "nas.host.tld",
          "From": "notify@host.tld" 
        },
        "attachments": false
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1517884420058
    },
    "time_finished": {
      "$date": 1517884420462
    }
  },
  {
    "id": 5,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "nas.host.tld daily security run output",
        "text": "\nnas.host.tld kernel log messages:\n> ugen0.2: <EATON 5S> at usbus0 (disconnected)\n> ugen0.2: <EATON 5S> at usbus0\n> pid 11431 (python3.6), uid 0: exited on signal 6 (core dumped)\n> pid 11430 (sudo), uid 0: exited on signal 6\n\n-- End of security output --\n",
        "interval": null,
        "channel": null,
        "to": [
          "dns@host.tld" 
        ],
        "timeout": 300,
        "queue": true,
        "extra_headers": {
          "To": "dns@host.tld",
          "Subject": "nas.host.tld daily security run output",
          "X-Mailer": "FreeNAS",
          "X-FreeNAS-Host": "nas.host.tld",
          "From": "notify@host.tld" 
        },
        "attachments": false
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1517965265784
    },
    "time_finished": {
      "$date": 1517965266212
    }
  },
  {
    "id": 6,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "Cron <root@nas> /usr/local/libexec/nas/scrub -t 7 freenas-boot",
        "text": "   starting scrub of pool 'freenas-boot'\n",
        "interval": null,
        "channel": null,
        "to": [
          "dns@host.tld" 
        ],
        "timeout": 300,
        "queue": true,
        "extra_headers": {
          "From": "notify@host.tld",
          "To": "dns@host.tld",
          "Subject": "Cron <root@nas> /usr/local/libexec/nas/scrub -t 7 freenas-boot",
          "X-Cron-Env": "<SHELL=/bin/sh>",
          "X-Mailer": "FreeNAS",
          "X-FreeNAS-Host": "nas.host.tld" 
        },
        "attachments": false
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1517967904312
    },
    "time_finished": {
      "$date": 1517967904542
    }
  },
  {
    "id": 7,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "nas.host.tld: scrub finished",
        "text": "scrub of pool 'freenas-boot' finished" 
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1517968088894
    },
    "time_finished": {
      "$date": 1517968089142
    }
  },
  {
    "id": 8,
    "method": "update.download",
    "arguments": [],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": null,
    "error": "'coroutine' object has no attribute 'result'",
    "exception": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.6/site-packages/middlewared/job_process.py\", line 118, in <module>\n    print(json.dumps(coro.result()))\nAttributeError: 'coroutine' object has no attribute 'result'\n",
    "state": "FAILED",
    "time_started": {
      "$date": 1517969580400
    },
    "time_finished": {
      "$date": 1517969589906
    }
  },
  {
    "id": 9,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "nas.host.tld daily security run output",
        "text": "\nnas.host.tld kernel log messages:\n> pid 73900 (python3.6), uid 0: exited on signal 6 (core dumped)\n> pid 73899 (sudo), uid 0: exited on signal 6\n\n-- End of security output --\n",
        "interval": null,
        "channel": null,
        "to": [
          "dns@host.tld" 
        ],
        "timeout": 300,
        "queue": true,
        "extra_headers": {
          "To": "dns@host.tld",
          "Subject": "nas.host.tld daily security run output",
          "X-Mailer": "FreeNAS",
          "X-FreeNAS-Host": "nas.host.tld",
          "From": "notify@host.tld" 
        },
        "attachments": false
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1518051665798
    },
    "time_finished": {
      "$date": 1518051666342
    }
  },
  {
    "id": 10,
    "method": "update.download",
    "arguments": [],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": null,
    "error": "'coroutine' object has no attribute 'result'",
    "exception": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.6/site-packages/middlewared/job_process.py\", line 118, in <module>\n    print(json.dumps(coro.result()))\nAttributeError: 'coroutine' object has no attribute 'result'\n",
    "state": "FAILED",
    "time_started": {
      "$date": 1518055980414
    },
    "time_finished": {
      "$date": 1518055991370
    }
  },
  {
    "id": 11,
    "method": "mail.send",
    "arguments": [
      {
        "subject": "nas.host.tld daily security run output",
        "text": "\nnas.host.tld kernel log messages:\n> pid 38024 (python3.6), uid 0: exited on signal 6 (core dumped)\n> pid 38023 (sudo), uid 0: exited on signal 6\n\n-- End of security output --\n",
        "interval": null,
        "channel": null,
        "to": [
          "dns@host.tld" 
        ],
        "timeout": 300,
        "queue": true,
        "extra_headers": {
          "To": "dns@host.tld",
          "Subject": "nas.host.tld daily security run output",
          "X-Mailer": "FreeNAS",
          "X-FreeNAS-Host": "nas.host.tld",
          "From": "notify@host.tld" 
        },
        "attachments": false
      }
    ],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": true,
    "error": null,
    "exception": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1518138065510
    },
    "time_finished": {
      "$date": 1518138066212
    }
  },
  {
    "id": 12,
    "method": "update.download",
    "arguments": [],
    "progress": {
      "percent": null,
      "description": null,
      "extra": null
    },
    "result": null,
    "error": "'coroutine' object has no attribute 'result'",
    "exception": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.6/site-packages/middlewared/job_process.py\", line 118, in <module>\n    print(json.dumps(coro.result()))\nAttributeError: 'coroutine' object has no attribute 'result'\n",
    "state": "FAILED",
    "time_started": {
      "$date": 1518142380408
    },
    "time_finished": {
      "$date": 1518142389068
    }
  }
]

#8 Updated by William Grzybowski about 1 year ago

Are you getting all of these "nas.host.tld daily security run output" emails?

Would you be willing to join in a TeamViewer session to debug this?

#9 Updated by kroko shmoko about 1 year ago

Yes.

Yes.

#10 Updated by William Grzybowski about 1 year ago

kroko shmoko wrote:

Yes.

Yes.

Just send me the credentials when you are ready (in here as private note or william at ixsystems com)

Thanks

#11 Updated by kroko shmoko about 1 year ago

email sent. awaiting.

#12 Updated by William Grzybowski about 1 year ago

  • Status changed from Blocked to Not Started
  • Reason for Blocked deleted (Waiting for feedback)

The issue here is python segfaulting when running from screen -dm.

#13 Avatar?id=13649&size=24x24 Updated by Ben Gadd about 1 year ago

  • Target version changed from 11.2-BETA1 to 11.2-RC2

#14 Updated by William Grzybowski about 1 year ago

  • Status changed from Not Started to Done

Unfortunately it may be a bit too late to get a fix for 11.1-U2 but one has committed which will for sure land in 11.2.

#15 Updated by William Grzybowski about 1 year ago

  • Category changed from OS to Middleware

#16 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.2-RC2 to 11.2-BETA1

#17 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Emails not sent from within screen to Add email wrapper to redirect stdout/stderr
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#18 Updated by Dru Lavigne 12 months ago

  • Status changed from Done to Ready for Testing

#19 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Severity set to New
  • Needs QA changed from Yes to No

These scripts work on the latest build. I'm getting no issues with the mail server, the chron job, the two bash scripts, or screen -dm.

#20 Updated by Dru Lavigne 10 months ago

  • Status changed from Ready for Testing to Done

Also available in: Atom PDF