Since a couple of days i've got an Errno::EPIPE: Broken pipe
When i try to send my newsletters with sendgrid email
My configuration is a ruby on rails(4.2)and heroku server
I dont understand because i send my newsletters with this configuration since 5 years and i Never had problèms ???
Now evry Times i have this type of issue :
Net::SMTPServerBusy: 450 Could not send e-mail
lib/tasks/scheduler.rake:532:in block (2 levels) in <top (required)>'
Notifier.send_mail_experience1(#mailgenerals,author,#offres,#destinataire,#grades).deliver
lib/tasks/scheduler.rake:531:inblock in '
#author.each do |author|
config/initializers/sentry.rb:23:in block in execute'
orig_execute(args)
config/initializers/sentry.rb:22:inexecute'
Raven.capture logger: 'rake', tags: { 'rake_task' => #name } do
bin/bundle:3:in `load'
load Gem.bin_path('bundler', 'bundle')
I try to configurate Sendgrid with anothor port but it is the same Way
Thank for your help
Julien
Related
I have used whenever gems,where i have schedule more than 500 mails to execute at a particular time,but its not going.But if i send 15 or 20 email then it goes.I am getting the following in my output file of whenever.
rake aborted!
Net::SMTPServerBusy: 452 4.5.3 Error: too many recipients
/home/indiba3/.rvm/gems/ruby-2.1.8/gems/mail-2.6.4/lib/mail/network/delivery_methods/smtp.rb:114:in `block in deliver!'
/home/indiba3/.rvm/gems/ruby-2.1.8/gems/mail-2.6.4/lib/mail/network/delivery_methods/smtp.rb:113:in `deliver!'
/home/indiba3/.rvm/gems/ruby-2.1.8/gems/mail-2.6.4/lib/mail/message.rb:253:in `deliver!'
/home/indiba3/.rvm/gems/ruby-2.1.8/gems/actionmailer-4.2.4/lib/action_mailer/message_delivery.rb:77:in `deliver_now!'
/home/indiba3/.rvm/gems/ruby-2.1.8/gems/actionmailer-4.2.4/lib/action_mailer/message_delivery.rb:95:in `deliver!'
/home/indiba3/hrms/lib/tasks/email_tasks.rake:25:in `block (2 levels) in <top (required)>'
/home/indiba3/.rvm/gems/ruby-2.1.8/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/indiba3/.rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `eval'
/home/indiba3/.rvm/gems/ruby-2.1.8/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => task_namespace:birthday_invitation_mail
(See full trace by running task with --trace)
So how may i slove this error and let the email to be sent to 500 person and if any email is wrong i may get the output in another log file........so pls help...........??
Fetch users in batches and then try to send mails.
mailer
def birthday_email
date = Date.today
Employee.where("status = ? AND strftime('%d/%m', date_of_birth) = ?", "Active" , date.strftime('%d/%m')).where("age > 21").find_in_batches do |group|
sleep(5)
group.each { |emp| mail(to: emp.email, subject: 'Birthday Wishes') }
end
end
rake
EmployeeMailer.birthday_email.deliver!
It shows wrong number of arguments but I am passing 3 arguments
ScannerWorker.perform_async('bob1','bob2',5)
Here sidekiq worker code
class ScannerWorker
include Sidekiq::Worker
def perform(bob1, bob2, bob3)
puts bob1
end
end
sidekiq version:- 4.2.7
rails 4.2.6
Redis server v=3.0.7
Sidekiq Error:-
2017-01-03T06:29:43.007Z 9547 TID-itjjk WARN: ArgumentError: wrong number of arguments (given 0, expected 2..3)
2017-01-03T06:29:43.007Z 9547 TID-itjjk WARN: /home/smk/14.04/rails/projects/myappname/app/workers/scanner_worker.rb:5:in `test'
/home/smk/14.04/rails/projects/myappname/app/workers/scanner_worker.rb:5:in `perform'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:158:in `execute_job'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:138:in `block (4 levels) in process'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq.rb:36:in `block in <module:Sidekiq>'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:133:in `block (3 levels) in process'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/logging.rb:32:in `with_context'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:132:in `block (2 levels) in process'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:174:in `stats'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:131:in `block in process'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq.rb:35:in `block in <module:Sidekiq>'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:126:in `process'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:82:in `process_one'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/processor.rb:70:in `run'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/util.rb:17:in `watchdog'
/home/smk/14.04/rails/projects/myappname/vendor/bundle/gems/sidekiq-4.2.7/lib/sidekiq/util.rb:25:in `block in safe_thread'
You need to restart Sidekiq. Live code reloading only works with Sidekiq 4.2+ running Rails 5.0+.
Follow this steps
* Mention the sidekiq version in gemfile
* kill the sidekiq process and restart the sidekiq
You need to restart Sidekiq
To Start:
$ bundle exec sidekiq
To Run in the background:
$ bundle exec sidekiq -d -P tmp/sidekiq.pid -L log/sidekiq.log
where -d demonize, -P pid file, -L log file.
Stop:
$ bundle exec sidekiqctl stop tmp/sidekiq.pid 0
Sidekiq shut down gracefully.
where 0 is number of seconds to wait until Sidekiq exits.
worth noting. I've been working on a similar issue.
SomeWorker.perform_async(#user.id)
class SomeWorker
include Sidekiq::Worker
def perform(user_id)
puts "{user_id}"
end
end
unsure exactly why i was getting the arguments error. Maybe it was an because of an instance variable, maybe a rails bug.
Nevertheless, I receated the worker using
$rails g sidekiq:worker SomeWorker
and saw this *.
class SomeWorker
include Sidekiq::Worker
def perform(*args)
puts #some thing
end
end
by adding the astrix everything worked perfectly.
quick answer:
class SomeWorker
include Sidekiq::Worker
def perform(*user_id)
puts #some thing
end
end
I'm trying to ag results through a pipe using a regular expression but it is not working.
~/c/octoly git:1470 ❯❯❯ drake routes | ag pro_store --page=less -r
Running via Spring preloader in process 9140
pro_store_stores_users POST /pro/stores/:store_id/stores_users(.:format) pro/stores_users#create
new_pro_store_stores_user GET /pro/stores/:store_id/stores_users/new(.:format) pro/stores_users#new
edit_pro_store_stores_user GET /pro/stores/:store_id/stores_users/:id/edit(.:format) pro/stores_users#edit
~/c/octoly git:1470 ❯❯❯ drake routes | ag '^pro_store' --page=less -r
Running via Spring preloader in process 8669
~/c/octoly git:1470 ❯❯❯ drake routes | ag ^pro_store --page=less -r
Running via Spring preloader in process 8743
rake aborted!
Errno::EPIPE: Broken pipe # io_write - /dev/ttys010
/Users/adrien/.gem/ruby/2.2.4/gems/railties-4.2.6/lib/rails/tasks/routes.rake:6:in `write'
/Users/adrien/.gem/ruby/2.2.4/gems/railties-4.2.6/lib/rails/tasks/routes.rake:6:in `puts'
/Users/adrien/.gem/ruby/2.2.4/gems/railties-4.2.6/lib/rails/tasks/routes.rake:6:in `puts'
/Users/adrien/.gem/ruby/2.2.4/gems/railties-4.2.6/lib/rails/tasks/routes.rake:6:in `block in <top (required)>'
/Users/adrien/.gem/ruby/2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/Users/adrien/.gem/ruby/2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
/Users/adrien/.gem/ruby/2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/Users/adrien/.gem/ruby/2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
-e:1:in `<main>'
Tasks: TOP => routes
(See full trace by running task with --trace)
I am trying to get results starting with pro_store. I've read the broken pipe could be because of the ag stuff ending before the drake stuff but I don't get how and why if that's really what's happening.
Try with drake routes | ag "^ *pro_store" --page=less -r
Your output doesn't "start" with pro_store, but multiple spaces and then pro_store. That's why the [:space:]* addition to your regex.
This is my first time using stack overflow for a personal question and I have searched for an answer to my question, with no success, so please be patient with me if I have overlooked anything, and thank you in advance for your help.
I'm currently making an application using ruby on rails 4 version 4.1.1 (using RVM) and it seems that every time I enter any rake or rails command (such as rails server or rails console) in the command line, there is a 50/50 chance that it will work as planned, the rest of the time I get the following error message:
/Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:222:in `split': invalid byte sequence in UTF-8 (ArgumentError)
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:224:in `setup_environment'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:17:in `setup'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler.rb:120:in `setup'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems-bundler/noexec.rb:94:in `setup'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems-bundler/noexec.rb:124:in `check'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems-bundler/noexec.rb:131:in `<top (required)>'
from /Users/drobro/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /Users/drobro/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /Users/drobro/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:50:in `call'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:50:in `block in run'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:49:in `each'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:49:in `run'
from /Users/drobro/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:10:in `<main>'
Now, I went to check the apparently faulty code in the runtime.rb and it looks like this:
def setup_environment
begin
ENV["BUNDLE_BIN_PATH"] = Bundler.rubygems.bin_path("bundler", "bundle", VERSION)
rescue Gem::GemNotFoundException
ENV["BUNDLE_BIN_PATH"] = File.expand_path("../../../bin/bundle", __FILE__)
end
# Set PATH
paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
paths.unshift "#{Bundler.bundle_path}/bin"
ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
# Set BUNDLE_GEMFILE
ENV["BUNDLE_GEMFILE"] = default_gemfile.to_s
# Set RUBYOPT
rubyopt = [ENV["RUBYOPT"]].compact
if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
rubyopt.unshift %|-rbundler/setup|
ENV["RUBYOPT"] = rubyopt.join(' ')
end
# Set RUBYLIB
rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
rubylib.unshift File.expand_path('../..', __FILE__)
ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
end
at line 222, which is the line right beneath the # Set PATH comment, i.e. paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR). From what I understand, this is telling me that the argument to the split method, File::PATH_SEPARATOR, is invalid in UTF-8 encoding. I decided to throw in some puts statements around that code to check what was going on. So, right under # Set PATH, I typed:
puts "File::PATH_SEPARATOR is this: #{File::PATH_SEPARATOR}"
puts "This is the encoding: #{File::PATH_SEPARATOR.encoding}"
File::PATH_SEPARATOR.each_byte do |c|
puts "This is the ASCII value: #{c}"
end
ON THE TIMES WHEN A RAILS COMMAND DOES NOT WORK, the output to the terminal is:
File::PATH_SEPARATOR is this: :
This is the encoding: ASCII-8BIT
This is the ASCII value: 58
/Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:227:in `split': invalid byte sequence in UTF-8 (ArgumentError)
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:224:in `setup_environment'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:15:in `setup'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler.rb:120:in `setup'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems-bundler/noexec.rb:94:in `setup'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems-bundler/noexec.rb:124:in `check'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems-bundler/noexec.rb:131:in `<top (required)>'
from /Users/drobro/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /Users/drobro/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /Users/drobro/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/rubygems-bundler-1.4.4/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:50:in `call'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:50:in `block in run'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:49:in `each'
from /Users/drobro/.rvm/gems/ruby-2.1.2#global/gems/executable-hooks-1.3.2/lib/executable-hooks/hooks.rb:49:in `run'
from /Users/drobro/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:10:in `<main>'
AND ON THE TIMES WHEN A RAILS COMMAND DOES WORK, the output to the terminal is (this example is for the rails server command):
File::PATH_SEPARATOR is this: :
This is the encoding: ASCII-8BIT
This is the ASCII value: 58
File::PATH_SEPARATOR is this: :
This is the encoding: ASCII-8BIT
This is the ASCII value: 58
=> Booting WEBrick
=> Rails 4.1.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2014-07-08 17:36:40] INFO WEBrick 1.3.1
[2014-07-08 17:36:40] INFO ruby 2.1.2 (2014-05-08) [x86_64-darwin13.0]
[2014-07-08 17:36:40] INFO WEBrick::HTTPServer#start: pid=6447 port=3000
This is what worries me: the information returned is IDENTICAL in both cases. What's worse is that the encoding is ASCII-8BIT, which is more restrictive than UTF-8, and anyways the invalid character is supposedly just a colon... which should never cause any problems in either of those encodings right?? So I have 2 questions:
1) Why in the world am I getting this invalid utf-8 error?
2) Why does it only happen half the time despite the input being identical??
Thank you for helping, I'm at a loss here.
I managed to fix the problem by changing the line:
paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
to:
paths = (ENV["PATH"] || "").encode('UTF-8', :invalid => :replace).split(File::PATH_SEPARATOR)
My understanding is that this will replace an invalid UTF-8 byte sequence with (an equivalent??) one that is valid. However, this does not explain why the problem was happening just half the time, and that is what was really getting to me.
So, if anyone reads this and has any clue as to what was happening, please feel free to comment and let me know, it would be very much appreciated.
I am trying to tunnel the mysql service on api.cloudfoundry.com but facing the error below.
I have installed Ruby 2.0
installed gem versions :
* LOCAL GEMS *
addressable (2.3.3, 2.2.8),async_sinatra (0.5.0),bigdecimal (1.2.0),caldecott (0.0.5),caldecott-client (0.0.2),cf-uaa-lib (1.3.10),cfoundry (0.5.3.rc5),clouseau (0.0.2),
em-http-request (0.3.0),em-websocket (0.3.8),escape_utils (0.3.2),eventmachine (1.0.3 ruby x86-mingw32),interact (0.5.2),io-console (0.4.2),json (1.7.7, 1.6.8),json_pure (1.7.7),
manifests-vmc-plugin (0.6.3.rc2),mime-types (1.21),minitest (4.3.2),mothership (0.5.1),
multi_json (1.7.0),multipart-post (1.2.0),psych (2.0.0),rack (1.5.2),rack-protection (1.5.0),rake (0.9.6),rdoc (4.0.0),rest-client (1.6.7),rubygems-update (2.0.3),
rubyzip (0.9.9),sinatra (1.4.1),test-unit (2.0.0.0),tilt (1.3.6),tunnel-vmc-plugin (0.2.2),
uuidtools (2.1.3),vmc (0.5.1.rc4)
C:\Users\user>vmc tunnel
DL is deprecated, please use Fiddle
1: mongo-hello
2: mysql-hello
3: rabbit-hello
Which service instance?> 2
1: none
2: mysql
3: mysqldump
Which client would you like to start?> 2
Opening tunnel on port 10000... FAILED
CFoundry::BadResponse: 400: <h2>Client sent a bad request.</h2>
For more information, see ~/.vmc/crash
crash contents:
Time of crash:
2013-03-20 17:30:10 +0530
CFoundry::BadResponse: 400: <h2>Client sent a bad request.</h2>
<<<
REQUEST: GET http://api.cloudfoundry.com/apps/caldecott
REQUEST_HEADERS:
Accept : application/json
Authorization : bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjEzNjQwOTc3OTksInVzZXJfbmFtZSI6ImFtdWxsYXdvcmtAZ21haWwuY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwib3BlbmlkIiwicGFzc3dvcmQud3JpdGUiXSwiZW1haWwiOiJhbXVsbGF3b3JrQGdtYWlsLmNvbSIsImF1ZCI6WyJvcGVuaWQiLCJjbG91ZF9jb250cm9sbGVyIiwicGFzc3dvcmQiXSwianRpIjoiOGEzYmNhYzEtOTdjMC00OGY2LWE1YjAtNmZhNjFkNTM1YzRiIiwidXNlcl9pZCI6Ijc1NGE0YmE0LTQxNDMtNDA1NC05OWE3LWRkOGJlYTA1NzMyOSIsImNsaWVudF9pZCI6InZtYyJ9.bgY7BUi7DpjKL4gy5YkbTJDYuYXHhHPzKPZApabeA_dpRLfcr1yhprlx2Yx1Shavdso-R9jYg3jiy9MuTUhZ6hvIVVoKcaFxcw43owb2ztXxb_VM6N2wmyXnLX5dmSXNIv7xa5hgbeuwE32rSR66sLNGEgHu-sreaKQIN9V6GbOe-Bj4WN-uux0O8AGmol5sp1QhD4Nf2nAmsiPHR63OhS6-SDBYgizcmpfWgwGeOMvcTumbYJ6PpvRNPa20pQomjDOqSY2Jn_tQM7RfZCklpyZKvdt2RIQK5fWAekMLWlnG3aJYHE90UHnxg0UclhwzgrgI0HiDWkQ_42dqOX446g
Content-Length : 297
Content-Type : application/json
REQUEST_BODY: {"name":"caldecott","instances":1,"staging":{"model":"sinatra","stack":"ruby19","command":"bundle exec ruby server.rb -p $VCAP_APP_PORT"},"resources":{"memory":64},"env":["CALDECOTT_AUTH=9d498baf-9102-4c80-851d-f400530a261f"],"uris":["caldecott-b58c1.cloudfoundry.com"],"services":["mysql-hello"]}
RESPONSE: [400]
RESPONSE_HEADERS:
content-type : text/html
RESPONSE_BODY:
<h2>Client sent a bad request.</h2>
>>>
cfoundry-0.5.3.rc5/lib/cfoundry/baseclient.rb:167:in `handle_error_response'
cfoundry-0.5.3.rc5/lib/cfoundry/baseclient.rb:137:in `handle_response'
cfoundry-0.5.3.rc5/lib/cfoundry/baseclient.rb:87:in `request'
cfoundry-0.5.3.rc5/lib/cfoundry/baseclient.rb:72:in `post'
cfoundry-0.5.3.rc5/lib/cfoundry/v1/model_magic.rb:46:in `block (2 levels) in define_client_methods'
cfoundry-0.5.3.rc5/lib/cfoundry/v1/model.rb:83:in `create!'
tunnel-vmc-plugin-0.2.2/lib/tunnel-vmc-plugin/tunnel.rb:145:in `push_helper'
tunnel-vmc-plugin-0.2.2/lib/tunnel-vmc-plugin/tunnel.rb:88:in `create_helper'
tunnel-vmc-plugin-0.2.2/lib/tunnel-vmc-plugin/tunnel.rb:28:in `open!'
tunnel-vmc-plugin-0.2.2/lib/tunnel-vmc-plugin/plugin.rb:41:in `block in tunnel'
interact-0.5.2/lib/interact/progress.rb:98:in `with_progress'
tunnel-vmc-plugin-0.2.2/lib/tunnel-vmc-plugin/plugin.rb:40:in `tunnel'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `block in invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in `invoke'
mothership-0.5.1/lib/mothership/base.rb:55:in `execute'
vmc-0.5.1.rc4/lib/vmc/cli.rb:150:in `block (2 levels) in execute'
vmc-0.5.1.rc4/lib/vmc/cli.rb:161:in `save_token_if_it_changes'
vmc-0.5.1.rc4/lib/vmc/cli.rb:149:in `block in execute'
vmc-0.5.1.rc4/lib/vmc/cli.rb:100:in `wrap_errors'
vmc-0.5.1.rc4/lib/vmc/cli.rb:145:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
vmc-0.5.1.rc4/bin/vmc:11:in `<top (required)>'
D:/Ruby200/bin/vmc:23:in `load'
D:/Ruby200/bin/vmc:23:in `<main>'
Try deleting the caldecott application and then trying the tunnel again;
$ vmc delete caldecott
$ vmc tunnel