cloudfoundry-attic / cf

The Cloud Foundry command-line interface
Apache License 2.0
19 stars 29 forks source link

Repeatedly seeing 500 responses when fetching logs #40

Open dsyer opened 11 years ago

dsyer commented 11 years ago
$ cf logs appname
... FAILED
CFoundry::BadResponse: 500: Internal server error
cat ~/.cf/crash # for more details
$ cat ~/.cf/crash
Time of crash:
  2013-08-08 12:20:22 +0100

CFoundry::BadResponse: 500: Internal server error

<<<
REQUEST: GET http://6a54c4e49e01d1bf7b4c68ad60cda131.run.pivotal.io/instance_paths/36b026d711e17b8b4e12bd2204483bed?hmac=5425bb6ac2ec259c164945525bd7ad0265c4725a0bcb6c975cb74d2a68ce1612910c4fdd5bb243e5bea6bf62b45ad21bc53135d0a89794e58b511d0587980de2&path=logs&timestamp=1375960821
REQUEST_HEADERS:
  Authorization : [PRIVATE DATA HIDDEN]
  Content-Length : 0
RESPONSE: [500]
RESPONSE_HEADERS:
  connection : keep-alive
  content-length : 21
  content-type : text/plain
  date : Thu, 08 Aug 2013 11:20:22 GMT
  server : thin 1.5.1 codename Straight Razor
RESPONSE_BODY:
Internal server error
>>>

cfoundry-4.0.3/lib/cfoundry/baseclient.rb:178:in `handle_error_response'
cfoundry-4.0.3/lib/cfoundry/baseclient.rb:146:in `handle_response'
cfoundry-4.0.3/lib/cfoundry/baseclient.rb:87:in `request'
cfoundry-4.0.3/lib/cfoundry/baseclient.rb:64:in `get'
cfoundry-4.0.3/lib/cfoundry/v2/base.rb:37:in `files'
cfoundry-4.0.3/lib/cfoundry/v2/app.rb:343:in `files'
cf-4.2.8/lib/cf/cli/app/logs.rb:57:in `block in show_instance_logs'
interact-0.5.2/lib/interact/progress.rb:98:in `with_progress'
cf-4.2.8/lib/cf/cli/app/logs.rb:56:in `show_instance_logs'
cf-4.2.8/lib/cf/cli/app/logs.rb:47:in `crashlogs'
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'
cf-4.2.8/lib/cf/cli.rb:190:in `block (2 levels) in execute'
cf-4.2.8/lib/cf/cli.rb:201:in `save_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:in `wrap_errors'
cf-4.2.8/lib/cf/cli.rb:185:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
cf-4.2.8/bin/cf:13:in `<top (required)>'
ruby-1.9.3-p0/bin/cf:19:in `load'
ruby-1.9.3-p0/bin/cf:19:in `<main>'
dsyer commented 11 years ago

Through much trial and error I have found that cf files <appname> logs/stderr.log (etc. for the other files) tends to work even when this annoying bug is preventing me from using cf logs <appname>. Hope that helps someone because it wasted about 1/2 a day of my time!

tlang commented 11 years ago

Thanks Dave. We've got this bug prioritized, will keep you updated.

Igosuki commented 11 years ago

I'm trying to deploy a node app on cf right now, getting this bug and don't even know what's going wrong with deployment as the build seems to do just fine :/

mariash commented 11 years ago

@dsyer @Igosuki is this still an issue? We recently fixed crashlogs issues and it should be on production already.

dsyer commented 11 years ago

Yes it is still an issue. In fact I was cursing it just 30min ago.

dsyer commented 11 years ago

Reopen?

xoebus commented 11 years ago

Of course, sorry about that.

ggajos commented 10 years ago

I'm also facing this problem

Ruby-200-p195/lib/ruby/gems/2.0.0/gems/cfoundry-4.7.1/lib/cfoundry/baseclient.rb:180:in `handle_error_response': 500: Internal server error (CFoundry::BadResponse)

TildeWill commented 10 years ago

We also see this on the frontend team with some frequency both with gcf and cf. The interesting thing that I found last time was to follow the output of a trace, there's a call to CC to get the files, but there's also an instance index in the URL. The CLIs use 0 - I bumped it to 1 and got my logs just fine. This points me toward a out of alignment DEA or something else that's in runtime's domain. Adding @aramprice and @MarkKropf to this discussion.

hiremaga commented 10 years ago

Closing this since the cf gem has been moved to the attic.