BLOG     |     FORUM
Welcome, Guest
Username: Password: Remember me
Issues related to installation, running, bugs, and features.
  • Page:
  • 1

TOPIC: Help with crontabs failing

Help with crontabs failing 13 years 1 month ago #367

Hello-

Everything is up and looks awesome (amazing product btw) but I am having some issues with cron jobs being run that are producing tons of email alerts when cron fails. Below is the output of each failed cron when i run them manually.

[root@libra ~]# GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/bin/ruby /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/cronmailreport.rb
/usr/bin/ruby: symbol lookup error: /usr/local/share/webtrisul/vendor/gems/eventmachine-0.12.10/lib/rubyeventmachine.so: undefined symbol: rb_intern2

[root@libra ~]# GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/bin/ruby /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/tca_dispatch.rb
/usr/bin/ruby: symbol lookup error: /usr/local/share/webtrisul/vendor/gems/eventmachine-0.12.10/lib/rubyeventmachine.so: undefined symbol: rb_intern2

[root@libra ~]# GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/bin/ruby /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/resolve_ip.rb
/usr/bin/ruby: symbol lookup error: /usr/local/share/webtrisul/vendor/gems/eventmachine-0.12.10/lib/rubyeventmachine.so: undefined symbol: rb_intern2

[root@libra ~]# GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/bin/ruby /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/data_refresh.rb
/usr/bin/ruby: symbol lookup error: /usr/local/share/webtrisul/vendor/gems/eventmachine-0.12.10/lib/rubyeventmachine.so: undefined symbol: rb_intern2

There are ruby processes that are running in the background so it seems like the cron did fire up ruby

But i am getting cron emails when they fail every 15 minutes when they run. I am completely unfamiliar with ruby. Any suggestions please as it appears that I need these guys to run successfully to get current data metrics.

Thanks a ton-
Mark
The administrator has disabled public write access.

Re:Help with crontabs failing 13 years 1 month ago #368

Hi Mark,

Great you are liking Trisul.

Trisul packages everything including ruby, all the required gems, rails stack - so it is ready to go. I think you already had ruby installed in the system prior to installing Trisul. The cron tasks tries to use your system ruby instead of the one that ships with Trisul. Hence, the incompatibility.

You can fix this by editing the crontab :

Replace the occurance of
/usr/bin/ruby

with
/usr/local/share/webtrisul/ruby191/bin/ruby


I will fix the next version, so that the cron tasks use the packaged version even if you have installed ruby independently.



FYI :
The cron jobs do the following :

cronmailreport : sends out any scheduled reports via email

tca_dispatch : sends out any threshold crossing alerts via email

resolve_ip : name says it all, resolves what it thinks are most important IPs automatically

data_refresh : updates geo-ip / badfellas / url filter plugin data


Best ,

Vivek
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
The administrator has disabled public write access.

Re:Help with crontabs failing 13 years 1 month ago #369

  • Mark Maunu
  • Mark Maunu's Avatar
Awesome thanks for the cron explanation Vivek-
I just made the required changes to the crontabs and enabled them again. I'll let you know how it goes.
thanks again!
Mark
The administrator has disabled public write access.

Re:Help with crontabs failing 13 years 1 month ago #370

  • Mark Maunu
  • Mark Maunu's Avatar
Hello Vivek-
I made the changes you suggested to the crontabs and I'm getting some new errors now. The errors all seem to be the same output which I've pasted below:

/usr/local/share/webtrisul/vendor/rails/railties/lib/initializer.rb:1:in `require': no such file to load -- logger (LoadError)
from /usr/local/share/webtrisul/vendor/rails/railties/lib/initializer.rb:1:in `<top (required)>'
from /usr/local/share/webtrisul/config/boot.rb:45:in `require'
from /usr/local/share/webtrisul/config/boot.rb:45:in `load_initializer'
from /usr/local/share/webtrisul/config/boot.rb:38:in `run'
from /usr/local/share/webtrisul/config/boot.rb:11:in `boot!'
from /usr/local/share/webtrisul/config/boot.rb:110:in `<top (required)>'
from /usr/local/share/webtrisul/script/runner:2:in `require'
from /usr/local/share/webtrisul/script/runner:2:in `<main>'

Any ideas?
Thanks- Mark
The administrator has disabled public write access.

Re:Help with crontabs failing 13 years 1 month ago #372

Hi Mark,


Sorry my earlier post was incomplete. I forget the -I option.


Please try this : (Just cut and paste into your crontab)


<code>

##__webtrisul_pdf_report__
*/20 * * * * GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/local/share/webtrisul/ruby191/bin/ruby -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1 -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1/x86_64-linux /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/cronmailreport.rb
##__webtrisul_tca_report__
*/5 * * * * GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/local/share/webtrisul/ruby191/bin/ruby -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1 -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1/x86_64-linux /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/tca_dispatch.rb
##__webtrisul_resolve_ip__
*/15 * * * * GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/local/share/webtrisul/ruby191/bin/ruby -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1 -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1/x86_64-linux /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/resolve_ip.rb
##__data_refresh__
*/15 * * * * GEM_PATH=$GEM_PATH:/usr/local/share/webtrisul/vendor /usr/local/share/webtrisul/ruby191/bin/ruby -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1 -I/usr/local/share/webtrisul/ruby191/lib/ruby/1.9.1/x86_64-linux /usr/local/share/webtrisul/script/runner /usr/local/share/webtrisul/lib/tasks/data_refresh.rb

</code>


The next version will always use the ruby inside Trisul package even if a system ruby is available. It seemed like a good idea at that time, but too many potential incompatibilities.


Thanks,
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: vivek [unleash]
Time to create page: 0.035 seconds