Project

General

Profile

Bug #18087

Error undefined method `join' for #<String:0x007f1f13877b00> when uploading facts

Added by Pierre Deprey over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
smart_proxy_chef
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Hello,

I met this error in proxy.log when receive fact on foreman 14 RC3 for a lot of hosts:

E, [2017-01-08T20:34:18.547072 ] ERROR -- : undefined method `join' for #<String:0x007f1f13877b00> (NoMethodError)
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb:37:in `rescue in call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb:21:in `call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:124:in `call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1417:in `block in call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1499:in `synchronize'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1417:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
/usr/share/ruby/webrick/httpserver.rb:138:in `service'
/usr/share/ruby/webrick/httpserver.rb:94:in `run'
/usr/share/ruby/webrick/server.rb:295:in `block in start_thread'

do you an idea what it's mean?

Regards,


Related issues

Related to Smart Proxy - Bug #18092: foreman-proxy throws an undefined method 'join'Closed2017-01-16

History

#1 Updated by Marek Hulán over 2 years ago

  • Description updated (diff)

I can't tell from this trace, would you mind uploading more lines? Or the whole proxy.log as an attachment. Also what's your smart_proxy_chef plugin version? Also enabling the debug log level and uploading the log with it might help. To enable debug log level, just edit settings.yaml and set ":log_level: DEBUG" and then restart the proxy.

#2 Updated by Marek Hulán over 2 years ago

  • Category set to smart_proxy_chef

#3 Updated by Marek Hulán over 2 years ago

Also it might be the sinatra issue https://github.com/sinatra/sinatra/issues/951, seems to have the same trace.

#4 Updated by Pierre Deprey over 2 years ago

Hello,

Working with smart_proxy_chef-0.1.8 and foreman_chef v4.0 (with patch f3d4e93c8f876c987706b5698caa75b527bfbc2a)
some client are with chef_handler_foreman 0.1.2 and 0.1.1

Here the debug trace of proxy.log.
D, [2017-01-16T09:41:45.766081 ] DEBUG -- : close: 172.19.169.244:40629
D, [2017-01-16T09:41:50.087435 ] DEBUG -- : accept: 172.17.170.179:54674
D, [2017-01-16T09:41:50.107691 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-01-16T09:41:50.108810 ] DEBUG -- : starting chef signature authentication
D, [2017-01-16T09:41:50.108924 ] DEBUG -- : header HTTP_X_FOREMAN_CLIENT: hkdatwnedip01
D, [2017-01-16T09:41:50.186456 ] DEBUG -- : hkdatwnedip01 authenticated successfully
D, [2017-01-16T09:41:50.186734 ] DEBUG -- : report upload request received
D, [2017-01-16T09:41:51.961797 ] DEBUG -- : upload forwarded to Foreman successfully, response was 201
I, [2017-01-16T09:41:51.962299 ] INFO -- : 118.143.130.33 - - [16/Jan/2017:09:41:51 +0100] "POST /api/reports HTTP/1.1" 200 - 1.8537

D, [2017-01-16T09:41:51.962832 ] DEBUG -- : close: 172.17.170.179:54674
D, [2017-01-16T09:41:52.213443 ] DEBUG -- : accept: 172.19.169.244:40665
D, [2017-01-16T09:41:52.248195 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-01-16T09:41:52.281343 ] DEBUG -- : upload forwarded to Foreman successfully, response was 201
I, [2017-01-16T09:41:52.281676 ] INFO -- : 89.107.174.254 - - [16/Jan/2017:09:41:52 +0100] "POST /api/reports HTTP/1.1" 200 - 7.4994

D, [2017-01-16T09:41:52.282020 ] DEBUG -- : close: 172.17.170.179:54668
D, [2017-01-16T09:41:52.334027 ] DEBUG -- : starting chef signature authentication
D, [2017-01-16T09:41:52.334302 ] DEBUG -- : header HTTP_X_FOREMAN_CLIENT: pcis-awsmail1p
D, [2017-01-16T09:41:52.404976 ] DEBUG -- : pcis-awsmail1p authenticated successfully
D, [2017-01-16T09:41:52.405261 ] DEBUG -- : facts upload request received
E, [2017-01-16T09:41:53.589500 ] ERROR -- : undefined method `join' for #<String:0x007fa8805ee720> (NoMethodError)
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb:37:in `rescue in call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb:21:in `call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:124:in `call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1417:in `block in call'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1499:in `synchronize'
/usr/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1417:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
/usr/share/ruby/webrick/httpserver.rb:138:in `service'
/usr/share/ruby/webrick/httpserver.rb:94:in `run'
/usr/share/ruby/webrick/server.rb:295:in `block in start_thread'
D, [2017-01-16T09:41:53.607680 ] DEBUG -- : close: 172.17.190.215:58002
D, [2017-01-16T09:41:56.648435 ] DEBUG -- : accept: 172.17.170.179:54684
D, [2017-01-16T09:41:56.677365 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-01-16T09:41:56.678217 ] DEBUG -- : starting chef signature authentication
D, [2017-01-16T09:41:56.678299 ] DEBUG -- : header HTTP_X_FOREMAN_CLIENT: hkdataxtwn02
D, [2017-01-16T09:41:56.717181 ] DEBUG -- : hkdataxtwn02 authenticated successfully
D, [2017-01-16T09:41:56.717472 ] DEBUG -- : report upload request received
D, [2017-01-16T09:41:57.901175 ] DEBUG -- : upload forwarded to Foreman successfully, response was 201
I, [2017-01-16T09:41:57.901658 ] INFO -- : 118.143.130.33 - - [16/Jan/2017:09:41:57 +0100] "POST /api/reports HTTP/1.1" 200 - 1.2236

D, [2017-01-16T09:41:57.902143 ] DEBUG -- : close: 172.17.170.179:54684
D, [2017-01-16T09:41:58.383632 ] DEBUG -- : accept: 172.18.150.8:37892
D, [2017-01-16T09:41:58.422853 ] DEBUG -- : accept: 172.17.32.12:45522
D, [2017-01-16T09:41:58.426558 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-01-16T09:41:58.427351 ] DEBUG -- : starting chef signature authentication
D, [2017-01-16T09:41:58.427438 ] DEBUG -- : header HTTP_X_FOREMAN_CLIENT: log-bo-prd01
D, [2017-01-16T09:41:58.463638 ] DEBUG -- : log-bo-prd01 authenticated successfully
D, [2017-01-16T09:41:58.463855 ] DEBUG -- : report upload request received
D, [2017-01-16T09:41:58.689429 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-01-16T09:41:58.690278 ] DEBUG -- : starting chef signature authentication
D, [2017-01-16T09:41:58.690382 ] DEBUG -- : header HTTP_X_FOREMAN_CLIENT: hkdatsgposd1
D, [2017-01-16T09:41:58.758193 ] DEBUG -- : hkdatsgposd1 authenticated successfully
D, [2017-01-16T09:41:58.758434 ] DEBUG -- : report upload request received
D, [2017-01-16T09:42:00.287792 ] DEBUG -- : upload forwarded to Foreman successfully, response was 201
I, [2017-01-16T09:42:00.288460 ] INFO -- : 172.17.32.12 - - [16/Jan/2017:09:42:00 +0100] "POST /api/reports HTTP/1.1" 200 - 1.8613

Best Regards,

#5 Updated by Pierre Deprey over 2 years ago

hello,

I'm trying this (as found in sinatra issue 951):

 

gem install sinatra-fix_951
Fetching: sinatra-1.4.5.gem (100%)
Successfully installed sinatra-1.4.5
Fetching: sinatra-fix_951-1.0.2.gem (100%)
Successfully installed sinatra-fix_951-1.0.2
 

was with sinatra (1.3.5)

but the error persist:

E, [2017-01-16T10:03:35.956616 ] ERROR -- : undefined method `join' for #<String:0x007f937c6c8b00> (NoMethodError)
/usr/local/share/gems/gems/sinatra-1.4.5/lib/sinatra/show_exceptions.rb:37:in `rescue in call'
/usr/local/share/gems/gems/sinatra-1.4.5/lib/sinatra/show_exceptions.rb:21:in `call'
/usr/local/share/gems/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call'
/usr/local/share/gems/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call'
/usr/local/share/gems/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call'
/usr/local/share/gems/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize'
/usr/local/share/gems/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
/usr/share/ruby/webrick/httpserver.rb:138:in `service'
/usr/share/ruby/webrick/httpserver.rb:94:in `run'
/usr/share/ruby/webrick/server.rb:295:in `block in start_thread'

So i tried to update to sinatra-1.4.7.

With this version, the problem seems to be solved :)
Do you think it could be a dependency in smart_proxy_chef ?

Thanks for your help, again :)

#6 Updated by Marek Hulán over 2 years ago

Thanks for letting me know. We ship 1.3.5 in our repos so I'd need to try updating the sinatra there first. I wonder if smart_proxy_chef really triggers this issue or it's a generic issue in smart proxy. Sadly the trace does not show the triger :-(

#7 Updated by Dominic Cleal over 2 years ago

  • Related to Bug #18092: foreman-proxy throws an undefined method 'join' added

#8 Updated by Marek Hulán over 2 years ago

  • Status changed from New to Closed

New sinatra version will be shipped with 1.14.1, so I'm closing this. Thanks for testing out!

#9 Updated by Marek Hulán over 2 years ago

Just for the record, the rpm for el7 can be fetched from http://koji.katello.org/koji/taskinfo?taskID=587904 until 1.14.1 is ready

Also available in: Atom PDF