jmettraux/rufus-scheduler

Need to resolve a "Rufus-scheduler intercepted an error:"

surajshah1 opened this issue · 1 comments

Sonar widget configuration:

/home/...../sonar.cfg
{ 47130628292280 rufus-scheduler intercepted an error:
47130628292280 job:
47130628292280 Rufus::Scheduler::EveryJob "3600s" {:first_in=>0}
47130628292280 error:
47130628292280 47130628292280
47130628292280 Errno::ECONNREFUSED
47130628292280 Failed to open TCP connection to :80 (Connection refused - connect(2) for nil port 80)
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:939:in rescue in block in connect' Thin web server (v1.7.2 codename Bachmanity) Maximum connections set to 1024 Listening on 0.0.0.0:3030, CTRL+C to stop 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:936:in block in connect'
47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout' 47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:103:in timeout'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:935:in connect' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:920:in do_start'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:909:in start' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:609:in start'
47130628292280 /home/.../jobs/sonar.rb:58:in block in <top (required)>' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:210:in do_call'
47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:254:in trigger_now' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:296:in block (3 levels) in start_work_thread'
47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:299:in block (2 levels) in start_work_thread' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:285:in loop'
47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:285:in `block in start_work_thread'
47130628292280 tz:
47130628292280 ENV['TZ']:
47130628292280 Time.now: 2019-07-22 11:00:00 -0700
47130628292280 local_tzone: #<TZInfo::DataTimezone: America/Los_Angeles>
47130628292280 et-orbi:
47130628292280 (etz:nil,tnz:"PDT",tziv:"1.2.5",tzidv:nil,rv:"2.5.5",rp:"x86_64-linux-gnu",win:false,rorv:nil,astz:nil,eov:"1.2.1",eotnz:#<TZInfo::DataTimezone: America/Los_Angeles>,eotnfz:"-0700",eotlzn:"America/Los_Angeles",eotnfZ:"PDT",debian:"America/Los_Angeles",centos:nil,osx:"America/Los_Angeles")
47130628292280 scheduler:
47130628292280 object_id: 47130622352620
47130628292280 opts:
47130628292280 {}
47130628292280 frequency: 0.3
47130628292280 scheduler_lock: #Rufus::Scheduler::NullLock:0x000055bae801b6e0
47130628292280 trigger_lock: #Rufus::Scheduler::NullLock:0x000055bae801b6b8
47130628292280 uptime: 0.33658528327941895 (336)
47130628292280 down?: false
47130628292280 threads: 2
47130628292280 thread: #<Thread:0x000055bae8035720@/var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler.rb:546 sleep>
47130628292280 thread_key: rufus_scheduler_47130622352620
47130628292280 work_threads: 1
47130628292280 active: 1
47130628292280 vacant: 0
47130628292280 max_work_threads: 28
47130628292280 mutexes: {}
47130628292280 jobs: 5
47130628292280 at_jobs: 0
47130628292280 in_jobs: 0
47130628292280 every_jobs: 5
47130628292280 interval_jobs: 0
47130628292280 cron_jobs: 0
47130628292280 running_jobs: 1
47130628292280 work_queue: 0
} 47130628292280 .
Exception: wrong number of arguments (given 1, expected 0)

Hello,

this is not a rufus-scheduler issue.

Sonar widget configuration:
Well, this doesn't look like a configuration file. It's rufus-scheduler telling you that an error is happening in the code you're scheduling.

Your code is trying to open a connection to the server nil on port 80. Hence the error message

47130628292280 Errno::ECONNREFUSED
47130628292280 Failed to open TCP connection to :80 (Connection refused - connect(2) for nil port 80)
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:939:in rescue in block in connect' Thin web server (v1.7.2 codename Bachmanity) Maximum connections set to 1024 Listening on 0.0.0.0:3030, CTRL+C to stop 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:936:in block in connect'
47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:93:in block in timeout' 47130628292280 /usr/lib/ruby/2.5.0/timeout.rb:103:in timeout'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:935:in connect' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:920:in do_start'
47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:909:in start' 47130628292280 /usr/lib/ruby/2.5.0/net/http.rb:609:in start'
47130628292280 /home/.../jobs/sonar.rb:58:in block in <top (required)>' 47130628292280 /var/lib/gems/2.5.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler/jobs.rb:210:in do_call'

I do not know what the final line refers to:

Exception: wrong number of arguments (given 1, expected 0)

Please fix your code.

I am closing this issue since this is not a rufus-scheduler issue.

Best regards.