Forums/Cloud Foundry Forums/CloudFoundry.com Q&A

Answered

Beginner Question

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

User photo
Niklas Saers

Oops, here's the attachment

May 02, 2011 23:54
User photo
Tony Avella

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.

May 05, 2011 18:40
User photo
Kevin Clerc

I have the same Problem.

Do you have any news about this?

May 11, 2011 01:01
User photo
Gil

I got the same error when trying to do a "vmc push" for my ruby program (http://support.cloudfoundry.com/requests/100251).

May 11, 2011 10:52
User photo
Derek Collison

Niklas,

 

How did you install the ruby version you mentioned?

May 11, 2011 11:21
User photo
skram

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?

 

May 15, 2011 16:06
User photo
skram

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

May 15, 2011 16:21
User photo
skram
May 15, 2011 16:23
User photo
Niklas Saers

Hi Derek,

Sorry for my late reply. The Ruby installed is the Ruby that came with OS X.

 

Cheers

 

   Nik

May 16, 2011 11:43
User photo
Derek Collison
Ajax_loader_small Answer

You might try ruby 1.8.7 via an install of rvm. The system Ruby on MacOSX might be the issue.

May 16, 2011 13:06
User photo
Don Browning

Did anyone find an answer to this one?  I'm having the exact same problem.

Don

May 25, 2011 07:03
User photo
Tomasz Przybysz

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.

June 16, 2011 12:33
User photo
Ian Briscoe

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

June 16, 2011 14:50
User photo
Tomasz Przybysz

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

June 16, 2011 15:18
User photo
Ian Briscoe

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!

June 16, 2011 15:35
User photo
Derek Collison

Ian,

 

Are you talking about CloudFoundry the service, or a local version of VCAP?

June 17, 2011 08:42
User photo
Ian Briscoe

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.

June 17, 2011 08:48
User photo
Derek Collison
Ajax_loader_small Answer

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.

June 17, 2011 08:48
User photo
Derek Collison
Ian, Yes, start another thread, thanks..
June 17, 2011 08:59
User photo
Tomasz Przybysz

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.

June 17, 2011 09:45
User photo
Derek Collison
Ajax_loader_small Answer

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.

June 18, 2011 14:26
User photo
Tomasz Przybysz

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

June 19, 2011 10:56
User photo
Derek Collison
The error is coming from vmc, not anything to do with Grails proper. What does the directory you are trying to deploy fromnlook like? What does 'ls -la' display?
June 20, 2011 09:57
User photo
Tomasz Przybysz

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...

June 20, 2011 15:07
User photo
Derek Collison

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.

 

 

June 20, 2011 17:37
User photo
flashcloud

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

August 24, 2011 22:37
User photo
flashcloud

yes, after typed "rvm use 1.8.7", must typed "gem install vmc", then above question is be solved

August 24, 2011 23:26