The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #3428

external node classifer fails with wrong Content-Length format

Added by Dan Bode over 4 years ago. Updated over 1 year ago.

Status:ClosedStart date:03/26/2010
Priority:HighDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Keywords: Affected URL:
Branch: Affected Dashboard version:

Description

on some centos 5.3 and 5.4 machines, the external node classifier fails with the following error message when run.

I have seen this on two separate machine, but I cannot reliably recreate. For machines where it occurs, it always occurs. On my cetos 5.3 image, it works fine.

This error message is from 0.2.0, I have also seen it occur on 1.0.0rc1, but I do not have the exact stack trace.

[root@machine:~/git/puppet-dashboard 15:20:59]# ./bin/external_node myhost /usr/lib/ruby/1.8/net/http.rb:1334:in `content_length': wrong Content-Length format (Net::HTTPHeaderSyntaxError)

from /usr/lib/ruby/1.8/net/http.rb:2210:in `read_body_0'
from /usr/lib/ruby/1.8/net/http.rb:2173:in `read_body'
from /usr/lib/ruby/1.8/net/http.rb:2198:in `body'
from /usr/lib/ruby/1.8/net/http.rb:2137:in `reading_body'
from /usr/lib/ruby/1.8/net/http.rb:1052:in `request'
from ./bin/external_node:20
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/lib/ruby/1.8/net/http.rb:440:in `start'
from ./bin/external_node:20

external_node.diff Magnifier (464 Bytes) Jon Nangle, 02/15/2011 01:21 pm

History

#1 Updated by Rein Henrichs over 4 years ago

  • Status changed from Unreviewed to Needs More Information
  • Priority changed from High to Normal

#2 Updated by Kenneth Holter over 4 years ago

I’m having the same problem. I’ve installed the puppet-dashboard-1.0.0-2.noarch.rpm, puppet-server-0.25.4-1.el5.norarch.rpm and puppet-0.25.4-1.el5.noarch.rpm packages, running on RHEL 5.4 x86_64 servers. Any ideas how to proceed debugging this?

#3 Updated by Andrew Rankin about 4 years ago

I’ve hit the same issue, servers are Centos 5.5 machines (x86_64), clients are a mix of Centos 4.8, 5.4 & 5.5 machines (all x86_64).

puppet-0.25.4-1.el5 puppet-server-0.25.4-1.el5 puppet-dashboard-v1.0.0-0

#4 Updated by Dan Bode about 4 years ago

could this just be an issue with 64 bit machines? Has the Dashboard been tested on x86_64?

#5 Updated by Rein Henrichs about 4 years ago

I’m running Snow Leopard, which is 64 bit.

I have still been completely unable to reproduce this bug, despite its apparent frequency of occurrence. :( I’ll keep trying. Any additional information would be useful.

#6 Updated by Kenneth Holter about 4 years ago

I’ve installed both dashboard and puppetmaster, and everything seems to be working just fine. The only issue that I’m aware of is the external nodes script. I’m able to reproduce the issue, so if you could give tell me how to extract the info you’ll need to debug this I’ll get it done.

#7 Updated by Rein Henrichs about 4 years ago

  • Priority changed from Normal to High
  • Target version set to 1.1.0

#8 Updated by paha papa about 4 years ago

trying 1.0.2 came across the same error, on CentOS release 5.5 x86_64 with ruby-1.8.6.399-2.el5, rubygems-1.3.1-1.el5

irb(main):011:0> req = Net::HTTP::Get.new('/nodes/testnode', 'Accept' => 'text/yaml')
=> #
irb(main):042:0> res = Net::HTTP.start("dashboard", "3000") {|http| http.request(req) }
Net::HTTPHeaderSyntaxError: wrong Content-Length format
    from /usr/lib/ruby/1.8/net/http.rb:1334:in `content_length'
...

ArgumentError (wrong number of arguments (1 for 0)):
  app/models/node.rb:81:in `to_yaml'
  app/models/node.rb:81:in `to_yaml'
  haml (3.0.13) [v] rails/./lib/sass/plugin/rack.rb:41:in `call'

My current v.1.0.0rc2 on the same server doesn’t get the error.

#9 Updated by Igal Koshevoy about 4 years ago

Paha: Where did you get those Ruby 1.8.6 RPMs? Can you give me a URL? They’re not part of the official distro or contributed sets that I can find.

Anyone: Can someone give me root access to a server that has this problem so I can try to debug it live? My SSH public key: http://pragmaticraft.com/igal_rsa.pub

I can confirm that the external_node program works fine on: * 32-bit and 64-bit CentOS 5.5 with the official packages, using ruby-1.8.5-5.el5_4.8 * 32-bit and 64-bit Ubuntu 8.04 with the official packages, using 1.8.6.111-2ubuntu1 * 32-bit and 64-bit Ubuntu 10.04 with the official packages, using 1.8.7.249-2 * 32-bit and 64-bit any of the above running either the DEB or custom compiled Ruby Enterprise Edition 1.8.7-2010.02

#10 Updated by Sean Byron almost 4 years ago

Just wanted to report that I am seeing the same problem. Puppet Dashboard seems to be working fine, the web interface is usable and I’m getting reports from all of my nodes (currently about 900 hosts). However, the included external node classifier script bombs out like this:

# ./bin/external_node hostname
/usr/lib/ruby/1.8/net/http.rb:1334:in `content_length': wrong Content-Length format (Net::HTTPHeaderSyntaxError)
        from /usr/lib/ruby/1.8/net/http.rb:2210:in `read_body_0'
        from /usr/lib/ruby/1.8/net/http.rb:2173:in `read_body'
        from /usr/lib/ruby/1.8/net/http.rb:2198:in `body'
        from /usr/lib/ruby/1.8/net/http.rb:2137:in `reading_body'
        from /usr/lib/ruby/1.8/net/http.rb:1052:in `request'
        from ./bin/external_node:20
        from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
        from /usr/lib/ruby/1.8/net/http.rb:440:in `start'
        from ./bin/external_node:20

Here’s some information on my system:

# rpm -qa|egrep -i 'ruby|puppet'|sort
puppet-0.25.4-1.el5
puppet-dashboard-1.0.3-3
puppetlabs-repo-3.0-2
puppet-server-0.25.4-1.el5
ruby-1.8.5-5.el5_4.8
ruby-augeas-0.3.0-1.el5
ruby-devel-1.8.5-5.el5_4.8
ruby-devel-1.8.5-5.el5_4.8
rubygem-actionmailer-2.1.1-1.el5
rubygem-actionpack-2.1.1-5.el5
rubygem-activerecord-2.1.1-2.el5
rubygem-activeresource-2.1.1-1.el5
rubygem-activesupport-2.1.1-2.el5
rubygem-daemons-1.0.10-1.el5
rubygem-fastthread-1.0.7-1.el5
rubygem-gem_plugin-0.2.2-2.el5
rubygem-mongrel-1.0.1-6.el5
rubygem-rails-2.1.1-2.el5
rubygem-rake-0.8.3-1.el5
rubygems-1.3.1-1.el5
rubygem-sqlite3-ruby-1.2.4-1.el5
ruby-irb-1.8.5-5.el5_4.8
ruby-libs-1.8.5-5.el5_4.8
ruby-libs-1.8.5-5.el5_4.8
ruby-mysql-2.7.3-1.el5
ruby-rdoc-1.8.5-5.el5_4.8
ruby-shadow-1.4.1-7.el5

# cat /etc/redhat-release 
CentOS release 5.5 (Final)

# uname -a 
Linux myhost 2.6.18-164.15.1.el5.028stab068.9 #1 SMP Tue Mar 30 18:07:38 MSD 2010 x86_64 x86_64 x86_64 GNU/Linux

I can provide more information if required, but sadly I cannot provide a login to my system for debugging.

Any help would be appreciated – this issue is preventing us from fully utilizing the dashboard.

#11 Updated by Jon Nangle over 3 years ago

Sean, are you still getting this? If so, then could you please create a copy of your external_node script, apply the attached diff (taken against 1.0.4), and try to reproduce the issue with the new script. This should provide a dump of the request and response to stderr, including the Content-Length field.

#12 Updated by Sean Byron over 3 years ago

Thanks for the reply, Jon. Ultimately I ended up just writing my own external node classifier, which was luckily was relatively trivial.

However, it would still be nice to know what the cause of this issue is – and since I’m not a Ruby expert, I’m happy to receive any assistance with this. Here’s the output from the external_node script after applying the provided patch.

[root@myhost bin]# ./external_node.patched myhost.mydomain.net
opening connection to localhost...
opened
<- "GET /nodes/myhost.mydomain.net HTTP/1.1\r\nConnection: close\r\nAccept: text/yaml\r\nHost: localhost:3000\r\n\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Connection: close\r\n"
-> "Date: Tue, 15 Feb 2011 18:42:24 GMT\r\n"
-> "Content-Length: \r\n"
-> "ETag: \"95d8132c397e814e763cbd3c1b15f13c\"\r\n"
-> "X-Runtime: 7\r\n"
-> "Cache-Control: private, max-age=0, must-revalidate\r\n"
-> "Content-Type: application/x-yaml; charset=utf-8\r\n"
-> "\r\n"
/usr/lib/ruby/1.8/net/http.rb:1334:in `content_length': wrong Content-Length format (Net::HTTPHeaderSyntaxError)
        from /usr/lib/ruby/1.8/net/http.rb:2210:in `read_body_0'
        from /usr/lib/ruby/1.8/net/http.rb:2173:in `read_body'
        from /usr/lib/ruby/1.8/net/http.rb:2198:in `body'
        from /usr/lib/ruby/1.8/net/http.rb:2137:in `reading_body'
        from /usr/lib/ruby/1.8/net/http.rb:1052:in `request'
        from /usr/lib/ruby/1.8/net/http.rb:1037:in `request'
        from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
        from /usr/lib/ruby/1.8/net/http.rb:1035:in `request'
        from ./external_node.patched:22

Please let me know if I can provide anything else.

#13 Updated by James Turnbull over 3 years ago

  • Target version deleted (1.1.0)

#14 Updated by Aaron Stone over 1 year ago

  • Status changed from Needs More Information to Closed

No updates in a very long time. Closing.

Also available in: Atom PDF