Evening All,
Just done a new install of RT 4.2.3 on Debian 7.5 and I’m having issues with mail sometimes not being recorded when sent through rt-mailtool.
I’m running it directly from the CLI and it sometimes returns error 75 will the following traceback:
while true; do
/opt/rt-4.2.3/bin/rt-mailgate --queue general --action comment --url http://supdev.ezideas.co.uk/ < /var/mailtest.txt;
sleep 2;
done
RT server error. The RT server which handled your email did not behave as expected. It said:
Error in tempdir() using /tmp/XXXXXXXXXX: Tried to get a new temp name different to the previous value 50 times.
Something wrong with template?? (/tmp/XXXXXXXXXX) at /opt/rt-4.2.3/sbin/../lib/RT/EmailParser.pm line 476.
Stack:
[/usr/local/share/perl/5.14.2/Carp.pm:166]
[/usr/share/perl/5.14/File/Temp.pm:1562]
[/opt/rt-4.2.3/sbin/../lib/RT/EmailParser.pm:476]
[/opt/rt-4.2.3/sbin/../lib/RT/EmailParser.pm:201]
[/opt/rt-4.2.3/sbin/../lib/RT/EmailParser.pm:166]
[/opt/rt-4.2.3/sbin/../lib/RT/EmailParser.pm:136]
[/opt/rt-4.2.3/sbin/../lib/RT/Interface/Email.pm:1229]
[/opt/rt-4.2.3/share/html/REST/1.0/NoAuth/mail-gateway:61]
I’ve had a look in the EmailParser.pm and on line 476 it’s just an if statement that checks if the temporary directory is writable, as I’m running this as root that shouldn’t be an issue unless rt-mailtool is dropping it’s permissions.
I can also see it successfully creating and removing files in /tmp when it’s working, so I’m at a loss why this is happening. No problems with disc space, about 2GB free on /tmp.
Can anyone offer any suggestions?
Thanks in advance
Lee
RT server error. The RT server which handled your email did not behave
as expected. It said:
Error in tempdir() using /tmp/XXXXXXXXXX: Tried to get a new temp name
different to the previous value 50 times.
Something wrong with template?? (/tmp/XXXXXXXXXX)
at /opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm line 476.
Stack:
[/usr/local/share/perl/5.14.2/Carp.pm:166]
[/usr/share/perl/5.14/File/Temp.pm:1562]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:476]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:201]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:166]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:136]
[/opt/rt-4.2.3/sbin/…/lib/RT/Interface/Email.pm:1229]
[/opt/rt-4.2.3/share/html/REST/1.0/NoAuth/mail-gateway:61]
I’ve had a look in the EmailParser.pm and on line 476 it’s just an if
statement that checks if the temporary directory is writable, as I’m
running this as root that shouldn’t be an issue unless rt-mailtool is
dropping it’s permissions.
The error comes from the server, not rt-mailgate. Also, by default, RT
writes its tmpfiles to /opt/rt4/var, not /tmp – check that the former
is writable by your webserver.
The error comes from deep within the core tmpfile-handling module that
Perl provides. I suspect it is caused by running out of inodes, too
many subdirectories of /tmp, or something similar filesystem-related.
Thanks Alex,
The /opt/rt4/var directory is definitely writable by www-data as are all the sub-directories.
File systems look good, plenty of disk space and all have no more than 20% inode utilisation so even if there an odd spike it should have enough space.
Oddly, I’ve restarted the device tonight as I’ve done every other night (only a dev box so isn’t on all the time) and since then it’s no longer erroring so guess I’ll just have to keep an eye on it.
Lee
RT server error. The RT server which handled your email did not behave
as expected. It said:
Error in tempdir() using /tmp/XXXXXXXXXX:
Tried to get a new temp name
different to the previous value 50 times.
Something wrong with template?? (/tmp/XXXXXXXXXX)
at /opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm line 476.
Stack:
[/usr/local/share/perl/5.14.2/Carp.pm:166]
[/usr/share/perl/5.14/File/Temp.pm:1562]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:476]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:201]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:166]
[/opt/rt-4.2.3/sbin/…/lib/RT/EmailParser.pm:136]
[/opt/rt-4.2.3/sbin/…/lib/RT/Interface/Email.pm:1229]
[/opt/rt-4.2.3/share/html/REST/1.0/NoAuth/mail-gateway:61]
I’ve had a look in the EmailParser.pm and on line 476 it’s just an if
statement that checks if the temporary directory is writable, as I’m
running this as root that shouldn’t be an issue unless rt-mailtool is
dropping it’s permissions.
The error comes from the server, not rt-mailgate. Also, by default, RT
writes its tmpfiles to /opt/rt4/var, not /tmp – check that the former
is writable by your webserver.
The error comes from deep within the core tmpfile-handling module that
Perl provides. I suspect it is caused by running out of inodes, too
many subdirectories of /tmp, or something similar filesystem-related.
RT
Training - Dallas May 20-21
http://bestpractical.com/training