load-mail-server-logs throws error related to find_files_in_locale_folders

6 views
Skip to first unread message

Andrei Cristian Petcu

unread,
Sep 26, 2016, 1:19:04 PM9/26/16
to Alaveteli Dev
Hi,

I have an issue with my server. It keeps sending mails as the one I
attached. It seems that while Nginx sees my theme, the
load-mail-server-logs script does not.

My theme is here
https://github.com/andreicristianpetcu/alavetelitheme/tree/production

It fails here
https://github.com/andreicristianpetcu/alavetelitheme/blob/production/lib/alavetelitheme.rb#L51

How can I solve this issue? I have been debugging it for some time with
very little luck.

Thank you,
Andrei Petcu
rails_error.eml
signature.asc

Gareth Rees

unread,
Sep 27, 2016, 5:18:41 AM9/27/16
to Alaveteli Dev, and...@ceata.org
Hey Andre,

Is your crontab line like this?

    31 * * * * deploy cd /srv/www/current && PATH="/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:/usr/local/bin:/usr/bin:/bin" RAILS_ENV=production run-with-lockfile -n ./load-mail-server-logs ./script/load-mail-server-logs || echo "stalled?"'

If so, my first guess would be that its something to do with the working directory of the script.

I would always use full paths to everything, starting from the server root, rather than using `cd`.

Assuming /srv/www/current is the root of the Alaveteli app, something like this:

    31 * * * * deploy RAILS_ENV=production /srv/www/current/commonlib/bin/run-with-lockfile.sh -n /srv/www/current/load-mail-server-logs.lock /srv/www/current/script/load-mail-server-logs || echo "stalled?"'


If you send over your full crontab file I'll take a look.

Cheers,

Gareth

Andrei Petcu

unread,
Sep 27, 2016, 6:10:07 AM9/27/16
to Gareth Rees, Alaveteli Dev
Hi Gareth,

Yes, this is how my cron looks like. I will try to use full paths.

I had issues setting the PATH in the crontab but then some jobs did not work at all. I don't know if the issue was with Ansible cron module or the actual cron implementation.

Thank for your reply,
Andrei
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply all
Reply to author
Forward
0 new messages