The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #3428

external node classifer fails with wrong Content-Length format

Added by Dan Bode about 6 years ago. Updated over 3 years ago.

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


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


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


#1 Updated by Rein Henrichs about 6 years ago

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

#2 Updated by Kenneth Holter almost 6 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 almost 6 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 almost 6 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 almost 6 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 almost 6 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 almost 6 years ago

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

#8 Updated by paha papa almost 6 years ago

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

irb(main):011:0> req ='/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 almost 6 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:

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 * 32-bit and 64-bit Ubuntu 10.04 with the official packages, using * 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 over 5 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

# 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 about 5 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 about 5 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
opening connection to localhost...
<- "GET /nodes/ 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 about 5 years ago

  • Target version deleted (1.1.0)

#14 Updated by Aaron Stone over 3 years ago

  • Status changed from Needs More Information to Closed

No updates in a very long time. Closing.

Also available in: Atom PDF