{"action":"created","issue":{"url":"https://api.github.com/repos/pentestgeek/phishing-frenzy/issues/312","repository_url":"https://api.github.com/repos/pentestgeek/phishing-frenzy","labels_url":"https://api.github.com/repos/pentestgeek/phishing-frenzy/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/pentestgeek/phishing-frenzy/issues/312/comments","events_url":"https://api.github.com/repos/pentestgeek/phishing-frenzy/issues/312/events","html_url":"https://github.com/pentestgeek/phishing-frenzy/issues/312","id":161698564,"number":312,"title":"Email success in PF dashboard, but fail in Sidekiq. Error \"Couldn't find Campaign with 'id'=26\" logged.","user":{"login":"RedLee3","id":7444862,"avatar_url":"https://avatars.githubusercontent.com/u/7444862?v=3","gravatar_id":"","url":"https://api.github.com/users/RedLee3","html_url":"https://github.com/RedLee3","followers_url":"https://api.github.com/users/RedLee3/followers","following_url":"https://api.github.com/users/RedLee3/following{/other_user}","gists_url":"https://api.github.com/users/RedLee3/gists{/gist_id}","starred_url":"https://api.github.com/users/RedLee3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedLee3/subscriptions","organizations_url":"https://api.github.com/users/RedLee3/orgs","repos_url":"https://api.github.com/users/RedLee3/repos","events_url":"https://api.github.com/users/RedLee3/events{/privacy}","received_events_url":"https://api.github.com/users/RedLee3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-22T14:29:44Z","updated_at":"2016-06-22T14:31:12Z","closed_at":null,"body":"Testing a new campaign and attempting to send test emails to confirm it works. In the PF campaign dashboard, \"Recent blasts\" show that the test email sent with 0 SMTP failures. Opening the Sidekiq dashboard shows that the emails fail. Below is the relevant errors from the sidekiq log:\r\n\r\n`2016-06-22T13:58:41.162Z 20913 TID-9xlaw INFO: Running in ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]\r\n2016-06-22T13:58:41.162Z 20913 TID-9xlaw INFO: See LICENSE and the LGPL-3.0 for licensing details.\r\n2016-06-22T13:58:41.162Z 20913 TID-9xlaw INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org/pro\r\n2016-06-22T13:58:41.162Z 20913 TID-9xlaw INFO: Booting Sidekiq 3.3.3 with redis options {}\r\n2016-06-22T13:58:41.163Z 20913 TID-9xlaw INFO: Starting processing, hit Ctrl-C to stop\r\n2016-06-22T13:59:05.861Z 20913 TID-en094 MailWorker JID-45b792eb86c6ec050be23d74 INFO: start\r\n2016-06-22T13:59:05.862Z 20913 TID-en094 MailWorker JID-45b792eb86c6ec050be23d74 INFO: Attempting to send mail: campaign_id 26,target target@test.com, blast_id 250\r\n2016-06-22T13:59:05.888Z 20913 TID-en094 MailWorker JID-45b792eb86c6ec050be23d74 ERROR: Failed to send mail: campaign_id 26, target target@test.com, blast_id 250 - Couldn't find Campaign with 'id'=26\r\n2016-06-22T13:59:05.888Z 20913 TID-en094 MailWorker JID-45b792eb86c6ec050be23d74 INFO: fail: 0.027 sec\r\n2016-06-22T13:59:05.894Z 20913 TID-en094 WARN: {\"retry\"=>false, \"queue\"=>\"default\", \"class\"=>\"MailWorker\", \"args\"=>[26, \"target@test.com\", 250, 1], \"jid\"=>\"45b792eb86c6ec050be23d74\", \"enqueued_at\"=>1466603945.8521497}\r\n2016-06-22T13:59:05.894Z 20913 TID-en094 WARN: Couldn't find Campaign with 'id'=26\r\n2016-06-22T13:59:05.894Z 20913 TID-en094 WARN: /var/www/phishing-frenzy/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.7/lib/active_record/relation/finder_methods.rb:320:in `raise_record_not_found_exception!'\r\n`\r\n\r\nThe same error happens when launching the campaign:\r\n`2016-06-22T14:23:28.237Z 20913 TID-en094 QueueMailWorker JID-c9438f120f97637279a9ded9 INFO: start\r\n2016-06-22T14:23:28.238Z 20913 TID-en094 QueueMailWorker JID-c9438f120f97637279a9ded9 INFO: fail: 0.001 sec\r\n2016-06-22T14:23:28.245Z 20913 TID-en094 WARN: {\"retry\"=>false, \"queue\"=>\"default\", \"class\"=>\"QueueMailWorker\", \"args\"=>[\"26\"], \"jid\"=>\"c9438f120f97637279a9ded9\", \"enqueued_at\"=>1466605408.2357106}\r\n2016-06-22T14:23:28.245Z 20913 TID-en094 WARN: Couldn't find Campaign with 'id'=26\r\n2016-06-22T14:23:28.245Z 20913 TID-en094 WARN: /var/www/phishing-frenzy/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.7/lib/active_record/relation/finder_methods.rb:320:in `raise_record_not_found_exception!'\r\n`\r\n\r\nAnything I need to further do to troubleshoot?"},"comment":{"url":"https://api.github.com/repos/pentestgeek/phishing-frenzy/issues/comments/227762580","html_url":"https://github.com/pentestgeek/phishing-frenzy/issues/312#issuecomment-227762580","issue_url":"https://api.github.com/repos/pentestgeek/phishing-frenzy/issues/312","id":227762580,"user":{"login":"zeknox","id":2473269,"avatar_url":"https://avatars.githubusercontent.com/u/2473269?v=3","gravatar_id":"","url":"https://api.github.com/users/zeknox","html_url":"https://github.com/zeknox","followers_url":"https://api.github.com/users/zeknox/followers","following_url":"https://api.github.com/users/zeknox/following{/other_user}","gists_url":"https://api.github.com/users/zeknox/gists{/gist_id}","starred_url":"https://api.github.com/users/zeknox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeknox/subscriptions","organizations_url":"https://api.github.com/users/zeknox/orgs","repos_url":"https://api.github.com/users/zeknox/repos","events_url":"https://api.github.com/users/zeknox/events{/privacy}","received_events_url":"https://api.github.com/users/zeknox/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T14:31:12Z","updated_at":"2016-06-22T14:31:12Z","body":"Sounds like your sidekiq is not started in the proper rails env.  Try this:\r\n<pre>$ RAILS_ENV=production bundle exec sidekiq</pre>"}}
{"actor":{"display_login":"zeknox"}}