Niklas Saers
asked this on May 02, 2011 23:54
Hi guys,
Thanks for the invite, I was happy to finally be allowed to work with Cloud Foundry. I've got a few beginner-questions, though.
I've added my application to my Cloud Foundry "server", but when I say "start" I get to an URL that says "
VCAP ROUTER: 404 - DESTINATION NOT FOUND". Also, when I look in STS (see attached file) I see no IPs under Host. I expect this is related, but why don't I have any IP?
Next question: I've downloaded Springs samples from git, and when I for hello-spring-mongodb, after an "mvn package", do an "vmc push --no-start" I get:
Would you like to deploy from the current directory? [Yn]: The input stream is exhausted.
/Library/Ruby/Gems/1.8/gems/highline-1.6.1/lib/highline.rb:601:in `get_line'
/Library/Ruby/Gems/1.8/gems/highline-1.6.1/lib/highline.rb:622:in `get_response'
/Library/Ruby/Gems/1.8/gems/highline-1.6.1/lib/highline.rb:216:in `ask'
/Library/Ruby/Gems/1.8/gems/vmc-0.3.10/lib/cli/commands/apps.rb:369:in `push'
/Library/Ruby/Gems/1.8/gems/vmc-0.3.10/lib/cli/runner.rb:426:in `send'
/Library/Ruby/Gems/1.8/gems/vmc-0.3.10/lib/cli/runner.rb:426:in `run'
/Library/Ruby/Gems/1.8/gems/vmc-0.3.10/lib/cli/runner.rb:14:in `run'
/Library/Ruby/Gems/1.8/gems/vmc-0.3.10/bin/vmc:5
/usr/bin/vmc:19:in `load'
/usr/bin/vmc:19
Why do I get this, and what does it mean? I'm running OS X with Ruby 1.8.7 pl249 and gem 1.7.2.
Cheers
Nik
Comments
Oops, here's the attachment
I saw your post while searching Google and I am experiencing the same issue that you are. Not much help but I thought I'd share.
I have the same Problem.
Do you have any news about this?
I got the same error when trying to do a "vmc push" for my ruby program (http://support.cloudfoundry.com/requests/100251).
Niklas,
How did you install the ruby version you mentioned?
Niklas, this is the same problem I have with my Ubuntu 9.04 machine.
The way I installed it is clearly noted at this post: http://support.cloudfoundry.com/entries/20101523-vmc-will-not-install-issue-with-rest-client-and-rubygems-version-ubuntu-9-04
Do you have any ideas why we're encountering this issue?
By the way, here's the error I got:
vmc push
Would you like to deploy from the current directory? [Yn]: The input stream is exhausted.
/usr/lib/ruby/gems/1.8/gems/highline-1.6.1/lib/highline.rb:601:in `get_line'
/usr/lib/ruby/gems/1.8/gems/highline-1.6.1/lib/highline.rb:622:in `get_response'
/usr/lib/ruby/gems/1.8/gems/highline-1.6.1/lib/highline.rb:216:in `ask'
/usr/lib/ruby/gems/1.8/gems/vmc-0.3.10/lib/cli/commands/apps.rb:369:in `push'
/usr/lib/ruby/gems/1.8/gems/vmc-0.3.10/lib/cli/runner.rb:426:in `send'
/usr/lib/ruby/gems/1.8/gems/vmc-0.3.10/lib/cli/runner.rb:426:in `run'
/usr/lib/ruby/gems/1.8/gems/vmc-0.3.10/lib/cli/runner.rb:14:in `run'
/usr/lib/ruby/gems/1.8/gems/vmc-0.3.10/bin/vmc:5
/usr/bin/vmc:19:in `load'
/usr/bin/vmc:19
The following link might give us some insight: http://groups.google.com/group/ruby-talk-google/browse_thread/thread/96cb79c4f6bdcfe9
Hi Derek,
Sorry for my late reply. The Ruby installed is the Ruby that came with OS X.
Cheers
Nik
You might try ruby 1.8.7 via an install of rvm. The system Ruby on MacOSX might be the issue.
Did anyone find an answer to this one? I'm having the exact same problem.
Don
Hi,
Anything more?
I see Darek's answer however with ruby 1.8.7 error still occurs.
Ubuntu 9.10. More info in the attachment.
Hi Derek,
I'm afraid this has not been answered, and I'll second what Tomasz wrote. Ruby 1.8.7, Ubuntu 9.10 (64-bit) - same problem skram and Niklas have.
This is a showstopper for me. I can't deploy my Grails application using vmc or the tooling from within STS, and I'd love to give CloudFoundry a go.
Ian
Speaking about Grails...
Check the grails cloud foundry plugin :) It will be more appropriate I think. Still there is issue too. Please tell me if you have similar results?
Creating application logbookk at y with 512MB and services [mysql-3de0f42]:2011-06-16 23:35:55,363 [main] WARN client.RestTemplate - GET request for "http://api.cloudfoundry.com/apps/logbookk" resulted in 404 (Not Found); invoking error handler
2011-06-16 23:35:55,879 [main] WARN client.RestTemplate - POST request for "http://api.cloudfoundry.com/apps" resulted in 403 (Forbidden); invoking error handler
I also tried to deploy using STS. All sorts of problems there, including 403 errors :-(
It all looked so simple in the Cloud Foundry videos on YouTube!
Just tried the plugin. Got a 500 Internal Server Error when it was checking for available resources prior to uploading the application.
Will look into this further tomorrow!
Ian,
Are you talking about CloudFoundry the service, or a local version of VCAP?
Hi Derek,
I'm talking about the service. Perhaps I should start another thread? I found this one by looking for the string 'input stream exhausted', which is exactly what I was seeing in trying to deploy to the remote service using vmc.
We understand the local installation process is fragile and are working to improve this in many ways. For now, I would suggest following the instructions as best as you can and sticking to each detail for success.
Derek, wouldn't it be better to discuss the same issue in the same thread?
I followed the exactly the Getting Started With VMware Cloud Foundry using vmc-u3.pdf (http://support.cloudfoundry.com/attachments/token/dyizykvkgocs7yb/?...)
Only difference was I created folder /tmp/hello instead of /hello. I have also ruby version recommended by you. Problem remains.
Anyway, Ian, please post link to the new thread here, please :)
I won't dig this issue too much because my main purpose is to deploy grails application and I found better way for this. Pity it does not work too... but for this one I see the point of creating new thread. So I'm making one right now.
I have seen the "input stream exhausted" in certain combinations of the ruby runtime for 1.8.7 and the highline gem. This is usually resolved with upgrading to a newer version of ruby (higher patch number). As far as I can tell this does not have much to do with the type of the application itself, e.g. Grails, and simply is a function of the ruby used to run vmc.
Thanks for answer,
What ruby runtime uses grails cloud foundry plugin? Does it need any ruby runtime environement at all?
"input stream exhausted" appeared for 'vmc push' command. 'grails cf-push' command also fails but with different errors:
GET request for "http://api.cloudfoundry.com/apps/logbookk" resulted in 404 (Not Found); invoking error handler
POST request for "http://api.cloudfoundry.com/apps" resulted in 403 (Forbidden); invoking error handler
I'm not sure did I wrote it clearly enough.
I have two different folders, two different apps and two different ways of pushing:
Case 1: example from tutorial; command used 'vmc push'; folder listing:
drwxr-xr-x 2 tpr tpr 4096 2011-06-20 22:55 .
drwxrwxrwt 19 root root 20480 2011-06-20 23:22 ..
-rw-r--r-- 1 tpr tpr 62 2011-06-20 22:55 hello.rb
The error: input stream exhausted
Case 2: some grails app; command used 'grails cf-push'; folder listing:
drwxrwxrwx 1 root root 4096 2011-06-16 22:45 .
drwxrwxrwx 1 root root 0 2011-05-22 19:14 ..
-rwxrwxrwx 1 root root 230 2011-06-16 22:39 application.properties
drwxrwxrwx 1 root root 4096 2011-05-22 19:17 grails-app
drwxrwxrwx 1 root root 0 2011-05-22 19:17 lib
drwxrwxrwx 1 root root 0 2011-05-26 00:30 out
drwxrwxrwx 1 root root 0 2011-05-22 19:17 scripts
drwxrwxrwx 1 root root 0 2011-05-22 19:17 src
drwxrwxrwx 1 root root 0 2011-06-20 23:22 target
drwxrwxrwx 1 root root 0 2011-05-22 19:13 test
drwxrwxrwx 1 root root 4096 2011-05-22 20:15 web-app
Of course you are the expert here, but 2nd case shouldn't have anything to do with environment ruby version, should it? It works even without any ruby at all (maybe Grails use some embedded I don't know). I created separate thread about the 2nd Case here: http://support.cloudfoundry.com/entries/20203333-grails-cloud-found...
Pity no one answered as this is my main interest.
Lets get back to 1st Case. I submitted a request about it and got back reply to reinstall ruby with rvm this time (instead of Ubuntu apt-get repos). I did this:
1. uinstalled repo's ruby and rubygems
2. installed rvm 1.6.20
3. installed with rvm ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
4. typed rvm use 1.8.7 (got nice green success message)
5. installed vmc (here got some trouble with gem zlib but solved it)
Now when I try do anything with vmc it's kind of 'blind'. Asked of version vmc responds normally. However any other command from tutorial just replies with empty line instead of those nice green responses:
me@host:/tmp/hello$ vmc --version
vmc 0.3.10
me@host:/tmp/hello$ vmc target api.cloudfoundry.com
me@host:/tmp/hello$ vmc login
Email: myname@gmail.com
Password:
me@host:/tmp/hello$ vmc push
nothing else at all...
What was the issue "working around" zlib?
After rvm installed a version of ruby 1.8.7, and you specifiy 'rvm use 1.8.7', 'gem install vmc' should just work, so I am concerned that it did not.
We could try to uninstall the gem and reinstall, with 'gem uninstall vmc' followed by an install.
Hi, When do it with this article:FAQ : Error : The input stream is exhausted, but still fails when typed "vmc push" on console. this is error message:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem vmc (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /usr/bin/vmc:18
envirorenment:
ruby-1.8.7-p352
Mac OS X Lion
yes, after typed "rvm use 1.8.7", must typed "gem install vmc", then above question is be solved