Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

undefined method `service' for nil:NilClass #21

Closed
ramonskie opened this issue Jul 1, 2013 · 10 comments
Closed

undefined method `service' for nil:NilClass #21

ramonskie opened this issue Jul 1, 2013 · 10 comments

Comments

@ramonskie
Copy link

when deploying a app and select yes for saving manifest it results in the following error

Time of crash:
  2013-07-01 16:33:47 +0200

NoMethodError: undefined method `service' for nil:NilClass

cf-3.0.0/lib/manifests/manifests.rb:163:in `block in create_manifest_for'
cf-3.0.0/lib/manifests/manifests.rb:161:in `each'
cf-3.0.0/lib/manifests/manifests.rb:161:in `create_manifest_for'
cf-3.0.0/lib/manifests/manifests.rb:227:in `ask_to_save'
cf-3.0.0/lib/manifests/plugin.rb:136:in `block in create_and_save_manifest'
mothership-0.5.1/lib/mothership/callbacks.rb:55:in `instance_exec'
mothership-0.5.1/lib/mothership/callbacks.rb:55:in `block in filter'
mothership-0.5.1/lib/mothership/callbacks.rb:54:in `each'
mothership-0.5.1/lib/mothership/callbacks.rb:54:in `filter'
cf-3.0.0/lib/cf/cli/app/push.rb:79:in `upload_app'
cf-3.0.0/lib/cf/cli/app/push.rb:65:in `setup_new_app'
cf-3.0.0/lib/cf/cli/app/push.rb:48:in `push'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `block in invoke'
cf-3.0.0/lib/manifests/plugin.rb:137:in `call'
cf-3.0.0/lib/manifests/plugin.rb:137:in `block in create_and_save_manifest'
mothership-0.5.1/lib/mothership/callbacks.rb:74:in `with_filters'
cf-3.0.0/lib/manifests/plugin.rb:136:in `create_and_save_manifest'
cf-3.0.0/lib/manifests/plugin.rb:75:in `wrap_push'
cf-3.0.0/lib/manifests/plugin.rb:27:in `block in <class:ManifestsPlugin>'
mothership-0.5.1/lib/mothership/command.rb:82:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:82:in `block (2 levels) 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'
cf-3.0.0/lib/cf/cli.rb:156:in `block (2 levels) in execute'
cf-3.0.0/lib/cf/cli.rb:167:in `save_token_if_it_changes'
cf-3.0.0/lib/cf/cli.rb:155:in `block in execute'
cf-3.0.0/lib/cf/cli.rb:101:in `wrap_errors'
cf-3.0.0/lib/cf/cli.rb:151:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
cf-3.0.0/bin/cf:13:in `<top (required)>'
/usr/local/bin/cf:23:in `load'
/usr/local/bin/cf:23:in `<main>'

i updated to the latest cf gem

@testobsessed
Copy link

Hi,

I'm having trouble reproducing this issue with cf version 4.0.1rc2. Can you please tell me:

  • Which version of cf do you have (cf --version will tell you)?
  • Did you use any command line flags with your cf push?
  • Did you give your application a subdomain and domain?
  • Did you create a service with this cf push? If so, which service?
  • Did you bind to an existing service with this cf push? If so, which service?

Thanks!

Elisabeth

@cloudfoundry-attic
Copy link
Collaborator

Also curious what Ruby version, though cf should support all of them,
could be helpful.

Sent from my iPhone

On Jul 1, 2013, at 11:12 AM, Elisabeth Hendrickson notifications@github.com
wrote:

Hi,

I'm having trouble reproducing this issue with cf version 4.0.1rc2. Can you
please tell me:

  • Which version of cf do you have (cf --version will tell you)?
  • Did you use any command line flags with your cf push?
  • Did you give your application a subdomain and domain?
  • Did you create a service with this cf push? If so, which service?
  • Did you bind to an existing service with this cf push? If so, which
    service?

Thanks!

Elisabeth


Reply to this email directly or view it on
GitHubhttps://github.com//issues/21#issuecomment-20288104
.

@ramonskie
Copy link
Author

what i did on cli

klm21904@ramonskie-W530 ~/Workspace/spring-hello-env $ cf push  --path target/abc.war
Name> test

Instances> 1

1: 64M
2: 128M
3: 256M
4: 512M
5: 1G
6: 2G
7: 4G
8: 8G
9: 16G
10: 32G
Memory Limit> 256M

Creating test... OK

1: test
2: none
Subdomain> test

1: cf.eden.klm.com
2: none
Domain> cf.eden.klm.com

Binding test.cf.eden.klm.com to test... OK

Create services for application?> y

1: mysql 5.5
2: postgresql 9.1
What kind?> 2

Name?> postgresql-c2840

1: default: Shared server, shared VM, 1MB memory, 10MB storage, 10 connections
Which plan?> 1

Creating service postgresql-c2840... OK
Binding postgresql-c2840 to test... OK
Create another service?> n

Bind other services to application?> n

Save configuration?> y

Upload failed. Try again with 'cf push'.
NoMethodError: undefined method `service' for nil:NilClass
For more information, see ~/.cf/crash

versions:
ruby = ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux
cf = cf 3.0.0

@ramonskie
Copy link
Author

also tried it with the cf version "cf 4.0.1.rc2"

@testobsessed
Copy link

This issue should now be fixed on run.pivotal.io and also on the release-candidate branch of cf-release. Please reopen if you still have the problem.

@testobsessed
Copy link

The root cause of this issue was a breaking change in the Cloud Controller API that affected the cf cli. The fix was not in cf but rather in Cloud Controller. I believe the fix is this commit cloudfoundry/cloud_controller_ng@0a76a57 - see also cloudfoundry/cloud_controller_ng@c340790

@ramonskie
Copy link
Author

okay thanks for the update

@ramonskie
Copy link
Author

i upgraded our cloudfoundry instance and everything works again 👍

@dnascimento
Copy link

Same issue:

cfoundry: 4.0.3
cf -v: 4.2.8
ruby -v: 1.9.3

cf register...........
..((wait 20sec)).....
EOFError: end of file reached
/usr/lib/ruby/1.9.1/net/protocol.rb:141:in read_nonblock' /usr/lib/ruby/1.9.1/net/protocol.rb:141:inrbuf_fill'
/usr/lib/ruby/1.9.1/net/protocol.rb:122:in readuntil' /usr/lib/ruby/1.9.1/net/protocol.rb:132:inreadline'
/usr/lib/ruby/1.9.1/net/http.rb:2562:in read_status_line' /usr/lib/ruby/1.9.1/net/http.rb:2551:inread_new'
/usr/lib/ruby/1.9.1/net/http.rb:1319:in block in transport_request' /usr/lib/ruby/1.9.1/net/http.rb:1316:incatch'
/usr/lib/ruby/1.9.1/net/http.rb:1316:in transport_request' /usr/lib/ruby/1.9.1/net/http.rb:1293:inrequest'
rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in request' /usr/lib/ruby/1.9.1/net/http.rb:1286:inblock in request'
/usr/lib/ruby/1.9.1/net/http.rb:745:in start' /usr/lib/ruby/1.9.1/net/http.rb:1284:inrequest'
rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in request' cf-uaa-lib-1.3.10/lib/uaa/http.rb:156:innet_http_request'
cf-uaa-lib-1.3.10/lib/uaa/http.rb:129:in request' cf-uaa-lib-1.3.10/lib/uaa/http.rb:111:inhttp_get'
cf-uaa-lib-1.3.10/lib/uaa/http.rb:81:in json_get' cf-uaa-lib-1.3.10/lib/uaa/misc.rb:58:inserver'
cf-uaa-lib-1.3.10/lib/uaa/misc.rb:70:in discover_uaa' cfoundry-4.0.3/lib/cfoundry/uaaclient.rb:107:inuaa_url'
cfoundry-4.0.3/lib/cfoundry/uaaclient.rb:47:in block in password_score' cfoundry-4.0.3/lib/cfoundry/uaaclient.rb:134:inwrap_uaa_errors'
cfoundry-4.0.3/lib/cfoundry/uaaclient.rb:46:in password_score' cfoundry-4.0.3/lib/cfoundry/baseclient.rb:41:inpassword_score'
cf-4.2.8/lib/cf/cli/user/base.rb:22:in validate_password_strength!' cf-4.2.8/lib/cf/cli/user/base.rb:14:invalidate_password!'
cf-4.2.8/lib/cf/cli/user/register.rb:17:in register' mothership-0.5.1/lib/mothership/base.rb:66:inrun'
mothership-0.5.1/lib/mothership/command.rb:72:in block in invoke' mothership-0.5.1/lib/mothership/command.rb:86:ininstance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in invoke' mothership-0.5.1/lib/mothership/base.rb:55:inexecute'
cf-4.2.8/lib/cf/cli.rb:190:in block (2 levels) in execute' cf-4.2.8/lib/cf/cli.rb:197:insave_token_if_it_changes'
cf-4.2.8/lib/cf/cli.rb:189:in block in execute' cf-4.2.8/lib/cf/cli.rb:125:inwrap_errors'
cf-4.2.8/lib/cf/cli.rb:185:in execute' mothership-0.5.1/lib/mothership.rb:45:instart'
cf-4.2.8/bin/cf:13:in <top (required)>' /usr/local/bin/cf:23:inload'
/usr/local/bin/cf:23:in `

'

@narendrachoudhary
Copy link

Same issue is coming for me also when i am trying to push the phpmyadmin app into the cf which is being hosted on our enviorment

I am using the cf 5.4.3

pload failed. Try again with 'cf push'.
Time of crash:
2014-08-14 13:20:08 +0530

NoMethodError: undefined method `[]' for nil:NilClass

cf-5.4.3/lib/manifests/manifests.rb:302:in block in setup_services' cf-5.4.3/lib/manifests/manifests.rb:296:ineach'
cf-5.4.3/lib/manifests/manifests.rb:296:in setup_services' cf-5.4.3/lib/manifests/plugin.rb:102:inblock in push_with_manifest'
mothership-0.5.1/lib/mothership/callbacks.rb:55:in instance_exec' mothership-0.5.1/lib/mothership/callbacks.rb:55:inblock in filter'
mothership-0.5.1/lib/mothership/callbacks.rb:54:in each' mothership-0.5.1/lib/mothership/callbacks.rb:54:infilter'
cf-5.4.3/lib/cf/cli/app/push.rb:82:in upload_app' cf-5.4.3/lib/cf/cli/app/push.rb:58:insetup_new_app'
cf-5.4.3/lib/cf/cli/app/push.rb:48:in push' mothership-0.5.1/lib/mothership/base.rb:66:inrun'
mothership-0.5.1/lib/mothership/command.rb:72:in block in invoke' cf-5.4.3/lib/manifests/plugin.rb:108:incall'
cf-5.4.3/lib/manifests/plugin.rb:108:in block in push_with_manifest' mothership-0.5.1/lib/mothership/callbacks.rb:74:inwith_filters'
cf-5.4.3/lib/manifests/plugin.rb:105:in push_with_manifest' cf-5.4.3/lib/manifests/plugin.rb:90:inblock in wrap_push'
cf-5.4.3/lib/cf/spacing.rb:40:in block in spaced' cf-5.4.3/lib/cf/spacing.rb:38:ineach'
cf-5.4.3/lib/cf/spacing.rb:38:in spaced' cf-5.4.3/lib/manifests/plugin.rb:89:inwrap_push'
cf-5.4.3/lib/manifests/plugin.rb:25:in block in <class:ManifestsPlugin>' mothership-0.5.1/lib/mothership/command.rb:82:ininstance_exec'
mothership-0.5.1/lib/mothership/command.rb:82:in block (2 levels) in invoke' mothership-0.5.1/lib/mothership/command.rb:86:ininstance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in invoke' mothership-0.5.1/lib/mothership/base.rb:55:inexecute'
cf-5.4.3/lib/cf/cli.rb:195:in block (2 levels) in execute' cf-5.4.3/lib/cf/cli.rb:206:insave_token_if_it_changes'
cf-5.4.3/lib/cf/cli.rb:194:in block in execute' cf-5.4.3/lib/cf/cli.rb:123:inwrap_errors'
cf-5.4.3/lib/cf/cli.rb:190:in execute' mothership-0.5.1/lib/mothership.rb:45:instart'
cf-5.4.3/bin/cf:18:in <top (required)>' /usr/local/bin/cf:19:inload'
/usr/local/bin/cf:19:in `

'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants